Warning, cross-references for /kernel/lwip/core/ipv4/ip.c need to be fixed.
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041 #include "lwip/opt.h"
0042 #include "lwip/ip.h"
0043 #include "lwip/def.h"
0044 #include "lwip/mem.h"
0045 #include "lwip/ip_frag.h"
0046 #include "lwip/inet.h"
0047 #include "lwip/inet_chksum.h"
0048 #include "lwip/netif.h"
0049 #include "lwip/icmp.h"
0050 #include "lwip/igmp.h"
0051 #include "lwip/raw.h"
0052 #include "lwip/udp.h"
0053 #include "lwip/tcp.h"
0054 #include "lwip/snmp.h"
0055 #include "lwip/dhcp.h"
0056 #include "lwip/stats.h"
0057 #include "arch/perf.h"
0058
0059 #include <string.h>
0060
0061
0062
0063
0064
0065 struct netif *current_netif;
0066
0067
0068
0069
0070 const struct ip_hdr *current_header;
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081 struct netif *
0082 ip_route(struct ip_addr *dest)
0083 {
0084 struct netif *netif;
0085
0086
0087 for(netif = netif_list; netif != NULL; netif = netif->next) {
0088
0089 if (netif_is_up(netif)) {
0090 if (ip_addr_netcmp(dest, &(netif->ip_addr), &(netif->netmask))) {
0091
0092 return netif;
0093 }
0094 }
0095 }
0096 if ((netif_default == NULL) || (!netif_is_up(netif_default))) {
0097 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip_route: No route to 0x%"X32_F"\n", dest->addr));
0098 IP_STATS_INC(ip.rterr);
0099 snmp_inc_ipoutnoroutes();
0100 return NULL;
0101 }
0102
0103 return netif_default;
0104 }
0105
0106 #if IP_FORWARD
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117 static struct netif *
0118 ip_forward(struct pbuf *p, struct ip_hdr *iphdr, struct netif *inp)
0119 {
0120 struct netif *netif;
0121
0122 PERF_START;
0123
0124 netif = ip_route((struct ip_addr *)&(iphdr->dest));
0125 if (netif == NULL) {
0126 LWIP_DEBUGF(IP_DEBUG, ("ip_forward: no forwarding route for 0x%"X32_F" found\n",
0127 iphdr->dest.addr));
0128 snmp_inc_ipoutnoroutes();
0129 return (struct netif *)NULL;
0130 }
0131
0132
0133 if (netif == inp) {
0134 LWIP_DEBUGF(IP_DEBUG, ("ip_forward: not bouncing packets back on incoming interface.\n"));
0135 snmp_inc_ipoutnoroutes();
0136 return (struct netif *)NULL;
0137 }
0138
0139
0140 IPH_TTL_SET(iphdr, IPH_TTL(iphdr) - 1);
0141
0142 if (IPH_TTL(iphdr) == 0) {
0143 snmp_inc_ipinhdrerrors();
0144 #if LWIP_ICMP
0145
0146 if (IPH_PROTO(iphdr) != IP_PROTO_ICMP) {
0147 icmp_time_exceeded(p, ICMP_TE_TTL);
0148 }
0149 #endif
0150 return (struct netif *)NULL;
0151 }
0152
0153
0154 if (IPH_CHKSUM(iphdr) >= htons(0xffff - 0x100)) {
0155 IPH_CHKSUM_SET(iphdr, IPH_CHKSUM(iphdr) + htons(0x100) + 1);
0156 } else {
0157 IPH_CHKSUM_SET(iphdr, IPH_CHKSUM(iphdr) + htons(0x100));
0158 }
0159
0160 LWIP_DEBUGF(IP_DEBUG, ("ip_forward: forwarding packet to 0x%"X32_F"\n",
0161 iphdr->dest.addr));
0162
0163 IP_STATS_INC(ip.fw);
0164 IP_STATS_INC(ip.xmit);
0165 snmp_inc_ipforwdatagrams();
0166
0167 PERF_STOP("ip_forward");
0168
0169 netif->output(netif, p, (struct ip_addr *)&(iphdr->dest));
0170 return netif;
0171 }
0172 #endif
0173
0174
0175
0176
0177
0178
0179
0180
0181
0182
0183
0184
0185
0186
0187
0188 err_t
0189 ip_input(struct pbuf *p, struct netif *inp)
0190 {
0191 struct ip_hdr *iphdr;
0192 struct netif *netif;
0193 u16_t iphdr_hlen;
0194 u16_t iphdr_len;
0195 #if LWIP_DHCP
0196 int check_ip_src=1;
0197 #endif
0198
0199 IP_STATS_INC(ip.recv);
0200 snmp_inc_ipinreceives();
0201
0202
0203 iphdr = p->payload;
0204 if (IPH_V(iphdr) != 4) {
0205 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_WARNING, ("IP packet dropped due to bad version number %"U16_F"\n", IPH_V(iphdr)));
0206 ip_debug_print(p);
0207 pbuf_free(p);
0208 IP_STATS_INC(ip.err);
0209 IP_STATS_INC(ip.drop);
0210 snmp_inc_ipinhdrerrors();
0211 return ERR_OK;
0212 }
0213
0214
0215 iphdr_hlen = IPH_HL(iphdr);
0216
0217 iphdr_hlen *= 4;
0218
0219 iphdr_len = ntohs(IPH_LEN(iphdr));
0220
0221
0222 if ((iphdr_hlen > p->len) || (iphdr_len > p->tot_len)) {
0223 if (iphdr_hlen > p->len) {
0224 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS,
0225 ("IP header (len %"U16_F") does not fit in first pbuf (len %"U16_F"), IP packet dropped.\n",
0226 iphdr_hlen, p->len));
0227 }
0228 if (iphdr_len > p->tot_len) {
0229 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS,
0230 ("IP (len %"U16_F") is longer than pbuf (len %"U16_F"), IP packet dropped.\n",
0231 iphdr_len, p->tot_len));
0232 }
0233
0234 pbuf_free(p);
0235 IP_STATS_INC(ip.lenerr);
0236 IP_STATS_INC(ip.drop);
0237 snmp_inc_ipindiscards();
0238 return ERR_OK;
0239 }
0240
0241
0242 #if CHECKSUM_CHECK_IP
0243 if (inet_chksum(iphdr, iphdr_hlen) != 0) {
0244
0245 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS,
0246 ("Checksum (0x%"X16_F") failed, IP packet dropped.\n", inet_chksum(iphdr, iphdr_hlen)));
0247 ip_debug_print(p);
0248 pbuf_free(p);
0249 IP_STATS_INC(ip.chkerr);
0250 IP_STATS_INC(ip.drop);
0251 snmp_inc_ipinhdrerrors();
0252 return ERR_OK;
0253 }
0254 #endif
0255
0256
0257
0258 pbuf_realloc(p, iphdr_len);
0259
0260
0261 #if LWIP_IGMP
0262 if (ip_addr_ismulticast(&(iphdr->dest))) {
0263 if ((inp->flags & NETIF_FLAG_IGMP) && (igmp_lookfor_group(inp, &(iphdr->dest)))) {
0264 netif = inp;
0265 } else {
0266 netif = NULL;
0267 }
0268 } else
0269 #endif
0270 {
0271
0272
0273
0274 int first = 1;
0275 netif = inp;
0276 do {
0277 LWIP_DEBUGF(IP_DEBUG, ("ip_input: iphdr->dest 0x%"X32_F" netif->ip_addr 0x%"X32_F" (0x%"X32_F", 0x%"X32_F", 0x%"X32_F")\n",
0278 iphdr->dest.addr, netif->ip_addr.addr,
0279 iphdr->dest.addr & netif->netmask.addr,
0280 netif->ip_addr.addr & netif->netmask.addr,
0281 iphdr->dest.addr & ~(netif->netmask.addr)));
0282
0283
0284 if ((netif_is_up(netif)) && (!ip_addr_isany(&(netif->ip_addr)))) {
0285
0286 if (ip_addr_cmp(&(iphdr->dest), &(netif->ip_addr)) ||
0287
0288 ip_addr_isbroadcast(&(iphdr->dest), netif)) {
0289 LWIP_DEBUGF(IP_DEBUG, ("ip_input: packet accepted on interface %c%c\n",
0290 netif->name[0], netif->name[1]));
0291
0292 break;
0293 }
0294 }
0295 if (first) {
0296 first = 0;
0297 netif = netif_list;
0298 } else {
0299 netif = netif->next;
0300 }
0301 if (netif == inp) {
0302 netif = netif->next;
0303 }
0304 } while(netif != NULL);
0305 }
0306
0307 #if LWIP_DHCP
0308
0309
0310
0311
0312 if (netif == NULL) {
0313
0314 if (IPH_PROTO(iphdr) == IP_PROTO_UDP) {
0315 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip_input: UDP packet to DHCP client port %"U16_F"\n",
0316 ntohs(((struct udp_hdr *)((u8_t *)iphdr + iphdr_hlen))->dest)));
0317 if (ntohs(((struct udp_hdr *)((u8_t *)iphdr + iphdr_hlen))->dest) == DHCP_CLIENT_PORT) {
0318 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip_input: DHCP packet accepted.\n"));
0319 netif = inp;
0320 check_ip_src = 0;
0321 }
0322 }
0323 }
0324 #endif
0325
0326
0327 #if LWIP_DHCP
0328
0329 if (check_ip_src && (iphdr->src.addr != 0))
0330 #endif
0331 { if ((ip_addr_isbroadcast(&(iphdr->src), inp)) ||
0332 (ip_addr_ismulticast(&(iphdr->src)))) {
0333
0334 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("ip_input: packet source is not valid.\n"));
0335
0336 pbuf_free(p);
0337 IP_STATS_INC(ip.drop);
0338 snmp_inc_ipinaddrerrors();
0339 snmp_inc_ipindiscards();
0340 return ERR_OK;
0341 }
0342 }
0343
0344
0345 if (netif == NULL) {
0346
0347 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip_input: packet not for us.\n"));
0348 #if IP_FORWARD
0349
0350 if (!ip_addr_isbroadcast(&(iphdr->dest), inp)) {
0351
0352 ip_forward(p, iphdr, inp);
0353 } else
0354 #endif
0355 {
0356 snmp_inc_ipinaddrerrors();
0357 snmp_inc_ipindiscards();
0358 }
0359 pbuf_free(p);
0360 return ERR_OK;
0361 }
0362
0363 if ((IPH_OFFSET(iphdr) & htons(IP_OFFMASK | IP_MF)) != 0) {
0364 #if IP_REASSEMBLY
0365 LWIP_DEBUGF(IP_DEBUG, ("IP packet is a fragment (id=0x%04"X16_F" tot_len=%"U16_F" len=%"U16_F" MF=%"U16_F" offset=%"U16_F"), calling ip_reass()\n",
0366 ntohs(IPH_ID(iphdr)), p->tot_len, ntohs(IPH_LEN(iphdr)), !!(IPH_OFFSET(iphdr) & htons(IP_MF)), (ntohs(IPH_OFFSET(iphdr)) & IP_OFFMASK)*8));
0367
0368 p = ip_reass(p);
0369
0370 if (p == NULL) {
0371 return ERR_OK;
0372 }
0373 iphdr = p->payload;
0374 #else
0375 pbuf_free(p);
0376 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("IP packet dropped since it was fragmented (0x%"X16_F") (while IP_REASSEMBLY == 0).\n",
0377 ntohs(IPH_OFFSET(iphdr))));
0378 IP_STATS_INC(ip.opterr);
0379 IP_STATS_INC(ip.drop);
0380
0381 snmp_inc_ipinunknownprotos();
0382 return ERR_OK;
0383 #endif
0384 }
0385
0386 #if IP_OPTIONS_ALLOWED == 0
0387
0388 #if LWIP_IGMP
0389
0390 if((iphdr_hlen > IP_HLEN && (IPH_PROTO(iphdr) != IP_PROTO_IGMP)) {
0391 #else
0392 if (iphdr_hlen > IP_HLEN) {
0393 #endif
0394 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("IP packet dropped since there were IP options (while IP_OPTIONS_ALLOWED == 0).\n"));
0395 pbuf_free(p);
0396 IP_STATS_INC(ip.opterr);
0397 IP_STATS_INC(ip.drop);
0398
0399 snmp_inc_ipinunknownprotos();
0400 return ERR_OK;
0401 }
0402 #endif
0403
0404
0405 LWIP_DEBUGF(IP_DEBUG, ("ip_input: \n"));
0406 ip_debug_print(p);
0407 LWIP_DEBUGF(IP_DEBUG, ("ip_input: p->len %"U16_F" p->tot_len %"U16_F"\n", p->len, p->tot_len));
0408
0409 current_netif = inp;
0410 current_header = iphdr;
0411
0412 #if LWIP_RAW
0413
0414 if (raw_input(p, inp) == 0)
0415 #endif
0416 {
0417
0418 switch (IPH_PROTO(iphdr)) {
0419 #if LWIP_UDP
0420 case IP_PROTO_UDP:
0421 #if LWIP_UDPLITE
0422 case IP_PROTO_UDPLITE:
0423 #endif
0424 snmp_inc_ipindelivers();
0425 udp_input(p, inp);
0426 break;
0427 #endif
0428 #if LWIP_TCP
0429 case IP_PROTO_TCP:
0430 snmp_inc_ipindelivers();
0431 tcp_input(p, inp);
0432 break;
0433 #endif
0434 #if LWIP_ICMP
0435 case IP_PROTO_ICMP:
0436 snmp_inc_ipindelivers();
0437 icmp_input(p, inp);
0438 break;
0439 #endif
0440 #if LWIP_IGMP
0441 case IP_PROTO_IGMP:
0442 igmp_input(p,inp,&(iphdr->dest));
0443 break;
0444 #endif
0445 default:
0446 #if LWIP_ICMP
0447
0448 if (!ip_addr_isbroadcast(&(iphdr->dest), inp) &&
0449 !ip_addr_ismulticast(&(iphdr->dest))) {
0450 p->payload = iphdr;
0451 icmp_dest_unreach(p, ICMP_DUR_PROTO);
0452 }
0453 #endif
0454 pbuf_free(p);
0455
0456 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("Unsupported transport protocol %"U16_F"\n", IPH_PROTO(iphdr)));
0457
0458 IP_STATS_INC(ip.proterr);
0459 IP_STATS_INC(ip.drop);
0460 snmp_inc_ipinunknownprotos();
0461 }
0462 }
0463
0464 current_netif = NULL;
0465 current_header = NULL;
0466
0467 return ERR_OK;
0468 }
0469
0470
0471
0472
0473
0474
0475
0476
0477
0478
0479
0480
0481
0482
0483
0484
0485
0486
0487
0488
0489
0490
0491
0492
0493
0494
0495 err_t
0496 ip_output_if(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
0497 u8_t ttl, u8_t tos,
0498 u8_t proto, struct netif *netif)
0499 {
0500 #if IP_OPTIONS_SEND
0501 return ip_output_if_opt(p, src, dest, ttl, tos, proto, netif, NULL, 0);
0502 }
0503
0504
0505
0506
0507
0508
0509
0510 err_t ip_output_if_opt(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
0511 u8_t ttl, u8_t tos, u8_t proto, struct netif *netif, void *ip_options,
0512 u16_t optlen)
0513 {
0514 #endif
0515 struct ip_hdr *iphdr;
0516 static u16_t ip_id = 0;
0517
0518 snmp_inc_ipoutrequests();
0519
0520
0521 if (dest != IP_HDRINCL) {
0522 u16_t ip_hlen = IP_HLEN;
0523 #if IP_OPTIONS_SEND
0524 u16_t optlen_aligned = 0;
0525 if (optlen != 0) {
0526
0527 optlen_aligned = ((optlen + 3) & ~3);
0528 ip_hlen += optlen_aligned;
0529
0530 if (pbuf_header(p, optlen_aligned)) {
0531 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip_output_if_opt: not enough room for IP options in pbuf\n"));
0532 IP_STATS_INC(ip.err);
0533 snmp_inc_ipoutdiscards();
0534 return ERR_BUF;
0535 }
0536 MEMCPY(p->payload, ip_options, optlen);
0537 if (optlen < optlen_aligned) {
0538
0539 memset(((char*)p->payload) + optlen, 0, optlen_aligned - optlen);
0540 }
0541 }
0542 #endif
0543
0544 if (pbuf_header(p, IP_HLEN)) {
0545 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip_output: not enough room for IP header in pbuf\n"));
0546
0547 IP_STATS_INC(ip.err);
0548 snmp_inc_ipoutdiscards();
0549 return ERR_BUF;
0550 }
0551
0552 iphdr = p->payload;
0553 LWIP_ASSERT("check that first pbuf can hold struct ip_hdr",
0554 (p->len >= sizeof(struct ip_hdr)));
0555
0556 IPH_TTL_SET(iphdr, ttl);
0557 IPH_PROTO_SET(iphdr, proto);
0558
0559 ip_addr_set(&(iphdr->dest), dest);
0560
0561 IPH_VHLTOS_SET(iphdr, 4, ip_hlen / 4, tos);
0562 IPH_LEN_SET(iphdr, htons(p->tot_len));
0563 IPH_OFFSET_SET(iphdr, 0);
0564 IPH_ID_SET(iphdr, htons(ip_id));
0565 ++ip_id;
0566
0567 if (ip_addr_isany(src)) {
0568 ip_addr_set(&(iphdr->src), &(netif->ip_addr));
0569 } else {
0570 ip_addr_set(&(iphdr->src), src);
0571 }
0572
0573 IPH_CHKSUM_SET(iphdr, 0);
0574 #if CHECKSUM_GEN_IP
0575 IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, ip_hlen));
0576 #endif
0577 } else {
0578
0579 iphdr = p->payload;
0580 dest = &(iphdr->dest);
0581 }
0582
0583 IP_STATS_INC(ip.xmit);
0584
0585 LWIP_DEBUGF(IP_DEBUG, ("ip_output_if: %c%c%"U16_F"\n", netif->name[0], netif->name[1], netif->num));
0586 ip_debug_print(p);
0587
0588 #if ENABLE_LOOPBACK
0589 if (ip_addr_cmp(dest, &netif->ip_addr)) {
0590
0591 LWIP_DEBUGF(IP_DEBUG, ("netif_loop_output()"));
0592 return netif_loop_output(netif, p, dest);
0593 }
0594 #endif
0595 #if IP_FRAG
0596
0597 if (netif->mtu && (p->tot_len > netif->mtu)) {
0598 return ip_frag(p,netif,dest);
0599 }
0600 #endif
0601
0602 LWIP_DEBUGF(IP_DEBUG, ("netif->output()"));
0603 return netif->output(netif, p, dest);
0604 }
0605
0606
0607
0608
0609
0610
0611
0612
0613
0614
0615
0616
0617
0618
0619
0620
0621
0622
0623 err_t
0624 ip_output(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
0625 u8_t ttl, u8_t tos, u8_t proto)
0626 {
0627 struct netif *netif;
0628
0629 if ((netif = ip_route(dest)) == NULL) {
0630 LWIP_DEBUGF(IP_DEBUG, ("ip_output: No route to 0x%"X32_F"\n", dest->addr));
0631 IP_STATS_INC(ip.rterr);
0632 return ERR_RTE;
0633 }
0634
0635 return ip_output_if(p, src, dest, ttl, tos, proto, netif);
0636 }
0637
0638 #if LWIP_NETIF_HWADDRHINT
0639
0640
0641
0642
0643
0644
0645
0646
0647
0648
0649
0650
0651
0652
0653
0654
0655
0656
0657 err_t
0658 ip_output_hinted(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
0659 u8_t ttl, u8_t tos, u8_t proto, u8_t *addr_hint)
0660 {
0661 struct netif *netif;
0662 err_t err;
0663
0664 if ((netif = ip_route(dest)) == NULL) {
0665 LWIP_DEBUGF(IP_DEBUG, ("ip_output: No route to 0x%"X32_F"\n", dest->addr));
0666 IP_STATS_INC(ip.rterr);
0667 return ERR_RTE;
0668 }
0669
0670 netif->addr_hint = addr_hint;
0671 err = ip_output_if(p, src, dest, ttl, tos, proto, netif);
0672 netif->addr_hint = NULL;
0673
0674 return err;
0675 }
0676 #endif
0677
0678 #if IP_DEBUG
0679
0680
0681
0682 void
0683 ip_debug_print(struct pbuf *p)
0684 {
0685 struct ip_hdr *iphdr = p->payload;
0686 u8_t *payload;
0687
0688 payload = (u8_t *)iphdr + IP_HLEN;
0689
0690 LWIP_DEBUGF(IP_DEBUG, ("IP header:\n"));
0691 LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));
0692 LWIP_DEBUGF(IP_DEBUG, ("|%2"S16_F" |%2"S16_F" | 0x%02"X16_F" | %5"U16_F" | (v, hl, tos, len)\n",
0693 IPH_V(iphdr),
0694 IPH_HL(iphdr),
0695 IPH_TOS(iphdr),
0696 ntohs(IPH_LEN(iphdr))));
0697 LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));
0698 LWIP_DEBUGF(IP_DEBUG, ("| %5"U16_F" |%"U16_F"%"U16_F"%"U16_F"| %4"U16_F" | (id, flags, offset)\n",
0699 ntohs(IPH_ID(iphdr)),
0700 ntohs(IPH_OFFSET(iphdr)) >> 15 & 1,
0701 ntohs(IPH_OFFSET(iphdr)) >> 14 & 1,
0702 ntohs(IPH_OFFSET(iphdr)) >> 13 & 1,
0703 ntohs(IPH_OFFSET(iphdr)) & IP_OFFMASK));
0704 LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));
0705 LWIP_DEBUGF(IP_DEBUG, ("| %3"U16_F" | %3"U16_F" | 0x%04"X16_F" | (ttl, proto, chksum)\n",
0706 IPH_TTL(iphdr),
0707 IPH_PROTO(iphdr),
0708 ntohs(IPH_CHKSUM(iphdr))));
0709 LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));
0710 LWIP_DEBUGF(IP_DEBUG, ("| %3"U16_F" | %3"U16_F" | %3"U16_F" | %3"U16_F" | (src)\n",
0711 ip4_addr1(&iphdr->src),
0712 ip4_addr2(&iphdr->src),
0713 ip4_addr3(&iphdr->src),
0714 ip4_addr4(&iphdr->src)));
0715 LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));
0716 LWIP_DEBUGF(IP_DEBUG, ("| %3"U16_F" | %3"U16_F" | %3"U16_F" | %3"U16_F" | (dest)\n",
0717 ip4_addr1(&iphdr->dest),
0718 ip4_addr2(&iphdr->dest),
0719 ip4_addr3(&iphdr->dest),
0720 ip4_addr4(&iphdr->dest)));
0721 LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));
0722 }
0723 #endif