Home
last modified time | relevance | path

Searched refs:ip_hl (Results 1 – 25 of 723) sorted by relevance

12345678910>>...29

/dports/security/fragrouter/fragrouter-1.6/
H A Dtcp_seg.c54 int len, ip_hl = iph->ip_hl * 4; in tcp_seg_make() local
98 int ip_hl = iph->ip_hl * 4; in tcp_seg_null_payload() local
158 int ip_hl; in tcp_seg_interleave_nulls() local
166 ip_hl = iph->ip_hl * 4; in tcp_seg_interleave_nulls()
188 int ip_hl = iph->ip_hl * 4; in tcp_seg_interleave_syns() local
221 int ip_hl = iph->ip_hl * 4; in tcp_seg_prepend_fakeclose() local
237 memcpy(data, pkt, ip_hl); in tcp_seg_prepend_fakeclose()
254 memcpy(data, pkt, ip_hl); in tcp_seg_prepend_fakeclose()
275 int ip_hl = iph->ip_hl * 4; in tcp_seg_prepend_connection() local
329 int ip_hl = iph->ip_hl * 4; in tcp_seg_prepend_junk() local
[all …]
H A Dmisc.c55 int ip_hl = iph->ip_hl * 4; in misc_linuxipchains() local
70 if (ip_len - ip_hl < hlen) in misc_linuxipchains()
81 memcpy(data, pkt, ip_hl + hlen); in misc_linuxipchains()
97 memcpy(data, pkt, ip_hl + 4); in misc_linuxipchains()
103 new = list_elem(data, ip_hl + 4); in misc_linuxipchains()
109 memcpy(data, pkt, ip_hl); in misc_linuxipchains()
110 memcpy(data + ip_hl, pkt + ip_hl + hlen, ip_len - ip_hl - hlen); in misc_linuxipchains()
130 int ip_hl = iph->ip_hl * 4; in misc_nt4sp2() local
132 u_char *ip_blob = pkt + ip_hl; in misc_nt4sp2()
166 memcpy(data, pkt, ip_hl); in misc_nt4sp2()
[all …]
H A Dip_frag.c67 int ip_hl = iph->ip_hl * 4; in ip_frag_make() local
69 u_char *ip_blob = pkt + ip_hl; in ip_frag_make()
103 if (!(data = malloc(ip_hl + len))) return NULL; in ip_frag_make()
104 memcpy(data, pkt, ip_hl); in ip_frag_make()
105 memcpy(data + ip_hl, p, len); in ip_frag_make()
108 ((struct ip *)data)->ip_len = htons(ip_hl + len); in ip_frag_make()
113 new = list_elem(data, ip_hl + len); in ip_frag_make()
138 int ip_hl = iph->ip_hl * 4; in ip_frag_add_overwrite() local
142 newlen = (ntohs(iph->ip_len) - ip_hl) / 2; in ip_frag_add_overwrite()
147 memcpy(newdata, f->data, ip_hl); in ip_frag_add_overwrite()
[all …]
H A Dprint.c92 u_int ip_off, ip_hl, ip_len; in print_ip() local
100 ip_hl = iph->ip_hl * 4; in print_ip()
138 printf(" (frag %d:%d@%d%s)", ntohs(iph->ip_id), ip_len - ip_hl, in print_ip()
155 udph = (struct udphdr *)(bp + (iph->ip_hl * 4)); in print_udp()
171 icmph = (struct libnet_icmp_hdr *)(bp + (iph->ip_hl * 4)); in print_icmp()
190 tcph = (struct tcphdr *)(bp + (iph->ip_hl * 4)); in print_tcp()
191 len = length - (iph->ip_hl * 4); in print_tcp()
/dports/security/fragrouter/fragrouter-1.6/Libnet-0.99b/src/
H A Dinsert_ipo.c43 u_short s, ip_hl, pad; in insert_ipo() local
49 ip_hl = ip_hdr->ip_hl * 4; in insert_ipo()
54 pad = 4 - (((ip_hl - IP_H) + opt_len) & 3); in insert_ipo()
67 if (s > ip_hl) in insert_ipo()
70 memmove(buf + ip_hl + opt_len + pad, buf + ip_hl, opt_len + pad); in insert_ipo()
77 p = buf + ip_hl; in insert_ipo()
83 ip_hdr->ip_hl += (opt_len + pad) / 4; in insert_ipo()
H A Dchecksum.c42 int ip_hl = iph->ip_hl * 4; in do_checksum() local
49 struct tcphdr *tcph = (struct tcphdr *)(buf + ip_hl); in do_checksum()
60 struct udphdr *udph = (struct udphdr *)(buf + ip_hl); in do_checksum()
71 struct libnet_icmp_hdr *icmph = (struct libnet_icmp_hdr *)(buf + ip_hl); in do_checksum()
80 struct libnet_igmp_hdr *igmph = (struct libnet_igmp_hdr *)(buf + ip_hl); in do_checksum()
/dports/net/libnet/libnet-1.1.6/src/
H A Dlibnet_checksum.c133 if((iphdr+ip_hl+h_len) > end)
137 (int)(end - iphdr), ip_hl, h_len);
190 int ip_hl = 0; local
210 ip_hl = 40;
220 ip_hl = iph_p->ip_hl << 2;
223 if((iphdr+ip_hl) > end)
239 (struct libnet_tcp_hdr *)(iphdr + ip_hl);
293 (struct libnet_udp_hdr *)(iphdr + ip_hl);
357 (struct libnet_igmp_hdr *)(iphdr + ip_hl);
374 (struct libnet_gre_hdr *)(iphdr + ip_hl);
[all …]
/dports/net-mgmt/tcpreplay/tcpreplay-4.3.4/src/tcpedit/
H A Dchecksum.c45 int ip_hl; in do_checksum() local
77 ip_hl = layer - (u_char*)data; in do_checksum()
78 dbgx(3, "ip_hl proto is 0x%d", ip_hl); in do_checksum()
80 payload_len -= (ip_hl - TCPR_IPV6_H); in do_checksum()
82 ip_hl = ipv4->ip_hl << 2; in do_checksum()
92 tcp = (tcp_hdr_t *)(data + ip_hl); in do_checksum()
117 udp = (udp_hdr_t *)(data + ip_hl); in do_checksum()
137 icmp = (icmpv4_hdr_t *)(data + ip_hl); in do_checksum()
152 icmp6 = (icmpv6_hdr_t *)(data + ip_hl); in do_checksum()
165 sum = do_checksum_math((uint16_t *)data, ip_hl); in do_checksum()
/dports/net/thcrut/thcrut-1.2.5/Libnet-1.0.2a/src/
H A Dlibnet_checksum.c70 int ip_hl; in libnet_do_checksum() local
75 ip_hl = iph_p->ip_hl << 2; in libnet_do_checksum()
90 (struct libnet_tcp_hdr *)(buf + ip_hl); in libnet_do_checksum()
107 (struct libnet_udp_hdr *)(buf + ip_hl); in libnet_do_checksum()
119 (struct libnet_icmp_hdr *)(buf + ip_hl); in libnet_do_checksum()
129 (struct libnet_igmp_hdr *)(buf + ip_hl); in libnet_do_checksum()
139 (struct libnet_ospf_hdr *)(buf + ip_hl); in libnet_do_checksum()
141 u_char *payload = (u_char *)(buf + ip_hl + LIBNET_AUTH_H + in libnet_do_checksum()
216 (struct libnet_vrrp_hdr *)(buf + ip_hl); in libnet_do_checksum()
/dports/net/packter-agent/PackterAgent-2.5/src/
H A Dpt_ip.c95 packter_tcp((u_char *)(p + ip->ip_hl * 4), (u_int)(len - ip->ip_hl*4), in packter_ip()
100 packter_udp((u_char *)(p + ip->ip_hl * 4), (u_int)(len - ip->ip_hl*4), in packter_ip()
105 packter_icmp((u_char *)(p + ip->ip_hl * 4), (u_int)(len - ip->ip_hl*4), in packter_ip()
/dports/security/openvas/openvas-scanner-21.4.3/nasl/
H A Dnasl_packet_forgery.c236 ret_int = ip->ip_hl; in get_ip_element()
339 pkt->ip_hl = get_int_var_by_name (lexic, "ip_hl", pkt->ip_hl); in set_ip_elements()
405 hl = ip->ip_hl * 4 < UNFIX (ip->ip_len) ? ip->ip_hl * 4 : UNFIX (ip->ip_len); in insert_ip_options()
430 new_packet->ip_hl = in insert_ip_options()
593 if (ipsz > ip->ip_hl * 4) in forge_tcp_packet()
594 ipsz = ip->ip_hl * 4; in forge_tcp_packet()
692 if (ip->ip_hl * 4 > ipsz) in get_tcp_element()
855 if (ip->ip_hl * 4 > ipsz) in get_tcp_option()
967 if (ip->ip_hl * 4 > pktsz) in set_tcp_elements()
1239 if (ip->ip_hl * 4 > pktsz) in insert_tcp_options()
[all …]
/dports/net/ipdecap/ipdecap-0.7.2/src/
H A Dipdecap.c209 int ip_hl = 0; in process_ipip_packet() local
224 (ip_hdr->ip_hl *4), ntohs(ip_hdr->ip_len), ip_hdr->ip_p); in process_ipip_packet()
227 ip_hl = ip_hdr->ip_hl; in process_ipip_packet()
228 if (ip_hl < 5) { in process_ipip_packet()
234 payload_src += ip_hl *4; in process_ipip_packet()
238 (ip_hdr->ip_hl *4), ntohs(ip_hdr->ip_len), ip_hdr->ip_p); in process_ipip_packet()
278 packet_size = in_payload_len - (ip_hdr->ip_hl *4); in process_ipv6_packet()
284 payload_src += ip_hdr->ip_hl *4; in process_ipv6_packet()
316 payload_src += (ip_hdr->ip_hl *4); in process_gre_packet()
319 (ip_hdr->ip_hl *4), ntohs(ip_hdr->ip_len), ip_hdr->ip_p); in process_gre_packet()
[all …]
/dports/security/nmap/nmap-7.91/libdnet-stripped/src/
H A Dip-cooked.c188 int ip_hl, fraglen; in ip_send() local
190 ip_hl = iph->ip_hl << 2; in ip_send()
191 fraglen = ipi->mtu - ip_hl; in ip_send()
194 memcpy(iph, buf, ip_hl); in ip_send()
195 ip_data = (u_char *)iph + ip_hl; in ip_send()
197 start = (u_char *)buf + ip_hl; in ip_send()
203 iph->ip_len = htons(ip_hl + fraglen); in ip_send()
207 ip_checksum(iph, ip_hl + fraglen); in ip_send()
209 i = ETH_HDR_LEN + ip_hl + fraglen; in ip_send()
/dports/net/zmap/zmap-2.1.1/src/probe_modules/
H A Dmodule_icmp_echo.c97 if (((uint32_t) 4 * ip_hdr->ip_hl + ICMP_SMALLEST_SIZE) > len) { in icmp_validate_packet()
102 struct icmp *icmp_h = (struct icmp *) ((char *) ip_hdr + 4*ip_hdr->ip_hl); in icmp_validate_packet()
111 if ((4*ip_hdr->ip_hl + ICMP_TIMXCEED_UNREACH_HEADER_SIZE + in icmp_validate_packet()
117 if (((uint32_t) 4 * ip_hdr->ip_hl + ICMP_TIMXCEED_UNREACH_HEADER_SIZE + in icmp_validate_packet()
118 4*ip_inner->ip_hl + 8 /*1st 8 bytes of original*/ ) > len) { in icmp_validate_packet()
122 struct icmp *icmp_inner = (struct icmp *)((char *) ip_inner + 4*ip_hdr->ip_hl); in icmp_validate_packet()
142 struct icmp *icmp_hdr = (struct icmp *) ((char *) ip_hdr + 4*ip_hdr->ip_hl); in icmp_echo_process_packet()
H A Dmodule_icmp_echo_time.c111 if (((uint32_t) 4 * ip_hdr->ip_hl + ICMP_SMALLEST_SIZE) > len) { in icmp_validate_packet()
116 struct icmp *icmp_h = (struct icmp *) ((char *) ip_hdr + 4*ip_hdr->ip_hl); in icmp_validate_packet()
124 if ((4*ip_hdr->ip_hl + ICMP_TIMXCEED_UNREACH_HEADER_SIZE + in icmp_validate_packet()
130 if (((uint32_t) 4 * ip_hdr->ip_hl + ICMP_TIMXCEED_UNREACH_HEADER_SIZE + in icmp_validate_packet()
131 4*ip_inner->ip_hl + 8 /*1st 8 bytes of original*/ ) > len) { in icmp_validate_packet()
151 struct icmp *icmp_hdr = (struct icmp *) ((char *) ip_hdr + 4*ip_hdr->ip_hl); in icmp_echo_process_packet()
/dports/net/dante/dante-1.4.3/sockd/
H A Dsockd_icmp.c129 ip->ip_hl = MIN_IPHLEN >> 2; /* number of 32bit words. */
142 udp = (struct udphdr *)((char *)icmp + 8 + (ip->ip_hl << 2));
223 if (r < (ip->ip_hl << 2)) {
229 (unsigned)(ip->ip_hl << 2),
236 icmp = (struct icmp *)(packet.data + (ip->ip_hl << 2));
237 if (r - (ip->ip_hl << 2) < MIN_ICMPUNREACHLEN) {
243 (long)(r - (ip->ip_hl << 2)),
265 (unsigned long)(ip->ip_hl << 2),
266 (unsigned long)(r - (ip->ip_hl << 2)));
278 udp = (struct udphdr *)((char *)ip + (ip->ip_hl << 2));
/dports/security/fragroute/fragroute-1.2/
H A Dmod_print.c30 icmp = (struct icmp_hdr *)(p + (ip->ip_hl * 4)); in _print_icmp()
48 tcp = (struct tcp_hdr *)(p + (ip->ip_hl * 4)); in _print_tcp()
49 len = length - (ip->ip_hl * 4); in _print_tcp()
227 udp = (struct udp_hdr *)(p + (ip->ip_hl * 4)); in _print_udp()
240 u_int ip_off, ip_hl, ip_len; in _print_ip() local
248 ip_hl = ip->ip_hl * 4; in _print_ip()
281 printf(" (frag %d:%d@%d%s)", ntohs(ip->ip_id), ip_len - ip_hl, in _print_ip()
/dports/net/hostapd-devel/hostap-14ab4a816/wlantest/
H A Drx_ip.c143 if (ip.ip_hl * 4 < sizeof(ip)) { in rx_data_ip()
146 " dst=" MACSTR ")", ip.ip_hl, MAC2STR(bssid), in rx_data_ip()
150 if (ip.ip_hl * 4 > len) { in rx_data_ip()
153 " dst=" MACSTR ")", ip.ip_hl, (unsigned) len, in rx_data_ip()
173 payload = data + 4 * ip.ip_hl; in rx_data_ip()
174 plen = len - 4 * ip.ip_hl; in rx_data_ip()
/dports/security/wpa_supplicant-devel/hostap-14ab4a816/wlantest/
H A Drx_ip.c143 if (ip.ip_hl * 4 < sizeof(ip)) { in rx_data_ip()
146 " dst=" MACSTR ")", ip.ip_hl, MAC2STR(bssid), in rx_data_ip()
150 if (ip.ip_hl * 4 > len) { in rx_data_ip()
153 " dst=" MACSTR ")", ip.ip_hl, (unsigned) len, in rx_data_ip()
173 payload = data + 4 * ip.ip_hl; in rx_data_ip()
174 plen = len - 4 * ip.ip_hl; in rx_data_ip()
/dports/dns/pdnsd/pdnsd-1.2.9a/src/
H A Dicmp.c83 # define ip_hl ihl macro
147 if (iph.ip_p!=IPPROTO_ICMP || elen<iph.ip_hl*4+ICMP_BASEHDR_LEN+sizeof(eiph)) in icmp4_errcmp()
150 memcpy(&icmph,errmsg+iph.ip_hl*4,ICMP_BASEHDR_LEN); in icmp4_errcmp()
151 memcpy(&eiph,errmsg+iph.ip_hl*4+ICMP_BASEHDR_LEN,sizeof(eiph)); in icmp4_errcmp()
152 if (elen<iph.ip_hl*4+ICMP_BASEHDR_LEN+eiph.ip_hl*4+8) in icmp4_errcmp()
154 data=errmsg+iph.ip_hl*4+ICMP_BASEHDR_LEN+eiph.ip_hl*4; in icmp4_errcmp()
288 if (len-iph.ip_hl*4>=ICMP_BASEHDR_LEN) { in ping4()
291 memcpy(&icmpp, ((uint32_t *)buf)+iph.ip_hl, sizeof(icmpp)); in ping4()
/dports/net/ngrep/ngrep-1.45/
H A Dngrep.c662 uint32_t ip_hl = 0; in process() local
689 #undef ip_hl in process()
690 ip_hl = ip4_pkt->ip_ff.ip_fhl * 4; in process()
692 ip_hl = ip4_pkt->ip_hl * 4; in process()
707 ip_hl = sizeof(struct ip6_hdr); in process()
714 ip_hl += sizeof(struct ip6_frag); in process()
739 len -= link_offset + ip_hl + tcphdr_offset; in process()
761 len -= link_offset + ip_hl + udphdr_offset; in process()
818 len -= link_offset + ip_hl + igmphdr_offset; in process()
829 data = (unsigned char *)(ip4_pkt) + ip_hl; in process()
[all …]
/dports/net/ipsumdump/ipsumdump-1.86/src/
H A Dipsumdump_ip.cc94 if (!d.iph || (d.iph->ip_hl > 5 && network_length < (uint32_t)(d.iph->ip_hl << 2))) in ip_extract()
96 if (d.iph->ip_hl <= 5) in ip_extract()
113 d.v = d.iph->ip_hl << 2; in ip_extract()
179 if (d.p->network_length() < ip_hl) { in ip_inject()
184 if (ip_hl > (int) (iph->ip_hl << 2)) { in ip_inject()
185 d.p->set_ip_header(iph, ip_hl); in ip_inject()
186 iph->ip_hl = ip_hl >> 2; in ip_inject()
190 IPOPT_EOL, ip_hl - olen); in ip_inject()
196 if ((int) d.v > (int) (iph->ip_hl << 2)) { in ip_inject()
197 int more = d.v - (iph->ip_hl << 2); in ip_inject()
[all …]
/dports/security/fragrouter/fragrouter-1.6/Libnet-0.99b/test/Random/
H A Dhook.c28 - if ((ip->ip_hl != (sizeof (*ip) >> 2) && inp->inp_options) ||
33 + if ((ip->ip_hl != (sizeof (*ip) >> 2) && inp->inp_options)
35 + || (ip->ip_len < ip->ip_hl << 2)) {
/dports/net/glflow/glFlow-0.1/
H A Dmain.cpp197 #undef ip_hl in handlePacket()
198 unsigned ip_hl = ipLayer.ip_ff.ip_fhl * 4; in handlePacket() local
200 unsigned ip_hl = ipLayer.ip_hl * 4; in handlePacket() local
210 struct tcphdr& tcp = *((struct tcphdr*)(((char*)&ipLayer) + ip_hl)); in handlePacket()
235 struct udphdr& udp = *((struct udphdr*)(((char*)&ipLayer) + ip_hl)); in handlePacket()
260 struct icmp& icmp = *((struct icmp*)(((char*)&ipLayer) + ip_hl)); in handlePacket()
/dports/net/sngrep/sngrep-1.4.9/src/
H A Dcapture.c427 uint32_t ip_hl = 0; in capture_packet_reasm_ip() local
501 ip_hl = ip4->ip_hl * 4; in capture_packet_reasm_ip()
515 ip_hl = sizeof(struct ip6_hdr); in capture_packet_reasm_ip()
537 *size = *caplen - link_hl - ip_hl; in capture_packet_reasm_ip()
568 pkt->ip_cap_len += ip_len - ip_hl; in capture_packet_reasm_ip()
575 pkt->ip_exp_len = ip_frag_off + ip_len - ip_hl; in capture_packet_reasm_ip()
585 len_data += ntohs(frame_ip->ip_len) - frame_ip->ip_hl * 4; in capture_packet_reasm_ip()
593 memset(packet, 0, link_hl + ip_hl + len_data); in capture_packet_reasm_ip()
600 frame->data + link_hl + frame_ip->ip_hl * 4, in capture_packet_reasm_ip()
601 ntohs(frame_ip->ip_len) - frame_ip->ip_hl * 4); in capture_packet_reasm_ip()
[all …]

12345678910>>...29