Home
last modified time | relevance | path

Searched refs:iph (Results 1 – 25 of 48) sorted by relevance

12

/illumos-gate/usr/src/uts/common/inet/ipf/
H A Dip_htable.c115 err = COPYIN(op->iplo_struct, iph, sizeof(*iph));
117 KFREE(iph);
123 KFREE(iph);
148 err = COPYOUT(iph, op->iplo_struct, sizeof(*iph));
157 iph->iph_size * sizeof(*iph->iph_table));
164 bzero((char *)iph->iph_table, iph->iph_size * sizeof(*iph->iph_table));
223 *iph->iph_pnext = iph->iph_next;
225 iph->iph_next->iph_pnext = iph->iph_pnext;
230 KFREES(iph->iph_table, iph->iph_size * sizeof(*iph->iph_table));
263 for (iph = ifs->ifs_ipf_htables[unit]; iph != NULL; iph = iph->iph_next)
[all …]
H A Dip_lookup.c222 iphtable_t *iph; local
267 iph = fr_findhtable(op.iplo_unit, op.iplo_name, ifs);
268 if (iph == NULL)
270 err = fr_addhtent(iph, &hte, ifs);
295 iphtable_t *iph; local
334 iph = fr_findhtable(op.iplo_unit, op.iplo_name, ifs);
335 if (iph == NULL)
337 err = fr_delhtent(iph, &hte, ifs);
/illumos-gate/usr/src/cmd/ipf/lib/common/
H A Dprinthash.c25 iphtable_t iph; local
29 if ((*copyfunc)((char *)hp, (char *)&iph, sizeof(iph)))
33 return iph.iph_next;
53 PRINTF("%#x", iph.iph_type);
65 switch (iph.iph_unit)
80 PRINTF("#%d", iph.iph_unit);
88 iph.iph_name, (u_long)iph.iph_size);
89 if (iph.iph_seed != 0)
108 (u_long)iph.iph_size, iph.iph_seed);
110 iph.iph_masks[3]);
[all …]
H A Dload_hash.c30 iphtable_t iph; local
53 op.iplo_size = sizeof(iph);
54 op.iplo_struct = &iph;
57 strncpy(iph.iph_name, iphp->iph_name, sizeof(iph.iph_name));
70 iph.iph_size = size;
72 iph.iph_table = NULL;
73 iph.iph_ref = 0;
93 iph.iph_table = calloc(size, sizeof(*iph.iph_table));
98 iph.iph_table[0] = list;
99 printhash(&iph, bcopywrap, iph.iph_name, opts);
[all …]
H A Dremove_hash.c23 iphtable_t iph; local
35 op.iplo_size = sizeof(iph);
36 op.iplo_struct = &iph;
38 bzero((char *)&iph, sizeof(iph));
39 iph.iph_unit = iphp->iph_unit;
40 iph.iph_type = iphp->iph_type;
41 strncpy(iph.iph_name, iphp->iph_name, sizeof(iph.iph_name));
42 iph.iph_flags = iphp->iph_flags;
H A Dprinthashnode.c14 iphtent_t *printhashnode(iph, ipep, copyfunc, opts) in printhashnode() argument
15 iphtable_t *iph; in printhashnode()
67 switch (iph->iph_type & ~IPHASH_ANON)
70 if (strncmp(ipe.ipe_group, iph->iph_name,
/illumos-gate/usr/src/lib/libipadm/common/
H A Dlibipadm.c183 ipadm_handle_t iph; in ipadm_open() local
198 iph->iph_sock = -1; in ipadm_open()
199 iph->iph_sock6 = -1; in ipadm_open()
201 iph->iph_rtsock = -1; in ipadm_open()
230 ipadm_close(iph); in ipadm_open()
243 iph->iph_dlh = NULL; in ipadm_open()
252 *handle = iph; in ipadm_open()
257 ipadm_close(iph); in ipadm_open()
267 if (iph == NULL) in ipadm_close()
279 free(iph); in ipadm_close()
[all …]
H A Dipadm_if.c165 iph->iph_sock : iph->iph_sock6; in i_ipadm_active_if_info()
692 sock = (af == AF_INET ? iph->iph_sock : iph->iph_sock6); in i_ipadm_create_ipmp()
729 other_af_sock = (af == AF_INET ? iph->iph_sock6 : iph->iph_sock); in i_ipadm_create_ipmp_peer()
919 if (iph->iph_dlh != NULL) { in i_ipadm_plumb_if()
943 sock = iph->iph_sock; in i_ipadm_plumb_if()
945 sock = iph->iph_sock6; in i_ipadm_plumb_if()
1182 if (ioctl((af == AF_INET) ? iph->iph_sock : iph->iph_sock6, in i_ipadm_unplumb_if()
1195 sock = iph->iph_sock6; in i_ipadm_unplumb_if()
1198 sock = iph->iph_sock; in i_ipadm_unplumb_if()
1254 iph->iph_sock : iph->iph_sock6; in i_ipadm_unplumb_if()
[all …]
H A Dipadm_addr.c515 iph->iph_sock : iph->iph_sock6; in i_ipadm_active_addr_info()
968 s = (af == AF_INET ? iph->iph_sock : iph->iph_sock6); in i_ipadm_set_prefixlen()
1072 s = (af == AF_INET ? iph->iph_sock : iph->iph_sock6); in i_ipadm_set_zone()
1308 s = (af == AF_INET ? iph->iph_sock : iph->iph_sock6); in i_ipadm_get_prefixlen()
1466 s = (af == AF_INET ? iph->iph_sock : iph->iph_sock6); in i_ipadm_get_zone()
1780 sock = (addr->ipadm_af == AF_INET ? iph->iph_sock : iph->iph_sock6); in i_ipadm_delete_addr()
2532 sock = iph->iph_sock; in i_ipadm_addr_exists_on_if()
2540 sock = iph->iph_sock6; in i_ipadm_addr_exists_on_if()
2577 iph->iph_sock6); in i_ipadm_do_addif()
2875 sock = (af == AF_INET ? iph->iph_sock : iph->iph_sock6); in i_ipadm_create_addr()
[all …]
H A Dipadm_prop.c413 s = (proto == MOD_PROTO_IPV6 ? iph->iph_sock6 : iph->iph_sock); in i_ipadm_set_mtu()
445 s = (proto == MOD_PROTO_IPV6 ? iph->iph_sock6 : iph->iph_sock); in i_ipadm_set_metric()
472 !i_ipadm_validate_ifname(iph, pval)) in i_ipadm_set_usesrc()
478 s = (proto == MOD_PROTO_IPV6 ? iph->iph_sock6 : iph->iph_sock); in i_ipadm_set_usesrc()
681 if (iph->iph_flags & IPH_INIT) { in i_ipadm_set_eprivport()
731 !(iph->iph_flags & IPH_LEGACY)) { in i_ipadm_set_forwarding()
803 if (iph->iph_flags & IPH_LEGACY) in i_ipadm_get_ecnsack()
853 if (iph->iph_flags & IPH_LEGACY) in i_ipadm_get_forwarding()
890 s = (proto == MOD_PROTO_IPV6 ? iph->iph_sock6 : iph->iph_sock); in i_ipadm_get_mtu()
929 s = (proto == MOD_PROTO_IPV6 ? iph->iph_sock6 : iph->iph_sock); in i_ipadm_get_metric()
[all …]
H A Dipadm_ndpd.c91 status = i_ipadm_create_linklocal(iph, addr); in i_ipadm_create_ipv6addrs()
105 (void) i_ipadm_delete_addr(iph, addr); in i_ipadm_create_ipv6addrs()
113 (void) i_ipadm_delete_addr(iph, addr); in i_ipadm_create_ipv6addrs()
135 status = i_ipadm_delete_addr(iph, ipaddr); in i_ipadm_delete_ipv6addrs()
155 status = i_ipadm_do_addif(iph, addr); in i_ipadm_create_linklocal()
158 if (!(iph->iph_flags & IPH_INIT)) { in i_ipadm_create_linklocal()
159 status = i_ipadm_setlifnum_addrobj(iph, addr); in i_ipadm_create_linklocal()
185 err = ioctl(iph->iph_sock6, SIOCSLIFPREFIX, (caddr_t)&lifr); in i_ipadm_create_linklocal()
191 err = ioctl(iph->iph_sock6, SIOCSLIFADDR, (caddr_t)&lifr); in i_ipadm_create_linklocal()
215 (void) ioctl(iph->iph_sock6, SIOCSLIFFLAGS, (caddr_t)&lifr); in i_ipadm_create_linklocal()
[all …]
H A Dipadm_ngz.c261 ipstatus = ipadm_create_addr(iph, ipaddr, in i_ipadm_ngz_addr()
384 ipadm_handle_t iph = nwd->ngz_iph; in i_ipadm_zone_network_attr() local
385 int rtsock = iph->iph_rtsock; in i_ipadm_zone_network_attr()
388 boolean_t is_ipmgmtd = (iph->iph_flags & IPH_IPMGMTD); in i_ipadm_zone_network_attr()
422 ipstatus = i_ipadm_ngz_addr(iph, link, (char *)buf); in i_ipadm_zone_network_attr()
454 ipadm_init_net_from_gz(ipadm_handle_t iph, char *ifname, in ipadm_init_net_from_gz() argument
459 dladm_handle_t dlh = iph->iph_dlh; in ipadm_init_net_from_gz()
462 if (iph->iph_zoneid == GLOBAL_ZONEID) in ipadm_init_net_from_gz()
473 nwd.ngz_iph = iph; in ipadm_init_net_from_gz()
474 nwd.ngz_zoneid = iph->iph_zoneid; in ipadm_init_net_from_gz()
[all …]
/illumos-gate/usr/src/uts/common/inet/ip/
H A Dspdsock.c580 IPPH_REFHOLD(iph); in spdsock_flush_node()
613 if (iph != ALL_ACTIVE_POLHEADS && iph != ALL_INACTIVE_POLHEADS) { in spdsock_flush()
1069 ASSERT(itp->itp_policy == iph || itp->itp_inactive == iph); in spdsock_addrule()
1258 ASSERT(iph == itp->itp_policy || iph == itp->itp_inactive); in spdsock_deleterule()
1966 ASSERT(iph != NULL); in spdsock_dump_next_record()
2013 IPPH_REFHOLD(iph); in spdsock_dump_next_record()
2072 if (iph == ALL_ACTIVE_POLHEADS || iph == ALL_INACTIVE_POLHEADS) { in spdsock_dump()
2972 IPPH_REFHOLD(iph); in get_appropriate_polhead()
2975 return (iph); in get_appropriate_polhead()
3105 if (iph == NULL) in spdsock_parse()
[all …]
H A Dspd.c5275 ipha_t *iph = NULL; in ipsec_tun_outbound() local
5316 if (iph == NULL) { in ipsec_tun_outbound()
5320 inner_ipv4 = iph; in ipsec_tun_outbound()
6021 iph->iph_refs = 1; in tunnel_polhead_init()
6022 iph->iph_gen = 0; in tunnel_polhead_init()
6267 ipha_t *iph; in ipsec_fragcache_add() local
6378 ASSERT(iph != NULL); 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()
6717 iph = NULL; in ipsec_fragcache_add()
[all …]
/illumos-gate/usr/src/uts/common/inet/
H A Dipsec_impl.h468 #define IPPH_REFHOLD(iph) { \ argument
469 atomic_inc_32(&(iph)->iph_refs); \
470 ASSERT((iph)->iph_refs != 0); \
472 #define IPPH_REFRELE(iph, ns) { \ argument
473 ASSERT((iph)->iph_refs != 0); \
475 if (atomic_dec_32_nv(&(iph)->iph_refs) == 0) \
476 ipsec_polhead_free(iph, ns); \
477 (iph) = 0; \
545 #define ITP_P_ISACTIVE(itp, iph) ((itp)->itp_flags & \ argument
548 #define ITP_P_ISTUNNEL(itp, iph) ((itp)->itp_flags & \ argument
[all …]
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/ipadm/
H A Dipadm.c364 ipadm_handle_t iph = NULL; variable
400 ipadm_close(iph); in usage()
430 status = ipadm_open(&iph, 0); in main()
441 ipadm_close(iph); in main()
652 status = func(iph, ipmp, ifname, flags); in do_action_ipmp()
979 ipadm_close(iph); in do_show_ifprop()
1146 ipadm_close(iph); in do_show_prop()
1284 ipadm_close(iph); in die()
1614 status = ipadm_create_addr(iph, ipaddr, flags); in do_create_addr()
1710 status = ipadm_up_addr(iph, argv[index], flags); in do_up_addr()
[all …]
/illumos-gate/usr/src/cmd/ipf/tools/
H A Dippool.c225 iphtable_t iph; local
233 bzero((char *)&iph, sizeof(iph));
263 iph.iph_seed = atoi(optarg);
266 type = gettype(optarg, &iph.iph_type);
289 strncpy(iph.iph_name, poolname, sizeof(iph.iph_name));
290 iph.iph_name[sizeof(iph.iph_name) - 1] = '\0';
291 iph.iph_unit = role;
302 err = load_hash(&iph, NULL, ioctl);
312 err = remove_hash(&iph, ioctl);
/illumos-gate/usr/src/stand/lib/inet/
H A Dipv4.c259 struct ip *iph; in frag_load() local
300 iph = (struct ip *)mp->b_rptr; in frag_load()
301 iph->ip_len = htons(total_len); in frag_load()
590 struct ip *iph; in make_trans_datagram() local
623 iph = (struct ip *)igp->igm_mp->b_rptr; in make_trans_datagram()
624 trans_len = ntohs(iph->ip_len); in make_trans_datagram()
1068 struct ip *iph; in ipv4_tcp_output() local
1072 iph = (struct ip *)pkt->b_rptr; in ipv4_tcp_output()
1092 sock_id, inet_ntoa(iph->ip_dst)); in ipv4_tcp_output()
1098 iph->ip_id = htons(++g_ip_id); in ipv4_tcp_output()
[all …]
H A Dipv4_impl.h67 #define IPH_HDR_LENGTH(iph) (((struct ip *)(iph))->ip_hl << 2) argument
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/ilbd/ilb/
H A Dilb_probe.c377 struct ip *iph; in check_icmp_unreach_v4() local
385 iph = (struct ip *)((char *)icmph + ICMP_MINLEN); in check_icmp_unreach_v4()
386 if (iph->ip_p != IPPROTO_UDP) in check_icmp_unreach_v4()
390 udph = (struct udphdr *)((char *)iph + (iph->ip_hl << 2)); in check_icmp_unreach_v4()
432 struct ip *iph; in check_icmp_v4() local
441 iph = (struct ip *)buf; in check_icmp_v4()
443 icmph = (struct icmp *)((char *)iph + (iph->ip_hl << 2)); in check_icmp_v4()
/illumos-gate/usr/src/cmd/fm/modules/common/ip-transport/
H A Dip.c152 ip_hdr_t *iph; in ip_fmdo_send() local
195 iph = (ip_hdr_t *)(uintptr_t)buf; in ip_fmdo_send()
198 bcopy(IP_MAGIC, iph->iph_magic, IP_MAGLEN); in ip_fmdo_send()
199 iph->iph_size = htonl(nvsize); in ip_fmdo_send()
401 ip_hdr_t *iph; in ip_xprt_recv_event() local
407 if ((iph = ip_xprt_recv(ipx, sizeof (ip_hdr_t))) == NULL) in ip_xprt_recv_event()
410 if (bcmp(iph->iph_magic, IP_MAGIC, IP_MAGLEN) != 0) { in ip_xprt_recv_event()
413 iph->iph_magic[0], iph->iph_magic[1], iph->iph_magic[2], in ip_xprt_recv_event()
414 iph->iph_magic[3], IPX_ID(ipx)); in ip_xprt_recv_event()
419 size = ntohl(iph->iph_size); in ip_xprt_recv_event()
/illumos-gate/usr/src/cmd/mdb/common/modules/ip/
H A Dip.c1328 ipha_t iph[1]; in iphdr() local
1338 if (mdb_vread(iph, sizeof (*iph), addr) == -1) { in iphdr()
1365 if ((csum = ipcksum(iph, sizeof (*iph))) != 0) in iphdr()
1368 csum = iph->ipha_hdr_checksum; in iphdr()
1376 iph->ipha_src, iph->ipha_dst, in iphdr()
1378 (off << 3) & 0xffff, iph->ipha_ttl, iph->ipha_protocol, in iphdr()
1394 ip6_t iph[1]; in ip6hdr() local
1404 if (mdb_vread(iph, sizeof (*iph), addr) == -1) { in ip6hdr()
1409 ver = (iph->ip6_vfc & 0xf0) >> 4; in ip6hdr()
1430 &iph->ip6_src, &iph->ip6_dst, in ip6hdr()
[all …]
/illumos-gate/usr/src/cmd/cmd-inet/lib/ipmgmtd/
H A Dipmgmt_main.c93 static ipadm_handle_t iph; variable
326 ipstatus = ipadm_open(&iph, IPH_IPMGMTD); in ipmgmt_ngz_init()
336 (void) ipadm_init_net_from_gz(iph, NULL, in ipmgmt_ngz_init()
338 ipadm_close(iph); in ipmgmt_ngz_init()
/illumos-gate/usr/src/stand/lib/tcp/
H A Dtcp.c245 #define SET_ECT(tcp, iph) \ argument
1800 struct ip *iph; in tcp_verify_cksum() local
1816 iph->ip_ttl = 0; in tcp_verify_cksum()
2614 struct ip *iph; in tcp_rput_data() local
5518 struct ip *iph = NULL; in tcp_xmit_ctl() local
6123 struct ip *iph = NULL; in tcp_xmit_early_reset() local
6196 iph->ip_src = iph->ip_dst; in tcp_xmit_early_reset()
6198 iph->ip_id = 0; in tcp_xmit_early_reset()
6199 iph->ip_ttl = 0; in tcp_xmit_early_reset()
6212 struct ip *iph; in tcp_set_cksum() local
[all …]
/illumos-gate/usr/src/uts/common/inet/sctp/
H A Dsctp_common.c331 ipha_t *iph = (ipha_t *)mp->b_rptr; in sctp_make_mp() local
343 iph->ipha_fragment_offset_and_flags = 0; in sctp_make_mp()
393 ipha_t *iph; in sctp_set_iplen() local
404 iph = (ipha_t *)mp->b_rptr; in sctp_set_iplen()
405 iph->ipha_length = htons(sum); in sctp_set_iplen()
1260 ipha_t *iph; in sctp_get_addrparams() local
1281 iph = (ipha_t *)pkt->b_rptr; in sctp_get_addrparams()
1282 IN6_IPADDR_TO_V4MAPPED(iph->ipha_src, hdrsaddr); in sctp_get_addrparams()
1517 ipha_t *iph; in sctp_secure_restart_check() local
1530 iph = (ipha_t *)pkt->b_rptr; in sctp_secure_restart_check()
[all …]

12