summaryrefslogtreecommitdiffstats
path: root/utils/conntrack_create_nat.c
Commit message (Collapse)AuthorAgeFilesLines
* utils: add nfct_destroy() to all examples in utilsAndrew Beverley2011-05-141-0/+3
| | | | | | | | | | This patch adds nfct_destroy() to all the examples in the utils folder. Although this may be obvious to some, when I wrote my first code using libnetfilter_conntract, I used the examples but subsequently missed out all the calls to nfct_destroy(). Signed-off-by: Andrew Beverley <andy@andybev.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* utils: resolve compiler warningsJan Engelhardt2010-12-301-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The addition of -Wall flagged some legitimate warnings: make expect_dump expect_create expect_get expect_delete expect_flush expect_events expect_create_userspace conntrack_create conntrack_dump conntrack_update conntrack_delete conntrack_flush conntrack_create_nat conntrack_get conntrack_events conntrack_master conntrack_filter conntrack_grp_create ctexp_events make[1]: Entering directory `/home/jengelh/code/libnetfilter_conntrack/utils' CC expect_dump.o expect_dump.c: In function "main": expect_dump.c:36:3: warning: implicit declaration of function "strerror" expect_dump.c:36:3: warning: format "%s" expects type ‘char *’, but argument 3 has type ‘int’ CCLD expect_dump CC expect_create.o expect_create.c: In function "main": expect_create.c:31:2: warning: implicit declaration of function "inet_addr" expect_create.c:54:3: warning: implicit declaration of function "strerror" expect_create.c:54:3: warning: format "%s" expects type ‘char *’, but argument 3 has type ‘int’ expect_create.c:117:3: warning: format "%s" expects type ‘char *’, but argument 3 has type ‘int’ CCLD expect_create CC expect_get.o expect_get.c: In function "main": expect_get.c:33:2: warning: implicit declaration of function "inet_addr" expect_get.c:59:3: warning: implicit declaration of function "strerror" expect_get.c:59:3: warning: format "%s" expects type ‘char *’, but argument 3 has type ‘int’ CCLD expect_get CC expect_delete.o expect_delete.c: In function "main": expect_delete.c:21:2: warning: implicit declaration of function "inet_addr" expect_delete.c:46:3: warning: implicit declaration of function "strerror" expect_delete.c:46:3: warning: format "%s" expects type ‘char *’, but argument 3 has type ‘int’ CCLD expect_delete CC expect_flush.o expect_flush.c: In function "main": expect_flush.c:23:3: warning: implicit declaration of function "strerror" expect_flush.c:23:3: warning: format "%s" expects type ‘char *’, but argument 3 has type ‘int’ CCLD expect_flush CC expect_events.o expect_events.c: In function "main": expect_events.c:44:3: warning: implicit declaration of function "strerror" expect_events.c:44:3: warning: format "%s" expects type ‘char *’, but argument 3 has type ‘int’ CCLD expect_events CC expect_create_userspace.o expect_create_userspace.c: In function "main": expect_create_userspace.c:31:2: warning: implicit declaration of function "inet_addr" expect_create_userspace.c:58:3: warning: implicit declaration of function "strerror" expect_create_userspace.c:58:3: warning: format "%s" expects type ‘char *’, but argument 3 has type ‘int’ expect_create_userspace.c:121:3: warning: format "%s" expects type ‘char *’, but argument 3 has type ‘int’ CCLD expect_create_userspace CC conntrack_create.o conntrack_create.c: In function "main": conntrack_create.c:21:2: warning: implicit declaration of function "inet_addr" conntrack_create.c:43:3: warning: implicit declaration of function "strerror" conntrack_create.c:43:3: warning: format "%s" expects type ‘char *’, but argument 3 has type ‘int’ CCLD conntrack_create CC conntrack_dump.o conntrack_dump.c: In function "main": conntrack_dump.c:37:3: warning: implicit declaration of function "strerror" conntrack_dump.c:37:3: warning: format "%s" expects type ‘char *’, but argument 3 has type ‘int’ conntrack_dump.c:24:7: warning: unused variable "buf" CCLD conntrack_dump CC conntrack_update.o conntrack_update.c: In function "main": conntrack_update.c:21:2: warning: implicit declaration of function "inet_addr" conntrack_update.c:43:3: warning: implicit declaration of function "strerror" conntrack_update.c:43:3: warning: format "%s" expects type ‘char *’, but argument 3 has type ‘int’ CCLD conntrack_update CC conntrack_delete.o conntrack_delete.c: In function "main": conntrack_delete.c:21:2: warning: implicit declaration of function "inet_addr" conntrack_delete.c:38:3: warning: implicit declaration of function "strerror" conntrack_delete.c:38:3: warning: format "%s" expects type ‘char *’, but argument 3 has type ‘int’ CCLD conntrack_delete CC conntrack_flush.o conntrack_flush.c: In function "main": conntrack_flush.c:24:3: warning: implicit declaration of function "strerror" conntrack_flush.c:24:3: warning: format "%s" expects type ‘char *’, but argument 3 has type ‘int’ conntrack_flush.c:12:7: warning: unused variable "buf" CCLD conntrack_flush CC conntrack_create_nat.o conntrack_create_nat.c: In function "main": conntrack_create_nat.c:21:2: warning: implicit declaration of function "inet_addr" conntrack_create_nat.c:45:3: warning: implicit declaration of function "strerror" conntrack_create_nat.c:45:3: warning: format "%s" expects type ‘char *’, but argument 3 has type ‘int’ CCLD conntrack_create_nat CC conntrack_get.o conntrack_get.c: In function "main": conntrack_get.c:33:2: warning: implicit declaration of function "inet_addr" conntrack_get.c:52:3: warning: implicit declaration of function "strerror" conntrack_get.c:52:3: warning: format "%s" expects type ‘char *’, but argument 3 has type ‘int’ CCLD conntrack_get CC conntrack_events.o conntrack_events.c: In function "main": conntrack_events.c:45:3: warning: implicit declaration of function "strerror" conntrack_events.c:45:3: warning: format "%s" expects type ‘char *’, but argument 3 has type ‘int’ conntrack_events.c:29:7: warning: unused variable "buf" conntrack_events.c:28:23: warning: unused variable "ct" conntrack_events.c:26:11: warning: unused variable "family" CCLD conntrack_events CC conntrack_master.o conntrack_master.c: In function "main": conntrack_master.c:22:2: warning: implicit declaration of function "inet_addr" conntrack_master.c:44:3: warning: implicit declaration of function "strerror" conntrack_master.c:44:3: warning: format "%s" expects type ‘char *’, but argument 3 has type ‘int’ conntrack_master.c:86:3: warning: format "%s" expects type ‘char *’, but argument 3 has type ‘int’ CCLD conntrack_master CC conntrack_filter.o conntrack_filter.c: In function "main": conntrack_filter.c:58:3: warning: implicit declaration of function "inet_addr" conntrack_filter.c:98:3: warning: implicit declaration of function "strerror" conntrack_filter.c:98:3: warning: format "%s" expects type ‘char *’, but argument 3 has type ‘int’ conntrack_filter.c:31:7: warning: unused variable "buf" conntrack_filter.c:30:23: warning: unused variable "ct" conntrack_filter.c:27:11: warning: unused variable "family" CCLD conntrack_filter CC conntrack_grp_create.o conntrack_grp_create.c: In function "main": conntrack_grp_create.c:21:3: warning: implicit declaration of function "inet_addr" conntrack_grp_create.c:49:3: warning: implicit declaration of function "strerror" conntrack_grp_create.c:49:3: warning: format "%s" expects type ‘char *’, but argument 3 has type ‘int’ CCLD conntrack_grp_create CC ctexp_events.o ctexp_events.c: In function "main": ctexp_events.c:63:3: warning: implicit declaration of function "strerror" ctexp_events.c:63:3: warning: format "%s" expects type ‘char *’, but argument 3 has type ‘int’ CCLD ctexp_events make[1]: Leaving directory `/home/jengelh/code/libnetfilter_conntrack/utils' Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* tcp: add support for SYN_SENT2 statePablo Neira Ayuso2009-06-101-1/+1
| | | | | | | | | This patch adds support for the new SYN_SENT2 state that Jozsef has introduced to support TCP simultaneous open in 2.6.31. We can safely include support for this feature now since the LISTEN state was not ever really used. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* utils: fix wrong use of errno in example filesPablo Neira Ayuso2008-12-101-3/+6
| | | | | | | | | | | | This patch removes the use of strerr(errno) when the returned valued is != -1. This fixes random segfaults in my x86_64 machines. According to the documentation, errno should not be used unless the returned value is -1. This patch also includes some missing nfct_close() calls in the examples. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* introduce NFCT_SOPT_SETUP_* options to simplify object setup/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org2007-06-041-13/+7
|
* - split new_api_test.c into several conntrack_*.c files to learn much easier ↵/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org2007-05-131-0/+55
how the new API works