| /trueos/sbin/dhclient/ |
| HD | packet.c | 120 ip.ip_len = htons(sizeof(ip) + sizeof(udp) + len); in assemble_udp_ip_header() 139 ip.ip_len = ntohs(ip.ip_len); in assemble_udp_ip_header() 178 u_int32_t ip_len = (buf[bufix] & 0xf) << 2; in decode_udp_ip_header() local 189 udp = (struct udphdr *)(buf + bufix + ip_len); in decode_udp_ip_header() 193 if (wrapsum(checksum(buf + bufix, ip_len, 0)) != 0) { in decode_udp_ip_header() 204 if (ntohs(ip->ip_len) != buflen) in decode_udp_ip_header() 206 ntohs(ip->ip_len), buflen); in decode_udp_ip_header() 216 data = buf + bufix + ip_len + sizeof(*udp); in decode_udp_ip_header() 258 return (ip_len + sizeof(*udp)); in decode_udp_ip_header()
|
| /trueos/contrib/ipfilter/ipsend/ |
| HD | iptests.c | 152 ip->ip_len = sizeof(*ip) + ntohs(u->uh_ulen); 153 len = ip->ip_len; 230 i = ip->ip_len + 1; 232 for (; i < (ip->ip_len * 2); i++) { 245 ip->ip_len = i; 264 ip->ip_len = i; 273 ip->ip_len = len; 293 ip->ip_len = sizeof(*ip); 301 ip->ip_len = sizeof(*ip); 309 ip->ip_len = sizeof(*ip); [all …]
|
| HD | ipsend.c | 106 ip->ip_len += sizeof(*ic); 215 ip->ip_len = sizeof(*ip); 273 ip->ip_len += sizeof(tcphdr_t); 284 ip->ip_len += sizeof(udphdr_t); 377 ip->ip_len += olen; 387 bcopy(ip + 1, p + hlen, ip->ip_len - hlen); 433 udpcksum(ip, udp, ip->ip_len - (IP_HL(ip) << 2));
|
| HD | ip.c | 130 iplen = ip->ip_len; 131 ip->ip_len = htons(iplen); 207 iplen = ntohs(ip->ip_len) - hlen; 222 ip->ip_len = htons(ts); 261 iplen = ip->ip_len; 290 ip2->ip_len = htons(thlen); 291 ip->ip_len = hlen + thlen; 322 ip->ip_len = (IP_HL(ip) << 2) + thlen;
|
| HD | resend.c | 52 printf("len %d id %d ", ip->ip_len, ip->ip_id); 114 len = ntohs(ip->ip_len);
|
| /trueos/sys/netinet/ |
| HD | ip_fastfwd.c | 170 uint16_t sum, ip_len, ip_off; in ip_fastforward() local 254 ip_len = ntohs(ip->ip_len); in ip_fastforward() 259 if (m->m_pkthdr.len < ip_len) { in ip_fastforward() 267 if (m->m_pkthdr.len > ip_len) { in ip_fastforward() 269 m->m_len = ip_len; in ip_fastforward() 270 m->m_pkthdr.len = ip_len; in ip_fastforward() 272 m_adj(m, ip_len - m->m_pkthdr.len); in ip_fastforward() 487 ip_len = ntohs(ip->ip_len); in ip_fastforward() 503 if ((ifp->if_snd.ifq_len + ip_len / ifp->if_mtu + 1) >= in ip_fastforward() 527 if (ip_len <= mtu || in ip_fastforward()
|
| HD | ip_input.c | 366 uint16_t sum, ip_len; in ip_input() local 377 ip_len = ntohs(ip->ip_len); in ip_input() 443 ip_len = ntohs(ip->ip_len); in ip_input() 444 if (ip_len < hlen) { in ip_input() 455 if (m->m_pkthdr.len < ip_len) { in ip_input() 460 if (m->m_pkthdr.len > ip_len) { in ip_input() 462 m->m_len = ip_len; in ip_input() 463 m->m_pkthdr.len = ip_len; in ip_input() 465 m_adj(m, ip_len - m->m_pkthdr.len); in ip_input() 888 ip->ip_len = htons(ntohs(ip->ip_len) - hlen); in ip_reass() [all …]
|
| HD | ip_output.c | 133 uint16_t ip_len, ip_off; in ip_output() local 170 ip_len = ntohs(ip->ip_len); in ip_output() 447 n = ip_len / mtu + 1; /* how many fragments ? */ in ip_output() 474 if (ip_len > mtu) { in ip_output() 605 if (ip_len <= mtu || in ip_output() 713 uint16_t ip_len, ip_off; in ip_fragment() local 715 ip_len = ntohs(ip->ip_len); in ip_fragment() 788 for (nfrags = 1; off < ip_len; off += len, nfrags++) { in ip_fragment() 823 if (off + len >= ip_len) in ip_fragment() 824 len = ip_len - off; in ip_fragment() [all …]
|
| HD | tcp_lro.c | 169 cs = ip4->ip_len; in tcp_lro_rx_csum_fixup() 171 cs = in_addword(ntohs(ip4->ip_len) - sizeof(*ip4), in tcp_lro_rx_csum_fixup() 253 c = ~ip4->ip_len; in tcp_lro_flush() 262 ip4->ip_len = p_len; in tcp_lro_flush() 383 int error, ip_len, l; in tcp_lro_rx() local 406 ip_len = sizeof(*ip6) + tcp_data_len; in tcp_lro_rx() 424 ip_len = ntohs(ip4->ip_len); in tcp_lro_rx() 425 tcp_data_len = ip_len - sizeof(*ip4); in tcp_lro_rx() 438 l = m->m_pkthdr.len - (ETHER_HDR_LEN + ip_len); in tcp_lro_rx()
|
| HD | udp_usrreq.c | 377 uint16_t len, ip_len; in udp_input() local 434 ip_len = ntohs(ip->ip_len) - iphlen; in udp_input() 435 if (pr == IPPROTO_UDPLITE && (len == 0 || len == ip_len)) { in udp_input() 438 len = ip_len; in udp_input() 441 if (ip_len != len) { in udp_input() 442 if (len > ip_len || len < sizeof(struct udphdr)) { in udp_input() 447 m_adj(m, len - ip_len); in udp_input() 480 uh->uh_ulen : htons(ip_len); in udp_input() 1403 ((struct ip *)ui)->ip_len = htons(sizeof(struct udpiphdr) + len); in udp_output() 1554 ip->ip_len = htons(ntohs(ip->ip_len) - skip); in udp4_espdecap()
|
| HD | ip_options.c | 471 ip->ip_len = htons(ntohs(ip->ip_len) - olen); in ip_stripoptions() 494 if (optlen + ntohs(ip->ip_len) > IP_MAXPACKET) { in ip_insertoptions() 527 ip->ip_len = htons(ntohs(ip->ip_len) + optlen); in ip_insertoptions()
|
| /trueos/sys/netinet/libalias/ |
| HD | alias_proxy.c | 323 if ((int)(ntohs(pip->ip_len) + strlen(buffer)) > maxpacketsize) in ProxyEncodeTcpStream() 333 dlen = ntohs(pip->ip_len) - hlen; in ProxyEncodeTcpStream() 354 AddSeq(lnk, delta + slen, pip->ip_hl, pip->ip_len, tc->th_seq, in ProxyEncodeTcpStream() 362 accumulate = pip->ip_len; in ProxyEncodeTcpStream() 363 pip->ip_len = htons(ntohs(pip->ip_len) + slen); in ProxyEncodeTcpStream() 364 accumulate -= pip->ip_len; in ProxyEncodeTcpStream() 407 memcpy(ptr + OPTION_LEN_BYTES, ptr, ntohs(pip->ip_len) - 20); in ProxyEncodeIpHeader() 436 accumulate += pip->ip_len; in ProxyEncodeIpHeader() 437 pip->ip_len = htons(ntohs(pip->ip_len) + OPTION_LEN_BYTES); in ProxyEncodeIpHeader() 438 accumulate -= pip->ip_len; in ProxyEncodeIpHeader()
|
| HD | alias_ftp.c | 237 tlen = ntohs(pip->ip_len); in AliasHandleFtpOut() 279 tlen = ntohs(pip->ip_len); /* recalc tlen, pkt may in AliasHandleFtpOut() 301 tlen = ntohs(pip->ip_len); in AliasHandleFtpIn() 329 tlen = ntohs(pip->ip_len); /* recalc tlen, pkt may in AliasHandleFtpIn() 677 tlen = ntohs(pip->ip_len); in NewFtpMessage() 748 pip->ip_len, tc->th_seq, tc->th_off); in NewFtpMessage() 758 &pip->ip_len, in NewFtpMessage() 760 pip->ip_len = new_len; in NewFtpMessage()
|
| HD | alias_smedia.c | 255 tlen = ntohs(pip->ip_len); in alias_rtsp_out() 409 AddSeq(lnk, delta + new_dlen - dlen, pip->ip_hl, pip->ip_len, in alias_rtsp_out() 415 &pip->ip_len, in alias_rtsp_out() 417 pip->ip_len = new_len; in alias_rtsp_out() 496 tlen = ntohs(pip->ip_len); in AliasHandleRtspOut()
|
| HD | alias_irc.c | 183 tlen = ntohs(pip->ip_len); in AliasHandleIrcOut() 445 pip->ip_len, tc->th_seq, tc->th_off); in AliasHandleIrcOut() 455 &pip->ip_len, in AliasHandleIrcOut() 457 pip->ip_len = new_len; in AliasHandleIrcOut()
|
| /trueos/sys/netpfil/pf/ |
| HD | pf_norm.c | 366 u_int16_t ip_len = ntohs(ip->ip_len) - ip->ip_hl * 4; in pf_reassemble() local 367 u_int16_t max = ip_len + off; in pf_reassemble() 418 FR_IP_OFF(frep) + ntohs(frep->fr_ip->ip_len) - frep->fr_ip->ip_hl * in pf_reassemble() 423 precut = FR_IP_OFF(frep) + ntohs(frep->fr_ip->ip_len) - in pf_reassemble() 425 if (precut >= ip_len) in pf_reassemble() 432 ip_len -= precut; in pf_reassemble() 433 ip->ip_len = htons(ip_len); in pf_reassemble() 436 for (; frea != NULL && ip_len + off > FR_IP_OFF(frea); in pf_reassemble() 441 aftercut = ip_len + off - FR_IP_OFF(frea); in pf_reassemble() 443 if (aftercut < ntohs(frea->fr_ip->ip_len) - frea->fr_ip->ip_hl in pf_reassemble() [all …]
|
| /trueos/contrib/ipfilter/lib/ |
| HD | ipft_tx.c | 154 mb->mb_len = ntohs(ip->ip_len); 218 ip->ip_len = sizeof(ip_t); 223 ip->ip_len += sizeof(struct tcphdr); 227 ip->ip_len += sizeof(struct udphdr); 231 ip->ip_len += ICMPERR_IPICMPHLEN; 327 ip->ip_len += olen; 336 ip->ip_len = htons(ip->ip_len);
|
| HD | printpacket.c | 37 len = ntohs(ip->ip_len); 75 PRINTF("ip #%d %d(%d) %d", ntohs(ip->ip_id), ntohs(ip->ip_len),
|
| /trueos/sys/contrib/ipfilter/netinet/ |
| HD | ip_fil_freebsd.c | 140 ip->ip_len = htons(ip->ip_len); in ipf_check_wrapper() 148 ip->ip_len = ntohs(ip->ip_len); in ipf_check_wrapper() 442 ip->ip_len = htons(sizeof(struct tcphdr)); 446 ip->ip_len = htons(hlen + sizeof(*tcp2)); 475 fnew.fin_plen = ntohs(ip->ip_len); 698 ip->ip_len = htons(iclen); 857 if (ntohs(ip->ip_len) <= ifp->if_mtu) { 890 for (off = hlen + len; off < ntohs(ip->ip_len); off += len) { 910 if (off + len >= ntohs(ip->ip_len)) 911 len = ntohs(ip->ip_len) - off; [all …]
|
| /trueos/sys/net/ |
| HD | slcompress.c | 325 if (ip->ip_len != cs->cs_ip.ip_len && 326 ntohs(cs->cs_ip.ip_len) == hlen) 341 deltaS == ntohs(cs->cs_ip.ip_len) - hlen) { 349 if (deltaS == ntohs(cs->cs_ip.ip_len) - hlen) { 545 register u_int i = ntohs(cs->cs_ip.ip_len) - cs->cs_hlen; 552 th->th_seq = htonl(ntohl(th->th_seq) + ntohs(cs->cs_ip.ip_len) 588 cs->cs_ip.ip_len = htons(total_len);
|
| /trueos/usr.sbin/ppp/ |
| HD | slcompress.c | 333 if (ip->ip_len != cs->cs_ip.ip_len && in sl_compress_tcp() 334 ntohs(cs->cs_ip.ip_len) == hlen) in sl_compress_tcp() 350 deltaS == ntohs(cs->cs_ip.ip_len) - hlen) { in sl_compress_tcp() 358 if (deltaS == ntohs(cs->cs_ip.ip_len) - hlen) { in sl_compress_tcp() 513 register u_int i = ntohs(cs->cs_ip.ip_len) - cs->cs_hlen; in sl_uncompress_tcp() 521 th->th_seq = htonl(ntohl(th->th_seq) + ntohs(cs->cs_ip.ip_len) in sl_uncompress_tcp() 567 cs->cs_ip.ip_len = htons(len); in sl_uncompress_tcp()
|
| /trueos/contrib/ipfilter/ |
| HD | ip_msnrpc_pxy.c | 103 if (mrh->mrh_dlen > ip->ip_len) 106 if (mrh->mrh_hint > ip->ip_len) 298 slen = ip->ip_len; 299 ip->ip_len = fin->fin_hlen + sizeof(*tcp2); 324 ip->ip_len = slen;
|
| /trueos/contrib/ipfilter/iplang/ |
| HD | iplang_y.y | 708 aip->ah_ip->ip_len += sz; 736 aip->ah_ip->ip_len += inc; 876 ip->ip_len = sizeof(ip_t); in new_packet() 940 ip->ip_len += inc; 990 inc_anipheaders(len - ip->ip_len); 991 ip->ip_len = len; 1312 ip->ip_len = htons(ip->ip_len); in packet_done() 1313 for (i = ntohs(ip->ip_len), j = 0; i; i--, j++, s++) { in packet_done() 1353 ip->ip_len = ntohs(ip->ip_len); in packet_done() 1749 ip->ip_len = htons(ip->ip_len); in end_ipv4() [all …]
|
| /trueos/lib/libstand/ |
| HD | udp.c | 92 ip->ip_len = htons(len); 200 if (n < ntohs(ip->ip_len)) { 204 (int)n, ntohs(ip->ip_len)); 221 ip->ip_len = htons(sizeof(*ip));
|
| /trueos/sbin/natd/ |
| HD | icmp.c | 78 failBytes = failedDgram->ip_len - failHdrLen; in SendNeedFragIcmp() 98 ip->ip_len = htons (sizeof (struct ip) + icmpLen); in SendNeedFragIcmp()
|