diff options
author | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org> | 2006-12-23 15:41:38 +0000 |
---|---|---|
committer | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org> | 2006-12-23 15:41:38 +0000 |
commit | acf1808fe57fe8a8bfc8410b475728e39e080721 (patch) | |
tree | 80ac54a33ffa8fccd3fe0ca9c7c3db3730955008 /utils/new_api_test.c | |
parent | b4c3a23c884c24f4e5d941fb928cf49561a9cdf9 (diff) |
- replace ntohs by htons in the example file (reported by Victor Stinner)
- introduce NFCT_O_PLAIN flag: NFCT_O_DEFAULT points to NFCT_O_PLAIN
- remove commented line in nfct_new()
Diffstat (limited to 'utils/new_api_test.c')
-rw-r--r-- | utils/new_api_test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/new_api_test.c b/utils/new_api_test.c index 2bc26b1..aad2f52 100644 --- a/utils/new_api_test.c +++ b/utils/new_api_test.c @@ -54,16 +54,16 @@ int main() nfct_set_attr_u32(ct, ATTR_ORIG_IPV4_DST, inet_addr("2.2.2.2")); nfct_set_attr_u8(ct, ATTR_ORIG_L4PROTO, IPPROTO_TCP); - nfct_set_attr_u16(ct, ATTR_ORIG_PORT_SRC, ntohs(20)); - nfct_set_attr_u16(ct, ATTR_ORIG_PORT_DST, ntohs(10)); + nfct_set_attr_u16(ct, ATTR_ORIG_PORT_SRC, htons(20)); + nfct_set_attr_u16(ct, ATTR_ORIG_PORT_DST, htons(10)); nfct_set_attr_u8(ct, ATTR_REPL_L3PROTO, AF_INET); nfct_set_attr_u32(ct, ATTR_REPL_IPV4_SRC, inet_addr("2.2.2.2")); nfct_set_attr_u32(ct, ATTR_REPL_IPV4_DST, inet_addr("1.1.1.1")); nfct_set_attr_u8(ct, ATTR_REPL_L4PROTO, IPPROTO_TCP); - nfct_set_attr_u16(ct, ATTR_REPL_PORT_SRC, ntohs(10)); - nfct_set_attr_u16(ct, ATTR_REPL_PORT_DST, ntohs(20)); + nfct_set_attr_u16(ct, ATTR_REPL_PORT_SRC, htons(10)); + nfct_set_attr_u16(ct, ATTR_REPL_PORT_DST, htons(20)); nfct_set_attr_u8(ct, ATTR_TCP_STATE, TCP_CONNTRACK_LISTEN); nfct_set_attr_u32(ct, ATTR_TIMEOUT, 100); |