1 /* $NetBSD: npftest.h,v 1.14 2016/12/26 23:05:05 christos Exp $ */ 2 3 /* 4 * Public Domain. 5 */ 6 7 #ifndef _NPF_TEST_H_ 8 #define _NPF_TEST_H_ 9 10 #include <inttypes.h> 11 #include <stdbool.h> 12 13 #if !defined(_NPF_STANDALONE) 14 #include <net/if.h> 15 #else 16 #define rumpns_npf_test_addif npf_test_addif 17 #define rumpns_npf_test_load npf_test_load 18 #define rumpns_npf_test_init npf_test_init 19 #define rumpns_npf_test_fini npf_test_fini 20 #define rumpns_npf_test_getif npf_test_getif 21 #define rumpns_npf_nbuf_test npf_nbuf_test 22 #define rumpns_npf_bpf_test npf_bpf_test 23 #define rumpns_npf_table_test npf_table_test 24 #define rumpns_npf_state_test npf_state_test 25 #define rumpns_npf_rule_test npf_rule_test 26 #define rumpns_npf_nat_test npf_nat_test 27 #define rumpns_npf_test_conc npf_test_conc 28 #define rumpns_npf_test_statetrack npf_test_statetrack 29 #endif 30 31 #include "npf.h" 32 33 void rumpns_npf_test_init(int (*)(int, const char *, void *), 34 const char *(*)(int, const void *, char *, socklen_t), 35 long (*)(void)); 36 void rumpns_npf_test_fini(void); 37 int rumpns_npf_test_load(const void *); 38 ifnet_t * rumpns_npf_test_addif(const char *, bool, bool); 39 ifnet_t * rumpns_npf_test_getif(const char *); 40 41 int rumpns_npf_test_statetrack(const void *, size_t, 42 ifnet_t *, bool, int64_t *); 43 void rumpns_npf_test_conc(bool, unsigned); 44 45 bool rumpns_npf_nbuf_test(bool); 46 bool rumpns_npf_bpf_test(bool); 47 bool rumpns_npf_table_test(bool, void *, size_t); 48 bool rumpns_npf_state_test(bool); 49 50 bool rumpns_npf_rule_test(bool); 51 bool rumpns_npf_nat_test(bool); 52 53 int process_stream(const char *, const char *, ifnet_t *); 54 55 #endif 56