diff options
author | Florian Westphal <fw@strlen.de> | 2013-06-30 23:10:47 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2013-07-23 23:22:08 +0200 |
commit | c9cba32f4820a9febee116bbc268ec8b1ae9a04c (patch) | |
tree | 35429a12ed5415ec122239ad286fd673cc4524b3 /include/network.h | |
parent | 1239b83da27545e3275127ac339cdca29c872304 (diff) | |
download | conntrack-tools-c9cba32f4820a9febee116bbc268ec8b1ae9a04c.tar.gz conntrack-tools-c9cba32f4820a9febee116bbc268ec8b1ae9a04c.zip |
conntrackd: support replication of connlabels
- check if ct has label attribute, and at least one label
(bit) is set
- serialize bitmap into array-of-u32, in network byte order
- add code to build new nfct_bitmask object from array-of-u32
Current parse functions don't have length information,
this adds optional parse2() which gets struct netattr pointer.
Attributes that want to use parse2 need to set .maxsize to nonzero
value.
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'include/network.h')
-rw-r--r-- | include/network.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/network.h b/include/network.h index 79745f3..cc312cb 100644 --- a/include/network.h +++ b/include/network.h @@ -228,9 +228,13 @@ enum nta_attr { NTA_TCP_WSCALE_ORIG, /* uint8_t */ NTA_TCP_WSCALE_REPL, /* uint8_t */ NTA_HELPER_NAME, /* string (variable length) */ + NTA_LABELS, /* array of uint32_t (variable length) */ NTA_MAX }; +/* allow to serialize/replicate up to 4k labels per flow */ +#define NTA_LABELS_MAX_SIZE (4096/sizeof(uint32_t)) + struct nta_attr_natseqadj { uint32_t orig_seq_correction_pos; uint32_t orig_seq_offset_before; |