Searched defs:iphdr (Results 1 - 20 of 20) sorted by relevance

/vbox/src/VBox/Devices/Network/lwip/src/core/ipv4/
H A Dicmp.c52 struct ip_hdr *iphdr; local
60 iphdr = p->payload;
61 hlen = IPH_HL(iphdr) * 4;
75 if (ip_addr_isbroadcast(&iphdr->dest, inp) || ip_addr_ismulticast(&iphdr->dest)) {
98 tmpaddr.addr = iphdr->src.addr;
99 iphdr->src.addr = iphdr->dest.addr;
100 iphdr->dest.addr = tmpaddr.addr;
115 ip_output_if(p, &(iphdr
130 struct ip_hdr *iphdr; local
163 struct ip_hdr *iphdr; local
[all...]
H A Dip.c107 ip_forward(struct pbuf *p, struct ip_hdr *iphdr, struct netif *inp) argument
113 netif = ip_route((struct ip_addr *)&(iphdr->dest));
116 iphdr->dest.addr));
129 IPH_TTL_SET(iphdr, IPH_TTL(iphdr) - 1);
131 if (IPH_TTL(iphdr) == 0) {
134 if (IPH_PROTO(iphdr) != IP_PROTO_ICMP) {
141 if (IPH_CHKSUM(iphdr) >= htons(0xffff - 0x100)) {
142 IPH_CHKSUM_SET(iphdr, IPH_CHKSUM(iphdr)
176 struct ip_hdr *iphdr; local
388 struct ip_hdr *iphdr; local
472 struct ip_hdr *iphdr = p->payload; local
[all...]
H A Dip_frag.c128 struct ip_hdr *fraghdr, *iphdr; local
135 iphdr = (struct ip_hdr *) ip_reassbuf;
142 memcpy(iphdr, fraghdr, IP_HLEN);
152 if (ip_addr_cmp(&iphdr->src, &fraghdr->src) &&
153 ip_addr_cmp(&iphdr->dest, &fraghdr->dest) &&
154 IPH_ID(iphdr) == IPH_ID(fraghdr)) {
258 IPH_LEN_SET(iphdr, htons(ip_reasslen));
259 IPH_OFFSET_SET(iphdr, 0);
260 IPH_CHKSUM_SET(iphdr, 0);
261 IPH_CHKSUM_SET(iphdr, inet_chksu
314 struct ip_hdr *iphdr; local
[all...]
/vbox/src/VBox/Devices/Network/lwip/src/core/ipv6/
H A Dicmp6.c51 struct ip_hdr *iphdr; local
77 iphdr = (struct ip_hdr *)((u8_t *)p->payload - IP_HLEN);
79 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: checksum failed for received ICMP echo (%"X16_F")\n", inet_chksum_pseudo(p, &(iphdr->src), &(iphdr->dest), IP_PROTO_ICMP, p->tot_len)));
87 ip_addr_set(&tmpaddr, &(iphdr->src));
88 ip_addr_set(&(iphdr->src), &(iphdr->dest));
89 ip_addr_set(&(iphdr->dest), &tmpaddr);
97 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: checksum failed for received ICMP echo (%"X16_F")\n", inet_chksum_pseudo(p, &(iphdr->src), &(iphdr
121 struct ip_hdr *iphdr; local
151 struct ip_hdr *iphdr; local
[all...]
H A Dip6.c96 ip_forward(struct pbuf *p, struct ip_hdr *iphdr) argument
102 if ((netif = ip_route((struct ip_addr *)&(iphdr->dest))) == NULL) {
106 ip_addr_debug_print(IP_DEBUG, &(iphdr->dest));
113 if (--iphdr->hoplim == 0) {
115 if (iphdr->nexthdr != IP_PROTO_ICMP) {
123 /* if (iphdr->chksum >= htons(0xffff - 0x100)) {
124 iphdr->chksum += htons(0x100) + 1;
126 iphdr->chksum += htons(0x100);
132 ip_addr_debug_print(IP_DEBUG, &(iphdr->dest));
143 netif->output(netif, p, (struct ip_addr *)&(iphdr
158 struct ip_hdr *iphdr; local
265 struct ip_hdr *iphdr; local
341 struct ip_hdr *iphdr = p->payload; local
[all...]
/vbox/src/VBox/Devices/Network/lwip-new/src/include/ipv4/lwip/
H A Dip_frag.h57 struct ip_hdr iphdr; member in struct:ip_reassdata
/vbox/src/VBox/Devices/Network/lwip-new/src/include/ipv6/lwip/
H A Dip6_frag.h69 struct ip6_hdr iphdr; member in struct:ip6_reassdata
/vbox/src/VBox/Devices/Network/lwip/src/core/
H A Draw.c89 struct ip_hdr *iphdr; local
93 iphdr = p->payload;
94 proto = IPH_PROTO(iphdr);
104 if (pcb->recv(pcb->recv_arg, pcb, p, &(iphdr->src)) != 0)
H A Dtcp_in.c66 static struct ip_hdr *iphdr; variable in typeref:struct:ip_hdr
105 iphdr = p->payload;
106 tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4);
113 if (pbuf_header(p, -((s16_t)(IPH_HL(iphdr) * 4))) || (p->tot_len < sizeof(struct tcp_hdr))) {
123 if (ip_addr_isbroadcast(&(iphdr->dest), inp) ||
124 ip_addr_ismulticast(&(iphdr->dest))) {
132 if (inet_chksum_pseudo(p, (struct ip_addr *)&(iphdr->src),
133 (struct ip_addr *)&(iphdr->dest),
136 inet_chksum_pseudo(p, (struct ip_addr *)&(iphdr->src), (struct ip_addr *)&(iphdr
[all...]
H A Dudp.c91 struct ip_hdr *iphdr; local
99 iphdr = p->payload;
101 if (p->tot_len < (IPH_HL(iphdr) * 4 + UDP_HLEN)) {
112 pbuf_header(p, -(s16_t)(IPH_HL(iphdr) * 4));
127 ip4_addr1(&iphdr->dest), ip4_addr2(&iphdr->dest),
128 ip4_addr3(&iphdr->dest), ip4_addr4(&iphdr->dest), ntohs(udphdr->dest),
129 ip4_addr1(&iphdr->src), ip4_addr2(&iphdr
[all...]
/vbox/src/VBox/Devices/Network/lwip-new/src/core/ipv4/
H A Dicmp.c96 struct ip_hdr *iphdr; local
102 iphdr = (struct ip_hdr *)ip_current_header();
103 hlen = IPH_HL(iphdr) * 4;
181 iphdr = (struct ip_hdr *)r->payload;
203 ip_addr_copy(iphdr->src, *ip_current_dest_addr());
204 ip_addr_copy(iphdr->dest, *ip_current_src_addr());
218 IPH_TTL_SET(iphdr, ICMP_TTL);
219 IPH_CHKSUM_SET(iphdr, 0);
221 IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, IP_HLE
398 struct ip_hdr *iphdr; local
[all...]
H A Dip4.c197 * @param iphdr the IP header of the input packet
202 ip_forward(struct pbuf *p, struct ip_hdr *iphdr, struct netif *inp) argument
256 IPH_TTL_SET(iphdr, IPH_TTL(iphdr) - 1);
258 if (IPH_TTL(iphdr) == 0) {
262 if (IPH_PROTO(iphdr) != IP_PROTO_ICMP) {
270 if (IPH_CHKSUM(iphdr) >= PP_HTONS(0xffffU - 0x100)) {
271 IPH_CHKSUM_SET(iphdr, IPH_CHKSUM(iphdr) + PP_HTONS(0x100) + 1);
273 IPH_CHKSUM_SET(iphdr, IPH_CHKSU
334 struct ip_hdr *iphdr; local
761 struct ip_hdr *iphdr; local
990 struct ip_hdr *iphdr = (struct ip_hdr *)p->payload; local
[all...]
H A Dip_frag.c179 SMEMCPY(p->payload, &ipr->iphdr, IP_HLEN);
238 if (!IP_ADDRESSES_AND_ID_MATCH(&r->iphdr, fraghdr)) {
295 SMEMCPY(&(ipr->iphdr), fraghdr, IP_HLEN);
523 if (IP_ADDRESSES_AND_ID_MATCH(&ipr->iphdr, fraghdr)) {
540 ((ntohs(IPH_OFFSET(&ipr->iphdr)) & IP_OFFMASK) != 0)) {
541 /* ipr->iphdr is not the header from the first fragment, but fraghdr is
542 * -> copy fraghdr into ipr->iphdr since we want to have the header
545 SMEMCPY(&ipr->iphdr, fraghdr, IP_HLEN);
576 SMEMCPY(fraghdr, &ipr->iphdr, IP_HLEN);
687 struct ip_hdr *iphdr; local
[all...]
/vbox/src/VBox/Devices/PC/ipxe/src/core/
H A Dgdbudp.c64 struct iphdr *iphdr; local
113 if ( iob_len ( iob ) < sizeof ( *iphdr ) ) {
116 iphdr = iob->data;
117 iob_pull ( iob, sizeof ( *iphdr ) );
118 if ( iphdr->protocol != IP_UDP || iphdr->dest.s_addr != source_addr.sin_addr.s_addr ) {
133 dest_addr.sin_addr.s_addr = iphdr->src.s_addr;
161 struct iphdr *iphdr; local
[all...]
/vbox/src/VBox/Devices/Network/lwip-new/src/core/ipv6/
H A Dip6.c289 * @param iphdr the IPv6 header of the input packet
294 ip6_forward(struct pbuf *p, struct ip6_hdr *iphdr, struct netif *inp) argument
324 if (IP6H_NEXTH(iphdr) != IP6_NEXTH_ICMP6) {
357 IP6H_HOPLIM_SET(iphdr, IP6H_HOPLIM(iphdr) - 1);
359 if (IP6H_HOPLIM(iphdr) == 0) {
362 if (IP6H_NEXTH(iphdr) != IP6_NEXTH_ICMP6) {
373 if (IP6H_NEXTH(iphdr) != IP6_NEXTH_ICMP6) {
/vbox/src/VBox/Devices/Network/lwip-new/src/core/
H A Draw.c81 struct ip_hdr *iphdr; local
91 iphdr = (struct ip_hdr *)p->payload;
93 if (IPH_V(iphdr) == 6) {
100 proto = IPH_PROTO(iphdr);
/vbox/src/VBox/Devices/PC/ipxe/src/include/ipxe/
H A Dip.h35 struct iphdr { struct
/vbox/src/VBox/Devices/Network/slirp/libalias/
H A Dalias_local.h346 ip_next(struct ip *iphdr) argument
348 char *p = (char *)iphdr;
349 return (&p[iphdr->ip_hl * 4]);
/vbox/src/VBox/Devices/PC/ipxe/src/net/
H A Dipv4.c145 struct iphdr *iphdr = frag->iobuf->data; local
147 DBGC ( iphdr->src, "IPv4 fragment %04x expired\n",
148 ntohs ( iphdr->ident ) );
157 * @v iphdr IPv4 header
160 static struct ipv4_fragment * ipv4_fragment ( struct iphdr *iphdr ) {
162 struct iphdr *frag_iphdr;
167 if ( ( iphdr->src.s_addr == frag_iphdr->src.s_addr ) &&
168 ( iphdr
183 struct iphdr *iphdr = iobuf->data; local
270 struct iphdr *iphdr = iobuf->data; local
303 struct iphdr *iphdr = iob_push ( iobuf, sizeof ( *iphdr ) ); local
459 struct iphdr *iphdr = iobuf->data; local
[all...]
/vbox/src/VBox/Devices/Network/lwip-new/src/netif/
H A Detharp.c646 struct ip_hdr *iphdr; local
653 iphdr = (struct ip_hdr *)((u8_t*)ethhdr + SIZEOF_ETH_HDR);
656 iphdr = (struct ip_hdr *)((u8_t*)ethhdr + SIZEOF_ETH_HDR + SIZEOF_VLAN_HDR);
660 ip_addr_copy(iphdr_src, iphdr->src);
949 struct ip_hdr *iphdr = (struct ip_hdr*)((u8_t*)q->payload + local
955 if (!ip_addr_islinklocal(&iphdr->src))

Completed in 135 milliseconds