Home
last modified time | relevance | path

Searched refs:ip_header (Results 1 – 25 of 187) sorted by relevance

12345678

/dports/net/serveez/serveez-0.2.2/src/libserveez/
H A Draw-socket.c155 svz_ip_header_t *ip_header; in svz_raw_check_ip_header() local
158 ip_header = unpack_header (data); in svz_raw_check_ip_header()
174 IP_HDR_VERSION (ip_header), IP_HDR_LENGTH (ip_header), in svz_raw_check_ip_header()
175 ip_header->tos, ip_header->length, ip_header->ident, in svz_raw_check_ip_header()
176 IP_HDR_FLAGS (ip_header), in svz_raw_check_ip_header()
179 IP_HDR_FRAG (ip_header), ip_header->ttl, ip_header->protocol, in svz_raw_check_ip_header()
180 ip_header->checksum, svz_inet_ntoa (ip_header->src)); in svz_raw_check_ip_header()
205 if (ip_header->length < len) in svz_raw_check_ip_header()
219 ip_header->protocol); in svz_raw_check_ip_header()
226 ip_header->checksum) in svz_raw_check_ip_header()
[all …]
/dports/net-mgmt/dhcdrop/dhcdrop-0.5/src/
H A Dnet_functions.c78 header->ip_header.ihl = IP_HDR_LEN; in assemble_net_header_dhcp()
79 header->ip_header.version = 4; in assemble_net_header_dhcp()
80 header->ip_header.tos = 0x10; in assemble_net_header_dhcp()
82 header->ip_header.id = (uint16_t) rand(); in assemble_net_header_dhcp()
83 header->ip_header.frag_off = 0; in assemble_net_header_dhcp()
84 header->ip_header.ttl = DEF_TTL; in assemble_net_header_dhcp()
85 header->ip_header.protocol = IPPROTO_UDP; in assemble_net_header_dhcp()
86 header->ip_header.check = 0; in assemble_net_header_dhcp()
87 header->ip_header.saddr = src_ip; in assemble_net_header_dhcp()
89 header->ip_header.daddr = dst_ip; in assemble_net_header_dhcp()
[all …]
/dports/net/scapy/scapy-2.4.5/scapy/layers/
H A Dipsec.py933 ip_header.len = len(ip_header) + len(esp)
935 ip_header = ip_header.__class__(raw(ip_header))
937 ip_header.plen = len(ip_header.payload) + len(esp)
981 ip_header.len = len(ip_header) + len(ah) + len(payload)
983 ip_header = ip_header.__class__(raw(ip_header))
1058 ip_header.len = len(ip_header) + len(esp.data)
1060 ip_header = ip_header.__class__(raw(ip_header))
1064 ip_header.plen = len(ip_header.payload) + len(esp.data)
1092 ip_header.len = len(ip_header) + len(payload)
1094 ip_header = ip_header.__class__(raw(ip_header))
[all …]
/dports/graphics/O2-tools/O2-tools-2.01/libsrc/libufp/
H A DipIO.cpp64 } ip_header; member in IPLOAD
146 if ( 1 != fread((char *)&ip_header,sizeof(ip_header),1,fp) ){ in fileopen()
151 wordswap(&ip_header.width_bytes); in fileopen()
152 wordswap(&ip_header.height); in fileopen()
158 wordswap(&ip_header.height); in fileopen()
165 if ( (ip_header.width_bytes == 0) || (ip_header.height == 0) ) eflag = -1; in fileopen()
170 height = (int)ip_header.height; in fileopen()
250 } ip_header; member in IPSAVE
326 ip_header.width_bytes = linebytes; in filecreat()
327 ip_header.height = height; in filecreat()
[all …]
/dports/www/qt5-webengine/qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/net/third_party/quiche/src/quic/qbone/platform/
H A Dicmp_packet.cc25 ip6_hdr ip_header; member
50 icmp_packet.ip_header.ip6_vfc = 0x6 << 4; in CreateIcmpPacket()
52 icmp_packet.ip_header.ip6_plen = in CreateIcmpPacket()
54 icmp_packet.ip_header.ip6_nxt = IPPROTO_ICMPV6; in CreateIcmpPacket()
55 icmp_packet.ip_header.ip6_hops = kIcmpTtl; in CreateIcmpPacket()
57 icmp_packet.ip_header.ip6_src = src; in CreateIcmpPacket()
58 icmp_packet.ip_header.ip6_dst = dst; in CreateIcmpPacket()
69 checksum.Update(icmp_packet.ip_header.ip6_src.s6_addr, kIPv6AddressSize); in CreateIcmpPacket()
70 checksum.Update(icmp_packet.ip_header.ip6_dst.s6_addr, kIPv6AddressSize); in CreateIcmpPacket()
H A Dtcp_packet.cc21 ip6_hdr ip_header; member
62 tcp_packet.ip_header.ip6_vfc = 0x6 << 4; in CreateTcpResetPacket()
64 tcp_packet.ip_header.ip6_plen = in CreateTcpResetPacket()
66 tcp_packet.ip_header.ip6_nxt = IPPROTO_TCP; in CreateTcpResetPacket()
67 tcp_packet.ip_header.ip6_hops = kTcpTtl; in CreateTcpResetPacket()
70 tcp_packet.ip_header.ip6_src = ip6_header->ip6_dst; in CreateTcpResetPacket()
71 tcp_packet.ip_header.ip6_dst = ip6_header->ip6_src; in CreateTcpResetPacket()
112 checksum.Update(tcp_packet.ip_header.ip6_src.s6_addr, kIPv6AddressSize); in CreateTcpResetPacket()
113 checksum.Update(tcp_packet.ip_header.ip6_dst.s6_addr, kIPv6AddressSize); in CreateTcpResetPacket()
/dports/www/chromium-legacy/chromium-88.0.4324.182/net/third_party/quiche/src/quic/qbone/platform/
H A Dicmp_packet.cc25 ip6_hdr ip_header; member
49 icmp_packet.ip_header.ip6_vfc = 0x6 << 4; in CreateIcmpPacket()
51 icmp_packet.ip_header.ip6_plen = in CreateIcmpPacket()
53 icmp_packet.ip_header.ip6_nxt = IPPROTO_ICMPV6; in CreateIcmpPacket()
54 icmp_packet.ip_header.ip6_hops = kIcmpTtl; in CreateIcmpPacket()
56 icmp_packet.ip_header.ip6_src = src; in CreateIcmpPacket()
57 icmp_packet.ip_header.ip6_dst = dst; in CreateIcmpPacket()
68 checksum.Update(icmp_packet.ip_header.ip6_src.s6_addr, kIPv6AddressSize); in CreateIcmpPacket()
69 checksum.Update(icmp_packet.ip_header.ip6_dst.s6_addr, kIPv6AddressSize); in CreateIcmpPacket()
H A Dtcp_packet.cc21 ip6_hdr ip_header; member
61 tcp_packet.ip_header.ip6_vfc = 0x6 << 4; in CreateTcpResetPacket()
63 tcp_packet.ip_header.ip6_plen = in CreateTcpResetPacket()
65 tcp_packet.ip_header.ip6_nxt = IPPROTO_TCP; in CreateTcpResetPacket()
66 tcp_packet.ip_header.ip6_hops = kTcpTtl; in CreateTcpResetPacket()
69 tcp_packet.ip_header.ip6_src = ip6_header->ip6_dst; in CreateTcpResetPacket()
70 tcp_packet.ip_header.ip6_dst = ip6_header->ip6_src; in CreateTcpResetPacket()
111 checksum.Update(tcp_packet.ip_header.ip6_src.s6_addr, kIPv6AddressSize); in CreateTcpResetPacket()
112 checksum.Update(tcp_packet.ip_header.ip6_dst.s6_addr, kIPv6AddressSize); in CreateTcpResetPacket()
/dports/net/zmap/zmap-2.1.1/src/probe_modules/
H A Dmodule_tcp_synscan.c39 struct ip *ip_header = (struct ip*)(&eth_header[1]); in synscan_init_perthread() local
41 make_ip_header(ip_header, IPPROTO_TCP, len); in synscan_init_perthread()
42 struct tcphdr *tcp_header = (struct tcphdr*)(&ip_header[1]); in synscan_init_perthread()
51 struct ip *ip_header = (struct ip*)(&eth_header[1]); in synscan_make_packet() local
52 struct tcphdr *tcp_header = (struct tcphdr*)(&ip_header[1]); in synscan_make_packet()
55 ip_header->ip_src.s_addr = src_ip; in synscan_make_packet()
56 ip_header->ip_dst.s_addr = dst_ip; in synscan_make_packet()
63 ip_header->ip_src.s_addr, ip_header->ip_dst.s_addr, tcp_header); in synscan_make_packet()
65 ip_header->ip_sum = 0; in synscan_make_packet()
66 ip_header->ip_sum = zmap_ip_checksum((unsigned short *) ip_header); in synscan_make_packet()
H A Dmodule_icmp_echo.c38 struct ip *ip_header = (struct ip *) (&eth_header[1]); in icmp_echo_init_perthread() local
40 make_ip_header(ip_header, IPPROTO_ICMP, len); in icmp_echo_init_perthread()
42 struct icmp *icmp_header = (struct icmp*)(&ip_header[1]); in icmp_echo_init_perthread()
53 struct ip *ip_header = (struct ip *)(&eth_header[1]); in icmp_echo_make_packet() local
54 struct icmp *icmp_header = (struct icmp*)(&ip_header[1]); in icmp_echo_make_packet()
57 ip_header->ip_src.s_addr = src_ip; in icmp_echo_make_packet()
58 ip_header->ip_dst.s_addr = dst_ip; in icmp_echo_make_packet()
64 ip_header->ip_sum = 0; in icmp_echo_make_packet()
65 ip_header->ip_sum = zmap_ip_checksum((unsigned short *) ip_header); in icmp_echo_make_packet()
H A Dmodule_icmp_echo_time.c46 struct ip *ip_header = (struct ip *) (&eth_header[1]); in icmp_echo_init_perthread() local
48 make_ip_header(ip_header, IPPROTO_ICMP, len); in icmp_echo_init_perthread()
50 struct icmp *icmp_header = (struct icmp*)(&ip_header[1]); in icmp_echo_init_perthread()
61 struct ip *ip_header = (struct ip *)(&eth_header[1]); in icmp_echo_make_packet() local
62 struct icmp *icmp_header = (struct icmp*)(&ip_header[1]); in icmp_echo_make_packet()
67 ip_header->ip_src.s_addr = src_ip; in icmp_echo_make_packet()
68 ip_header->ip_dst.s_addr = dst_ip; in icmp_echo_make_packet()
80 ip_header->ip_sum = 0; in icmp_echo_make_packet()
81 ip_header->ip_sum = zmap_ip_checksum((unsigned short *) ip_header); in icmp_echo_make_packet()
H A Dmodule_ntp.c35 struct ip *ip_header = (struct ip*) (&eth_header[1]); in ntp_make_packet() local
36 struct udphdr *udp_header = (struct udphdr *) &ip_header[1]; in ntp_make_packet()
39 ip_header->ip_src.s_addr = src_ip; in ntp_make_packet()
40 ip_header->ip_dst.s_addr = dst_ip; in ntp_make_packet()
42 ip_header->ip_sum = 0; in ntp_make_packet()
43 ip_header->ip_sum = zmap_ip_checksum((unsigned short *) ip_header); in ntp_make_packet()
184 struct ip *ip_header = (struct ip*)(&eth_header[1]); in ntp_init_perthread() local
186 make_ip_header(ip_header, IPPROTO_UDP, len); in ntp_init_perthread()
188 struct udphdr *udp_header = (struct udphdr*)(&ip_header[1]); in ntp_init_perthread()
H A Dmodule_udp.c233 struct ip *ip_header = (struct ip*)(&eth_header[1]); in udp_init_perthread() local
235 make_ip_header(ip_header, IPPROTO_UDP, len); in udp_init_perthread()
237 struct udphdr *udp_header = (struct udphdr*)(&ip_header[1]); in udp_init_perthread()
260 struct ip *ip_header = (struct ip*) (&eth_header[1]); in udp_make_packet() local
261 struct udphdr *udp_header= (struct udphdr *) &ip_header[1]; in udp_make_packet()
264 ip_header->ip_src.s_addr = src_ip; in udp_make_packet()
265 ip_header->ip_dst.s_addr = dst_ip; in udp_make_packet()
280 …payload_len = udp_template_build(udp_template, payload, MAX_UDP_PAYLOAD_LEN, ip_header, udp_header… in udp_make_packet()
289 ip_header->ip_len = htons(sizeof(struct ip) + sizeof(struct udphdr) + payload_len); in udp_make_packet()
293 ip_header->ip_sum = 0; in udp_make_packet()
[all …]
/dports/comms/uhd/uhd-90ce6062b6b5df2eddeee723777be85108e4e7c7/tools/uhd_dump/
H A Duhd_dump.c275 const struct ip_header *ip_header; in print_direction() local
278 ip_header = (struct ip_header *)(packet_buffer->current->payload+ETH_SIZE); in print_direction()
280 …if ((host_addr->s_addr == ip_header->ip_src.s_addr) && (usrp_addr->s_addr == ip_header->ip_dst.s_a… in print_direction()
282 …else if ((host_addr->s_addr == ip_header->ip_dst.s_addr) && (usrp_addr->s_addr == ip_header->ip_s… in print_direction()
345 const struct ip_header *ip_header; in print_vita_header() local
358 ip_header = (struct ip_header *)(packet_buffer->current->payload+ETH_SIZE); in print_vita_header()
480 const struct ip_header *ip_header; in get_connection_endpoints() local
495 ip_header = (struct ip_header *)(packet_buffer->current->payload+ETH_SIZE); in get_connection_endpoints()
524 host_addr->s_addr = ip_header->ip_src.s_addr; in get_connection_endpoints()
525 usrp_addr->s_addr = ip_header->ip_dst.s_addr; in get_connection_endpoints()
[all …]
H A Dchdr_log.c53 const struct ip_header *ip_header; in main() local
163 ip_header = (struct ip_header *)(packet_buffer->current->payload+ETH_SIZE); in main()
166 if (ip_header->ip_src.s_addr == host_addr.s_addr) in main()
/dports/net/nmsg/nmsg-1.0.1/nmsg/base/
H A Dipreasm.c389 unsigned i, hl = 4 * ip_header->ip_hl; in reasm_assemble()
392 ip_header->ip_off = 0; in reasm_assemble()
393 ip_header->ip_sum = 0; in reasm_assemble()
404 ip_header->ip_sum = htons(~sum); in reasm_assemble()
602 switch (ip_header->ip_v) { in reasm_parse_packet()
604 uint16_t offset = ntohs(ip_header->ip_off); in reasm_parse_packet()
617 pl_hl = ip_header->ip_hl * 4; in reasm_parse_packet()
618 pl_len = ntohs(ip_header->ip_len); in reasm_parse_packet()
627 frag->data_offset = ip_header->ip_hl * 4; in reasm_parse_packet()
634 id->ipv4.ip_id = ntohs(ip_header->ip_id); in reasm_parse_packet()
[all …]
/dports/net-mgmt/sendip/sendip-2.5/
H A Dipv4.c29 ip_header *ip = (ip_header *)ip_hdr->data; in ipcsum()
97 ip_header *ip = malloc(sizeof(ip_header)); in initialize()
98 memset(ip,0,sizeof(ip_header)); in initialize()
99 ret->alloc_len = sizeof(ip_header); in initialize()
106 ip_header *ip = (ip_header *)pack->data; in set_addr()
123 ip_header *iph = (ip_header *)pack->data; in do_opt()
422 ip_header *iph = (ip_header *)pack->data; in finalize()
/dports/net/nmsg/nmsg-1.0.1/nmsg/
H A Dipreasm.c457 unsigned i, hl = 4 * ip_header->ip_hl; in assemble()
460 ip_header->ip_off = 0; in assemble()
461 ip_header->ip_sum = 0; in assemble()
472 ip_header->ip_sum = htons (~sum); in assemble()
688 switch (ip_header->ip_v) { in parse_packet()
690 uint16_t offset = ntohs (ip_header->ip_off); in parse_packet()
703 pl_hl = ip_header->ip_hl * 4; in parse_packet()
704 pl_len = ntohs (ip_header->ip_len); in parse_packet()
713 frag->data_offset = ip_header->ip_hl * 4; in parse_packet()
720 id->ipv4.ip_id = ntohs (ip_header->ip_id); in parse_packet()
[all …]
/dports/net-mgmt/ettercap/ettercap-0.8.3.1/src/protocols/
H A Dec_ip.c33 struct ip_header { struct
103 struct ip_header *ip; in FUNC_DECODER()
110 ip = (struct ip_header *)DECODE_DATA; in FUNC_DECODER()
136 if ( (u_int32)(ip->ihl * 4) > sizeof(struct ip_header)) { in FUNC_DECODER()
137 PACKET->L3.options = (u_char *)(DECODE_DATA) + sizeof(struct ip_header); in FUNC_DECODER()
138 PACKET->L3.optlen = (u_int32)(ip->ihl * 4) - sizeof(struct ip_header); in FUNC_DECODER()
272 struct ip_header *iph; in FUNC_INJECTOR()
277 if (LENGTH + sizeof(struct ip_header) > EC_GBL_IFACE->mtu) in FUNC_INJECTOR()
281 PACKET->packet -= sizeof(struct ip_header); in FUNC_INJECTOR()
284 iph = (struct ip_header *)PACKET->packet; in FUNC_INJECTOR()
[all …]
/dports/net/tcpflow/tcpflow-1.5.0/src/
H A Dtcpdemux.cpp581 const struct be13::ip4 *ip_header = (struct be13::ip4 *) pi.ip_data; in process_ip4() local
590 if (ip_header->ip_p != IPPROTO_TCP) { in process_ip4()
591 DEBUG(50) ("got non-TCP frame -- IP proto %d", ip_header->ip_p); in process_ip4()
599 size_t ip_len = ntohs(ip_header->ip_len); in process_ip4()
608 if (ntohs(ip_header->ip_off) & 0x1fff) { in process_ip4()
614 size_t ip_header_len = ip_header->ip_hl * 4; in process_ip4()
624 ipaddr src(ip_header->ip_src.addr); in process_ip4()
625 ipaddr dst(ip_header->ip_dst.addr); in process_ip4()
651 if (ip_header->ip6_ctlun.ip6_un1.ip6_un1_nxt != IPPROTO_TCP) { in process_ip6()
658 ipaddr src(ip_header->ip6_src.addr.addr8); in process_ip6()
[all …]
/dports/net/tcptrace/tcptrace-508f73a/
H A Dnlanr.c125 struct ip ip_header; member
165 *plen = hdr.ip_header.ip_len; in pread_nlanr()
169 *ppip = &hdr.ip_header; in pread_nlanr()
220 if (((tf.ip_header.ip_v != 4) && (tf.ip_header.ip_v != 6)) in is_nlanr()
/dports/net/hexinject/hexinject/
H A Dhexpcap.h97 void do_cksum_ipv4_ipv6_next_protocol (uint8_t next_protocol, uint8_t *ip_header, uint8_t *raw, siz… in do_cksum_ipv4_ipv6_next_protocol() argument
103 ip_version = ip_header[0] >> 4; in do_cksum_ipv4_ipv6_next_protocol()
128 (uint16_t *) &ip_header[12], in do_cksum_ipv4_ipv6_next_protocol()
129 (uint16_t *) &ip_header[16], in do_cksum_ipv4_ipv6_next_protocol()
133 (uint16_t *) &ip_header[8], in do_cksum_ipv4_ipv6_next_protocol()
134 (uint16_t *) &ip_header[24], in do_cksum_ipv4_ipv6_next_protocol()
/dports/emulators/qemu60/qemu-6.0.0/net/
H A Deth.c52 struct ip_header *iphdr = (struct ip_header *) l3_hdr; in eth_get_gso_type()
122 const struct ip_header *ip4_hdr, in _eth_tcp_has_data()
162 struct ip_header *iphdr = &ip4hdr_info->ip4_hdr; in eth_get_protocols()
330 struct ip_header *iphdr = (struct ip_header *) l3hdr; in eth_setup_ip4_fragmentation()
347 struct ip_header *iphdr = (struct ip_header *) l3hdr; in eth_fix_ip4_checksum()
353 eth_calc_ip4_pseudo_hdr_csum(struct ip_header *iphdr, in eth_calc_ip4_pseudo_hdr_csum()
/dports/emulators/qemu42/qemu-4.2.1/net/
H A Deth.c51 struct ip_header *iphdr = (struct ip_header *) l3_hdr; in eth_get_gso_type()
122 const struct ip_header *ip4_hdr, in _eth_tcp_has_data()
162 struct ip_header *iphdr = &ip4hdr_info->ip4_hdr; in eth_get_protocols()
330 struct ip_header *iphdr = (struct ip_header *) l3hdr; in eth_setup_ip4_fragmentation()
347 struct ip_header *iphdr = (struct ip_header *) l3hdr; in eth_fix_ip4_checksum()
353 eth_calc_ip4_pseudo_hdr_csum(struct ip_header *iphdr, in eth_calc_ip4_pseudo_hdr_csum()
/dports/emulators/qemu/qemu-6.2.0/net/
H A Deth.c52 struct ip_header *iphdr = (struct ip_header *) l3_hdr; in eth_get_gso_type()
122 const struct ip_header *ip4_hdr, in _eth_tcp_has_data()
162 struct ip_header *iphdr = &ip4hdr_info->ip4_hdr; in eth_get_protocols()
330 struct ip_header *iphdr = (struct ip_header *) l3hdr; in eth_setup_ip4_fragmentation()
347 struct ip_header *iphdr = (struct ip_header *) l3hdr; in eth_fix_ip4_checksum()
353 eth_calc_ip4_pseudo_hdr_csum(struct ip_header *iphdr, in eth_calc_ip4_pseudo_hdr_csum()

12345678