Home | History | Annotate | Line # | Download | only in libnpftest
npf_test.h revision 1.10
      1   1.4  rmind /*	$NetBSD: npf_test.h,v 1.10 2013/09/24 02:44:20 rmind Exp $	*/
      2   1.1  rmind 
      3   1.1  rmind /*
      4   1.1  rmind  * Public Domain.
      5   1.1  rmind  */
      6   1.1  rmind 
      7   1.1  rmind #ifndef _LIB_NPF_TEST_H_
      8   1.1  rmind #define _LIB_NPF_TEST_H_
      9   1.1  rmind 
     10   1.1  rmind #include <sys/types.h>
     11   1.1  rmind #include <sys/mbuf.h>
     12   1.1  rmind 
     13   1.1  rmind #include <netinet/in_systm.h>
     14   1.1  rmind #include <netinet/in.h>
     15   1.1  rmind #include <netinet6/in6.h>
     16   1.1  rmind 
     17   1.1  rmind #include <netinet/ip.h>
     18   1.1  rmind #include <netinet/ip6.h>
     19   1.1  rmind #include <netinet/tcp.h>
     20   1.1  rmind #include <netinet/udp.h>
     21   1.1  rmind #include <netinet/ip_icmp.h>
     22   1.1  rmind 
     23   1.1  rmind #include <net/if.h>
     24   1.1  rmind #include <net/if_ether.h>
     25   1.1  rmind #include <net/ethertypes.h>
     26   1.1  rmind 
     27   1.9  rmind /* Test interfaces and IP addresses. */
     28   1.9  rmind #define	IFNAME_EXT	"npftest0"
     29   1.9  rmind #define	IFNAME_INT	"npftest1"
     30   1.9  rmind 
     31   1.9  rmind #define	LOCAL_IP1	"10.1.1.1"
     32   1.9  rmind #define	LOCAL_IP2	"10.1.1.2"
     33   1.9  rmind #define	LOCAL_IP3	"10.1.1.3"
     34   1.9  rmind 
     35   1.9  rmind /* Note: RFC 5737 compliant addresses. */
     36   1.9  rmind #define	PUB_IP1		"192.0.2.1"
     37   1.9  rmind #define	PUB_IP2		"192.0.2.2"
     38   1.9  rmind #define	REMOTE_IP1	"192.0.2.3"
     39   1.9  rmind #define	REMOTE_IP2	"192.0.2.4"
     40   1.9  rmind 
     41   1.6  rmind void		npf_test_init(void);
     42   1.2  rmind int		npf_test_load(const void *);
     43   1.5  rmind unsigned	npf_test_addif(const char *, unsigned, bool);
     44   1.5  rmind unsigned	npf_test_getif(const char *);
     45   1.9  rmind 
     46   1.9  rmind int		npf_test_statetrack(const void *, size_t, unsigned,
     47   1.2  rmind 		    bool, int64_t *);
     48  1.10  rmind void		npf_test_conc(bool, unsigned);
     49   1.2  rmind 
     50   1.2  rmind struct mbuf *	mbuf_getwithdata(const void *, size_t);
     51   1.1  rmind struct mbuf *	mbuf_construct_ether(int);
     52   1.1  rmind struct mbuf *	mbuf_construct(int);
     53   1.4  rmind struct mbuf *	mbuf_construct6(int);
     54   1.1  rmind void *		mbuf_return_hdrs(struct mbuf *, bool, struct ip **);
     55   1.1  rmind void		mbuf_icmp_append(struct mbuf *, struct mbuf *);
     56   1.1  rmind 
     57   1.1  rmind bool		npf_nbuf_test(bool);
     58   1.7  rmind bool		npf_bpf_test(bool);
     59   1.1  rmind bool		npf_table_test(bool);
     60   1.3  rmind bool		npf_state_test(bool);
     61   1.1  rmind 
     62   1.5  rmind bool		npf_rule_test(bool);
     63   1.5  rmind bool		npf_nat_test(bool);
     64   1.5  rmind 
     65   1.1  rmind #endif
     66