| @@ -74,28 +74,28 @@ struct mbuf { | | | @@ -74,28 +74,28 @@ struct mbuf { |
74 | #define M_PKTHDR 0x00002 | | 74 | #define M_PKTHDR 0x00002 |
75 | | | 75 | |
76 | #define m_get(x, y) npfkern_m_get(0, MLEN) | | 76 | #define m_get(x, y) npfkern_m_get(0, MLEN) |
77 | #define m_gethdr(x, y) npfkern_m_get(M_PKTHDR, MLEN) | | 77 | #define m_gethdr(x, y) npfkern_m_get(M_PKTHDR, MLEN) |
78 | #define m_length(m) npfkern_m_length(m) | | 78 | #define m_length(m) npfkern_m_length(m) |
79 | #define m_freem(m) npfkern_m_freem(m) | | 79 | #define m_freem(m) npfkern_m_freem(m) |
80 | #define mtod(m, t) ((t)((m)->m_data)) | | 80 | #define mtod(m, t) ((t)((m)->m_data)) |
81 | | | 81 | |
82 | #endif | | 82 | #endif |
83 | | | 83 | |
84 | #define CHECK_TRUE(x) \ | | 84 | #define CHECK_TRUE(x) \ |
85 | if (!(x)) { printf("FAIL: %s line %d\n", __func__, __LINE__); return 0; } | | 85 | if (!(x)) { printf("FAIL: %s line %d\n", __func__, __LINE__); return 0; } |
86 | | | 86 | |
87 | const npf_mbufops_t npftest_mbufops; | | 87 | extern const npf_mbufops_t npftest_mbufops; |
88 | const npf_ifops_t npftest_ifops; | | 88 | extern const npf_ifops_t npftest_ifops; |
89 | | | 89 | |
90 | struct mbuf * npfkern_m_get(int, int); | | 90 | struct mbuf * npfkern_m_get(int, int); |
91 | size_t npfkern_m_length(const struct mbuf *); | | 91 | size_t npfkern_m_length(const struct mbuf *); |
92 | void npfkern_m_freem(struct mbuf *); | | 92 | void npfkern_m_freem(struct mbuf *); |
93 | | | 93 | |
94 | void npf_test_init(int (*)(int, const char *, void *), | | 94 | void npf_test_init(int (*)(int, const char *, void *), |
95 | const char *(*)(int, const void *, char *, socklen_t), | | 95 | const char *(*)(int, const void *, char *, socklen_t), |
96 | long (*)(void)); | | 96 | long (*)(void)); |
97 | void npf_test_fini(void); | | 97 | void npf_test_fini(void); |
98 | int npf_test_load(const void *, size_t, bool); | | 98 | int npf_test_load(const void *, size_t, bool); |
99 | ifnet_t * npf_test_addif(const char *, bool, bool); | | 99 | ifnet_t * npf_test_addif(const char *, bool, bool); |
100 | ifnet_t * npf_test_getif(const char *); | | 100 | ifnet_t * npf_test_getif(const char *); |
101 | | | 101 | |