Lines Matching refs:iph

315 ipsec_polhead_free_table(ipsec_policy_head_t *iph)  in ipsec_polhead_free_table()  argument
321 ipsec_policy_root_t *ipr = &iph->iph_root[dir]; in ipsec_polhead_free_table()
336 ipsec_polhead_destroy(ipsec_policy_head_t *iph) in ipsec_polhead_destroy() argument
340 avl_destroy(&iph->iph_rulebyid); in ipsec_polhead_destroy()
341 rw_destroy(&iph->iph_lock); in ipsec_polhead_destroy()
344 ipsec_policy_root_t *ipr = &iph->iph_root[dir]; in ipsec_polhead_destroy()
351 ipsec_polhead_free_table(iph); in ipsec_polhead_destroy()
476 ipsec_alloc_table(ipsec_policy_head_t *iph, int nchains, int kmflag, in ipsec_alloc_table() argument
482 ipsec_policy_root_t *ipr = &iph->iph_root[dir]; in ipsec_alloc_table()
528 ipsec_polhead_init(ipsec_policy_head_t *iph, int nchains) in ipsec_polhead_init() argument
532 rw_init(&iph->iph_lock, NULL, RW_DEFAULT, NULL); in ipsec_polhead_init()
533 avl_create(&iph->iph_rulebyid, ipsec_policy_cmpbyid, in ipsec_polhead_init()
537 ipsec_policy_root_t *ipr = &iph->iph_root[dir]; in ipsec_polhead_init()
5267 ipha_t *iph = NULL; in ipsec_tun_outbound() local
5291 iph = (ipha_t *)(mp->b_rptr + hdr_len); in ipsec_tun_outbound()
5308 if (iph == NULL) { in ipsec_tun_outbound()
5310 iph = (ipha_t *)(mp->b_rptr + hdr_len); in ipsec_tun_outbound()
5312 inner_ipv4 = iph; in ipsec_tun_outbound()
6008 tunnel_polhead_init(ipsec_policy_head_t *iph, netstack_t *ns) in tunnel_polhead_init() argument
6012 rw_init(&iph->iph_lock, NULL, RW_DEFAULT, NULL); in tunnel_polhead_init()
6013 iph->iph_refs = 1; in tunnel_polhead_init()
6014 iph->iph_gen = 0; in tunnel_polhead_init()
6015 if (ipsec_alloc_table(iph, ipss->ipsec_tun_spd_hashsize, in tunnel_polhead_init()
6017 ipsec_polhead_free_table(iph); in tunnel_polhead_init()
6020 ipsec_polhead_init(iph, ipss->ipsec_tun_spd_hashsize); in tunnel_polhead_init()
6259 ipha_t *iph; in ipsec_fragcache_add() local
6299 iph = (ipha_t *)(mp->b_rptr + outer_hdr_len); in ipsec_fragcache_add()
6301 if (IPH_HDR_VERSION(iph) == IPV4_VERSION) { in ipsec_fragcache_add()
6304 ASSERT(IPH_HDR_VERSION(iph) == IPV6_VERSION); in ipsec_fragcache_add()
6361 i = IPSEC_FRAG_HASH_FUNC(iph->ipha_ident); in ipsec_fragcache_add()
6367 ASSERT(iph != NULL); in ipsec_fragcache_add()
6368 if ((fep->itpfe_id == iph->ipha_ident) && in ipsec_fragcache_add()
6369 (fep->itpfe_src == iph->ipha_src) && in ipsec_fragcache_add()
6370 (fep->itpfe_dst == iph->ipha_dst) && in ipsec_fragcache_add()
6371 (fep->itpfe_proto == iph->ipha_protocol)) in ipsec_fragcache_add()
6386 firstbyte = V4_FRAG_OFFSET(iph); in ipsec_fragcache_add()
6387 lastbyte = firstbyte + ntohs(iph->ipha_length) - in ipsec_fragcache_add()
6388 IPH_HDR_LENGTH(iph); in ipsec_fragcache_add()
6389 last = (V4_MORE_FRAGS(iph) == 0); in ipsec_fragcache_add()
6393 lastbyte, last, iph->ipha_ident, mp); in ipsec_fragcache_add()
6441 bcopy((caddr_t)&iph->ipha_src, (caddr_t)&fep->itpfe_src, in ipsec_fragcache_add()
6443 bcopy((caddr_t)&iph->ipha_dst, (caddr_t)&fep->itpfe_dst, in ipsec_fragcache_add()
6445 fep->itpfe_id = iph->ipha_ident; in ipsec_fragcache_add()
6446 fep->itpfe_proto = iph->ipha_protocol; in ipsec_fragcache_add()
6560 data = (char *)iph + IPH_HDR_LENGTH(iph) + in ipsec_fragcache_add()
6617 data = (char *)iph + IPH_HDR_LENGTH(iph) + in ipsec_fragcache_add()
6621 data = (char *)iph + in ipsec_fragcache_add()
6622 IPH_HDR_LENGTH(iph) + firstbyte - in ipsec_fragcache_add()
6706 iph = NULL; in ipsec_fragcache_add()
6711 iph = (ipha_t *)(data_mp->b_rptr + hdr_len); in ipsec_fragcache_add()
6723 if (iph == NULL) { in ipsec_fragcache_add()
6725 iph = (ipha_t *)(data_mp->b_rptr + hdr_len); in ipsec_fragcache_add()
6727 firstbyte = V4_FRAG_OFFSET(iph); in ipsec_fragcache_add()
6728 lastbyte = firstbyte + ntohs(iph->ipha_length) - in ipsec_fragcache_add()
6729 IPH_HDR_LENGTH(iph); in ipsec_fragcache_add()
6783 if ((is_v4 && !V4_MORE_FRAGS(iph)) || in ipsec_fragcache_add()
6790 if ((is_v4 && (firstbyte + ntohs(iph->ipha_length) > in ipsec_fragcache_add()