• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4 #include <errno.h>
5 
6 #include <libnetfilter_conntrack/libnetfilter_conntrack.h>
7 
main(void)8 int main(void)
9 {
10 	int ret;
11 	uint8_t family = AF_INET;
12 	struct nfct_handle *h;
13 
14 	h = nfct_open(EXPECT, 0);
15 	if (!h) {
16 		perror("nfct_open");
17 		return -1;
18 	}
19 
20 	ret = nfexp_query(h, NFCT_Q_FLUSH, &family);
21 
22 	printf("TEST: flush expectations ");
23 	if (ret == -1)
24 		printf("(%d)(%s)\n", ret, strerror(errno));
25 	else
26 		printf("(OK)\n");
27 
28 	nfct_close(h);
29 
30 	ret == -1 ? exit(EXIT_FAILURE) : exit(EXIT_SUCCESS);
31 }
32