1 diff -Nru include.orig/libipq/libipq.h include/libipq/libipq.h
2 --- userspace/include.orig/libipq/libipq.h 2003-10-16 01:53:08.000000000 +0200
3 +++ userspace/include/libipq/libipq.h 2003-10-16 23:47:35.000000000 +0200
8 +int ipq_set_vwmark(const struct ipq_handle *h,
10 + unsigned int verdict,
11 + unsigned long nfmark,
13 + unsigned char *buf);
15 int ipq_ctl(const struct ipq_handle *h, int request, ...);
17 char *ipq_errstr(void);
19 diff -Nru libipq.orig/libipq.c libipq/libipq.c
20 --- userspace/libipq.orig/libipq.c 2003-10-16 01:58:46.000000000 +0200
21 +++ userspace/libipq/libipq.c 2003-10-16 23:33:10.000000000 +0200
23 return ipq_netlink_sendmsg(h, &msg, 0);
26 +int ipq_set_vwmark(const struct ipq_handle *h,
28 + unsigned int verdict,
29 + unsigned long nfmark,
33 + unsigned char nvecs;
35 + struct nlmsghdr nlh;
37 + struct iovec iov[3];
40 + memset(&nlh, 0, sizeof(nlh));
41 + nlh.nlmsg_flags = NLM_F_REQUEST;
42 + nlh.nlmsg_type = IPQM_VWMARK;
43 + nlh.nlmsg_pid = h->local.nl_pid;
44 + memset(&pm, 0, sizeof(pm));
45 + pm.msg.vwmark.value = verdict;
46 + pm.msg.vwmark.id = id;
47 + pm.msg.vwmark.data_len = data_len;
48 + pm.msg.vwmark.nfmark = nfmark;
49 + iov[0].iov_base = &nlh;
50 + iov[0].iov_len = sizeof(nlh);
51 + iov[1].iov_base = ±
52 + iov[1].iov_len = sizeof(pm);
53 + tlen = sizeof(nlh) + sizeof(pm);
55 + if (data_len && buf) {
56 + iov[2].iov_base = buf;
57 + iov[2].iov_len = data_len;
61 + msg.msg_name = (void *)&h->peer;
62 + msg.msg_namelen = sizeof(h->peer);
64 + msg.msg_iovlen = nvecs;
65 + msg.msg_control = NULL;
66 + msg.msg_controllen = 0;
68 + nlh.nlmsg_len = tlen;
69 + return ipq_netlink_sendmsg(h, &msg, 0);
74 /* Not implemented yet */
75 int ipq_ctl(const struct ipq_handle *h, int request, ...)