Home | History | Annotate | Line # | Download | only in libnpftest
npf_test.h revision 1.7
      1 /*	$NetBSD: npf_test.h,v 1.7 2013/09/19 01:04:46 rmind Exp $	*/
      2 
      3 /*
      4  * Public Domain.
      5  */
      6 
      7 #ifndef _LIB_NPF_TEST_H_
      8 #define _LIB_NPF_TEST_H_
      9 
     10 #include <sys/types.h>
     11 #include <sys/mbuf.h>
     12 
     13 #include <netinet/in_systm.h>
     14 #include <netinet/in.h>
     15 #include <netinet6/in6.h>
     16 
     17 #include <netinet/ip.h>
     18 #include <netinet/ip6.h>
     19 #include <netinet/tcp.h>
     20 #include <netinet/udp.h>
     21 #include <netinet/ip_icmp.h>
     22 
     23 #include <net/if.h>
     24 #include <net/if_ether.h>
     25 #include <net/ethertypes.h>
     26 
     27 void		npf_test_init(void);
     28 int		npf_test_load(const void *);
     29 unsigned	npf_test_addif(const char *, unsigned, bool);
     30 unsigned	npf_test_getif(const char *);
     31 int		npf_test_handlepkt(const void *, size_t, unsigned,
     32 		    bool, int64_t *);
     33 
     34 struct mbuf *	mbuf_getwithdata(const void *, size_t);
     35 struct mbuf *	mbuf_construct_ether(int);
     36 struct mbuf *	mbuf_construct(int);
     37 struct mbuf *	mbuf_construct6(int);
     38 void *		mbuf_return_hdrs(struct mbuf *, bool, struct ip **);
     39 void		mbuf_icmp_append(struct mbuf *, struct mbuf *);
     40 
     41 bool		npf_nbuf_test(bool);
     42 bool		npf_processor_test(bool);
     43 bool		npf_bpf_test(bool);
     44 bool		npf_table_test(bool);
     45 bool		npf_state_test(bool);
     46 
     47 bool		npf_rule_test(bool);
     48 bool		npf_nat_test(bool);
     49 
     50 #endif
     51