diff -ruNa iptables-1.2.9/include/libipq/libipq.h iptables-1.2.9-brcontrol/include/libipq/libipq.h --- iptables-1.2.9/include/libipq/libipq.h 2003-09-07 12:08:00.000000000 +0200 +++ iptables-1.2.9-brcontrol/include/libipq/libipq.h 2003-12-22 13:54:29.000000000 +0100 @@ -79,6 +79,12 @@ size_t data_len, unsigned char *buf); +//Ipq_set_mark patch for BRcontrol +int ipq_set_mark(const struct ipq_handle *h, + ipq_id_t id, + unsigned long mark_value); +//End of Ipq_set_mark patch for BRcontrol + int ipq_ctl(const struct ipq_handle *h, int request, ...); char *ipq_errstr(void); diff -ruNa iptables-1.2.9/libipq/libipq.c iptables-1.2.9-brcontrol/libipq/libipq.c --- iptables-1.2.9/libipq/libipq.c 2001-11-24 16:09:20.000000000 +0100 +++ iptables-1.2.9-brcontrol/libipq/libipq.c 2003-12-22 14:40:30.000000000 +0100 @@ -347,6 +347,27 @@ nlh.nlmsg_len = tlen; return ipq_netlink_sendmsg(h, &msg, 0); } +// ipq_set_mark patch for BRcontrol +int ipq_set_mark(const struct ipq_handle *h, + ipq_id_t id, + unsigned long mark_value) +{ + struct { + struct nlmsghdr nlh; + ipq_peer_msg_t pm; + } req; + + memset(&req, 0, sizeof(req)); + req.nlh.nlmsg_len = NLMSG_LENGTH(sizeof(req)); + req.nlh.nlmsg_flags = NLM_F_REQUEST; + req.nlh.nlmsg_type = IPQM_MARK; + req.nlh.nlmsg_pid = h->local.nl_pid; + req.pm.msg.mark.id = id; + req.pm.msg.mark.mark_value = mark_value; + return ipq_netlink_sendto(h, (void *)&req, req.nlh.nlmsg_len); +} +// End of ipq_set_mark patch for BRcontrol + /* Not implemented yet */ int ipq_ctl(const struct ipq_handle *h, int request, ...)