Lines Matching refs:npc
60 #define m_freem(m) (npc)->npc_ctx->mbufops->free(m)
61 #define mtod(m,t) ((t)((npc)->npc_ctx->mbufops->getdata(m)))
73 npf_ip6_setscope(const npf_cache_t *npc, struct ip6_hdr *ip6)
75 const struct ifnet *rcvif = npc->npc_nbuf->nb_ifp;
92 npf_return_tcp(npf_cache_t *npc)
94 npf_t *npf = npc->npc_ctx;
104 KASSERT(npf_iscached(npc, NPC_IP46));
105 KASSERT(npf_iscached(npc, NPC_LAYER4));
106 tcpdlen = npf_tcpsaw(npc, &seq, &ack, &win);
107 oth = npc->npc_l4.tcp;
114 if (npf_iscached(npc, NPC_IP4)) {
116 } else if (npf_iscached(npc, NPC_IP6)) {
132 if (npf_iscached(npc, NPC_IP4)) {
133 struct ip *oip = npc->npc_ip.v4;
149 struct ip6_hdr *oip = npc->npc_ip.v6;
151 KASSERT(npf_iscached(npc, NPC_IP6));
178 if (npf_iscached(npc, NPC_IP4)) {
190 KASSERT(npf_iscached(npc, NPC_IP6));
195 if (npf_ip6_setscope(npc, ip6) != 0) {
201 (void)npf_mbuf_add_tag(npc->npc_nbuf, m, NPF_NTAG_PASS);
204 if (npf_iscached(npc, NPC_IP4)) {
217 npf_return_icmp(const npf_cache_t *npc)
219 struct mbuf *m = nbuf_head_mbuf(npc->npc_nbuf);
222 (void)nbuf_add_tag(npc->npc_nbuf, NPF_NTAG_PASS);
224 if (npf_iscached(npc, NPC_IP4)) {
227 } else if (npf_iscached(npc, NPC_IP6)) {
231 if (npf_ip6_setscope(npc, ip6) != 0) {
246 npf_return_block(npf_cache_t *npc, const int retfl)
248 if (!npf_iscached(npc, NPC_IP46) || !npf_iscached(npc, NPC_LAYER4)) {
251 switch (npc->npc_proto) {
254 (void)npf_return_tcp(npc);
259 if (npf_return_icmp(npc) == 0)