Lines Matching refs:iph

318 ipsec_polhead_free_table(ipsec_policy_head_t *iph)  in ipsec_polhead_free_table()  argument
324 ipsec_policy_root_t *ipr = &iph->iph_root[dir]; in ipsec_polhead_free_table()
339 ipsec_polhead_destroy(ipsec_policy_head_t *iph) in ipsec_polhead_destroy() argument
343 avl_destroy(&iph->iph_rulebyid); in ipsec_polhead_destroy()
344 rw_destroy(&iph->iph_lock); in ipsec_polhead_destroy()
347 ipsec_policy_root_t *ipr = &iph->iph_root[dir]; in ipsec_polhead_destroy()
354 ipsec_polhead_free_table(iph); in ipsec_polhead_destroy()
477 ipsec_alloc_table(ipsec_policy_head_t *iph, int nchains, int kmflag, in ipsec_alloc_table() argument
483 ipsec_policy_root_t *ipr = &iph->iph_root[dir]; in ipsec_alloc_table()
529 ipsec_polhead_init(ipsec_policy_head_t *iph, int nchains) in ipsec_polhead_init() argument
533 rw_init(&iph->iph_lock, NULL, RW_DEFAULT, NULL); in ipsec_polhead_init()
534 avl_create(&iph->iph_rulebyid, ipsec_policy_cmpbyid, in ipsec_polhead_init()
538 ipsec_policy_root_t *ipr = &iph->iph_root[dir]; in ipsec_polhead_init()
5275 ipha_t *iph = NULL; in ipsec_tun_outbound() local
5299 iph = (ipha_t *)(mp->b_rptr + hdr_len); in ipsec_tun_outbound()
5316 if (iph == NULL) { in ipsec_tun_outbound()
5318 iph = (ipha_t *)(mp->b_rptr + hdr_len); in ipsec_tun_outbound()
5320 inner_ipv4 = iph; in ipsec_tun_outbound()
6016 tunnel_polhead_init(ipsec_policy_head_t *iph, netstack_t *ns) in tunnel_polhead_init() argument
6020 rw_init(&iph->iph_lock, NULL, RW_DEFAULT, NULL); in tunnel_polhead_init()
6021 iph->iph_refs = 1; in tunnel_polhead_init()
6022 iph->iph_gen = 0; in tunnel_polhead_init()
6023 if (ipsec_alloc_table(iph, ipss->ipsec_tun_spd_hashsize, in tunnel_polhead_init()
6025 ipsec_polhead_free_table(iph); in tunnel_polhead_init()
6028 ipsec_polhead_init(iph, ipss->ipsec_tun_spd_hashsize); in tunnel_polhead_init()
6267 ipha_t *iph; in ipsec_fragcache_add() local
6310 iph = (ipha_t *)(mp->b_rptr + outer_hdr_len); in ipsec_fragcache_add()
6312 if (IPH_HDR_VERSION(iph) == IPV4_VERSION) { in ipsec_fragcache_add()
6315 ASSERT(IPH_HDR_VERSION(iph) == IPV6_VERSION); in ipsec_fragcache_add()
6372 i = IPSEC_FRAG_HASH_FUNC(iph->ipha_ident); in ipsec_fragcache_add()
6378 ASSERT(iph != NULL); in ipsec_fragcache_add()
6379 if ((fep->itpfe_id == iph->ipha_ident) && in ipsec_fragcache_add()
6380 (fep->itpfe_src == iph->ipha_src) && in ipsec_fragcache_add()
6381 (fep->itpfe_dst == iph->ipha_dst) && in ipsec_fragcache_add()
6382 (fep->itpfe_proto == iph->ipha_protocol)) in ipsec_fragcache_add()
6397 firstbyte = V4_FRAG_OFFSET(iph); in ipsec_fragcache_add()
6398 lastbyte = firstbyte + ntohs(iph->ipha_length) - in ipsec_fragcache_add()
6399 IPH_HDR_LENGTH(iph); in ipsec_fragcache_add()
6400 last = (V4_MORE_FRAGS(iph) == 0); in ipsec_fragcache_add()
6404 lastbyte, last, iph->ipha_ident, mp); in ipsec_fragcache_add()
6452 bcopy((caddr_t)&iph->ipha_src, (caddr_t)&fep->itpfe_src, in ipsec_fragcache_add()
6454 bcopy((caddr_t)&iph->ipha_dst, (caddr_t)&fep->itpfe_dst, in ipsec_fragcache_add()
6456 fep->itpfe_id = iph->ipha_ident; in ipsec_fragcache_add()
6457 fep->itpfe_proto = iph->ipha_protocol; in ipsec_fragcache_add()
6571 data = (char *)iph + IPH_HDR_LENGTH(iph) + in ipsec_fragcache_add()
6628 data = (char *)iph + IPH_HDR_LENGTH(iph) + in ipsec_fragcache_add()
6632 data = (char *)iph + in ipsec_fragcache_add()
6633 IPH_HDR_LENGTH(iph) + firstbyte - in ipsec_fragcache_add()
6717 iph = NULL; in ipsec_fragcache_add()
6722 iph = (ipha_t *)(data_mp->b_rptr + hdr_len); in ipsec_fragcache_add()
6734 if (iph == NULL) { in ipsec_fragcache_add()
6736 iph = (ipha_t *)(data_mp->b_rptr + hdr_len); in ipsec_fragcache_add()
6738 firstbyte = V4_FRAG_OFFSET(iph); in ipsec_fragcache_add()
6739 lastbyte = firstbyte + ntohs(iph->ipha_length) - in ipsec_fragcache_add()
6740 IPH_HDR_LENGTH(iph); in ipsec_fragcache_add()
6794 if ((is_v4 && !V4_MORE_FRAGS(iph)) || in ipsec_fragcache_add()
6801 if ((is_v4 && (firstbyte + ntohs(iph->ipha_length) > in ipsec_fragcache_add()