13 #include <arpa/inet.h>
16 #include <libnetfilter_conntrack/libnetfilter_conntrack.h>
17 #include <libnetfilter_conntrack/libnetfilter_conntrack_tcp.h>
19 int main(
int argc,
char *argv[])
23 struct nfct_handle *h;
24 struct nf_conntrack *ct;
27 fprintf(stderr,
"Usage: %s [ct_table_size]\n", argv[0]);
48 for (i = r, j = 0;i < (r + atoi(argv[1]) * 2); i++, j++) {
64 printf(
"added %d flow entries\n", j);
68 perror(
"nfct_query: ");
void nfct_set_attr_u32(struct nf_conntrack *ct, const enum nf_conntrack_attr type, uint32_t value)
int nfct_query(struct nfct_handle *h, const enum nf_conntrack_query query, const void *data)
int nfct_close(struct nfct_handle *cth)
void nfct_destroy(struct nf_conntrack *ct)
int nfct_setobjopt(struct nf_conntrack *ct, unsigned int option)
void nfct_set_attr_u16(struct nf_conntrack *ct, const enum nf_conntrack_attr type, uint16_t value)
struct nf_conntrack * nfct_new(void)
void nfct_set_attr_u8(struct nf_conntrack *ct, const enum nf_conntrack_attr type, uint8_t value)
struct nfct_handle * nfct_open(uint8_t, unsigned)