Re: [resend net-next] socket: Added 'transparent' option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jan Engelhardt írta:
On Thursday 2009-06-04 15:34, Patrick McHardy wrote:
Laszlo Attila Toth wrote:
+++ b/include/linux/netfilter/xt_socket.h
@@ -0,0 +1,8 @@
+#ifndef _XT_SOCKET_H_match
+#define _XT_SOCKET_H_match
+
+struct xt_socket_match_info1 {
+	__u8 transparent;
+};
Please use a bitmask.

enum {
	XT_SOCKET_TRANSPARENT = 1 << 0,
};

struct xt_socket_mtinfo1 {
	__u8 flags;
};


Thanks.

My first thought was simply: = 1, without offset (and of course = 2 ...).

I'm also working on a newer revision of the limit match, which is almost done. It can be inverted (! --limit ...). I think in this case a bitfield can be used, but it is probably not necessary, the following extra member is enogh:

	u_int32_t invert;

(I wouldn't like to resend the patch it if it is not the best choice).

--
Attila
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux