/illumos-gate/usr/src/uts/common/io/mac/plugins/ |
H A D | mac_ipv4.c | 143 struct ip *iphp; in mac_ipv4_header() local 157 iphp = (struct ip *)mp->b_rptr; in mac_ipv4_header() 159 bzero(iphp, hdr_len + extra_len); in mac_ipv4_header() 161 bcopy(tmpl_iphp, iphp, hdr_len); in mac_ipv4_header() 164 iphp->ip_off = htons(IP_DF); in mac_ipv4_header() 168 iphp->ip_v = IPVERSION; in mac_ipv4_header() 169 iphp->ip_len = 0; in mac_ipv4_header() 170 iphp->ip_p = (uint8_t)sap; in mac_ipv4_header() 182 struct ip *iphp; in mac_ipv4_header_info() local 187 iphp = (struct ip *)mp->b_rptr; in mac_ipv4_header_info() [all …]
|
/illumos-gate/usr/src/cmd/ipf/lib/ |
H A D | load_hash.c | 24 int load_hash(iphp, list, iocfunc) in load_hash() argument 25 iphtable_t *iphp; in load_hash() 49 op.iplo_unit = iphp->iph_unit; 55 iph.iph_unit = iphp->iph_unit; 56 iph.iph_type = iphp->iph_type; 58 iph.iph_flags = iphp->iph_flags; 61 if (iphp->iph_size == 0) 64 size = iphp->iph_size; 68 iphp->iph_name, "size to match expected use"); 71 iph.iph_seed = iphp->iph_seed; [all …]
|
H A D | remove_hash.c | 18 int remove_hash(iphp, iocfunc) in remove_hash() argument 19 iphtable_t *iphp; in remove_hash() 31 op.iplo_unit = iphp->iph_unit; 32 strncpy(op.iplo_name, iphp->iph_name, sizeof(op.iplo_name)); 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;
|
/illumos-gate/usr/src/stand/lib/inet/ |
H A D | ipv4.c | 694 struct ip *iphp; in ipv4_input() local 721 index, iphp->ip_v); in ipv4_input() 778 index, ntohs(iphp->ip_id), iphp->ip_p, igp, igp->igm_mp, in ipv4_input() 888 ntohs(iphp->ip_id), iplen, iphlen, iphp->ip_p); in ipv4_input() 973 struct ip *iphp; in ipv4_output() local 1001 iphp->ip_v = IPVERSION; in ipv4_output() 1003 iphp->ip_tos = 0; in ipv4_output() 1009 iphp->ip_sum = htons(0); in ipv4_output() 1010 iphp->ip_ttl = ttl; in ipv4_output() 1013 iphp->ip_src = myip; in ipv4_output() [all …]
|
H A D | icmp4.c | 57 icmp4(struct inetgram *igp, struct ip *iphp, uint16_t iphlen, in icmp4() argument 64 icmp_len = ntohs(iphp->ip_len) - iphlen; in icmp4()
|
/illumos-gate/usr/src/uts/common/io/sfxge/ |
H A D | sfxge_tcp.c | 73 struct ip *iphp; in sfxge_pkthdr_parse() local 85 iphp = NULL; in sfxge_pkthdr_parse() 125 iphp = (struct ip *)(mp->b_rptr + off); in sfxge_pkthdr_parse() 126 iphs = iphp->ip_hl * 4; in sfxge_pkthdr_parse() 128 if (iphp->ip_v != IPV4_VERSION) in sfxge_pkthdr_parse() 132 size = ntohs(iphp->ip_len); in sfxge_pkthdr_parse() 142 if (iphp->ip_p == IPPROTO_TCP) { in sfxge_pkthdr_parse() 161 } else if (iphp->ip_p == IPPROTO_UDP) { in sfxge_pkthdr_parse() 180 } else if (iphp->ip_p == IPPROTO_SCTP) { in sfxge_pkthdr_parse() 205 *iphpp = iphp; in sfxge_pkthdr_parse()
|
H A D | sfxge_tx.c | 1637 ntohs(iphp->ip_len)) { in sfxge_tx_qlso_fragment() 1654 iphp->ip_len = htons((iphp->ip_hl << 2) + (thp->th_off << 2) + mss); in sfxge_tx_qlso_fragment() 1669 iphp->ip_id = htons(ip_id); in sfxge_tx_qlso_fragment() 1677 iphp->ip_len = htons((iphp->ip_hl << 2) + in sfxge_tx_qlso_fragment() 2749 struct ip *iphp; in sfxge_tx_packet_add() local 2780 iphp = NULL; in sfxge_tx_packet_add() 2801 iphp == NULL || in sfxge_tx_packet_add() 2830 &iphp->ip_dst.s_addr, in sfxge_tx_packet_add() 2895 if (iphp == NULL) { in sfxge_tx_packet_add() 2901 if (iphp != NULL) { in sfxge_tx_packet_add() [all …]
|
H A D | sfxge_rx.c | 1325 struct ip *iphp; in sfxge_rx_qflow_complete() local 1333 iphp = srfp->srf_iphp; in sfxge_rx_qflow_complete() 1342 iphp->ip_len = htons(srfp->srf_len); in sfxge_rx_qflow_complete() 1365 struct ip *iphp = srpp->srp_iphp; in sfxge_rx_qflow_add() local 1429 srfp->srf_iphp = iphp; in sfxge_rx_qflow_add() 1436 srfp->srf_len = ntohs(iphp->ip_len); in sfxge_rx_qflow_add() 1511 struct ip *iphp; in sfxge_rx_qpacket_coalesce() local 1549 ASSERT(iphp != NULL); in sfxge_rx_qpacket_coalesce() 1601 srpp->srp_iphp = iphp; in sfxge_rx_qpacket_coalesce() 1626 &iphp->ip_src.s_addr, in sfxge_rx_qpacket_coalesce() [all …]
|
/illumos-gate/usr/src/common/inet/ |
H A D | inet_hash.c | 221 ipha_t *iphp; in inet_pkt_hash() local 228 iphp = (ipha_t *)(mp->b_rptr + skip_len); in inet_pkt_hash() 229 if (((unsigned char *)iphp + sizeof (ipha_t) > mp->b_wptr) || in inet_pkt_hash() 230 !OK_32PTR((char *)iphp)) in inet_pkt_hash() 233 proto = iphp->ipha_protocol; in inet_pkt_hash() 234 skip_len += IPH_HDR_LENGTH(iphp); in inet_pkt_hash() 237 ip_fragmented = ntohs(iphp->ipha_fragment_offset_and_flags) & in inet_pkt_hash() 246 uint8_t *ip_src = (uint8_t *)&(iphp->ipha_src); in inet_pkt_hash() 247 uint8_t *ip_dst = (uint8_t *)&(iphp->ipha_dst); in inet_pkt_hash() 255 uint8_t *identp = (uint8_t *)&iphp->ipha_ident; in inet_pkt_hash()
|
/illumos-gate/usr/src/uts/common/io/mac/ |
H A D | mac_util.c | 2074 ipha_t *iphp; in mac_pkt_hash() local 2081 iphp = (ipha_t *)(mp->b_rptr + skip_len); in mac_pkt_hash() 2082 if (((unsigned char *)iphp + sizeof (ipha_t) > mp->b_wptr) || in mac_pkt_hash() 2083 !OK_32PTR((char *)iphp)) in mac_pkt_hash() 2086 proto = iphp->ipha_protocol; in mac_pkt_hash() 2087 skip_len += IPH_HDR_LENGTH(iphp); in mac_pkt_hash() 2090 ip_fragmented = ntohs(iphp->ipha_fragment_offset_and_flags) & in mac_pkt_hash() 2099 uint8_t *ip_src = (uint8_t *)&(iphp->ipha_src); in mac_pkt_hash() 2100 uint8_t *ip_dst = (uint8_t *)&(iphp->ipha_dst); in mac_pkt_hash() 2108 uint8_t *identp = (uint8_t *)&iphp->ipha_ident; in mac_pkt_hash()
|