62#ifdef LWIP_HOOK_FILENAME
63#include LWIP_HOOK_FILENAME
68#ifndef LWIP_INLINE_IP_CHKSUM
69#if LWIP_CHECKSUM_CTRL_PER_NETIF
70#define LWIP_INLINE_IP_CHKSUM 0
72#define LWIP_INLINE_IP_CHKSUM 1
76#if LWIP_INLINE_IP_CHKSUM && CHECKSUM_GEN_IP
77#define CHECKSUM_GEN_IP_INLINE 1
79#define CHECKSUM_GEN_IP_INLINE 0
82#if LWIP_DHCP || defined(LWIP_IP_ACCEPT_UDP_PORT)
83#define IP_ACCEPT_LINK_LAYER_ADDRESSING 1
90#if LWIP_DHCP && defined(LWIP_IP_ACCEPT_UDP_PORT)
92#define IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(port) (((port) == PP_NTOHS(LWIP_IANA_PORT_DHCP_CLIENT)) \
93 || (LWIP_IP_ACCEPT_UDP_PORT(port)))
94#elif defined(LWIP_IP_ACCEPT_UDP_PORT)
96#define IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(port) (LWIP_IP_ACCEPT_UDP_PORT(port))
99#define IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(port) ((port) == PP_NTOHS(LWIP_IANA_PORT_DHCP_CLIENT))
103#define IP_ACCEPT_LINK_LAYER_ADDRESSING 0
109#if LWIP_MULTICAST_TX_OPTIONS
111static struct netif *ip4_default_multicast_netif;
117ip4_set_default_multicast_netif(
struct netif *default_multicast_netif)
119 ip4_default_multicast_netif = default_multicast_netif;
123#ifdef LWIP_HOOK_IP4_ROUTE_SRC
133 struct netif *
netif = LWIP_HOOK_IP4_ROUTE_SRC(src, dest);
138 return ip4_route(dest);
154#if !LWIP_SINGLE_NETIF
159#if LWIP_MULTICAST_TX_OPTIONS
161 if (ip4_addr_ismulticast(dest) && ip4_default_multicast_netif) {
162 return ip4_default_multicast_netif;
170 NETIF_FOREACH(
netif) {
174 if (ip4_addr_net_eq(dest, netif_ip4_addr(
netif), netif_ip4_netmask(
netif))) {
186#if LWIP_NETIF_LOOPBACK && !LWIP_HAVE_LOOPIF
194 NETIF_FOREACH(
netif) {
203#ifdef LWIP_HOOK_IP4_ROUTE_SRC
204 netif = LWIP_HOOK_IP4_ROUTE_SRC(NULL, dest);
208#elif defined(LWIP_HOOK_IP4_ROUTE)
209 netif = LWIP_HOOK_IP4_ROUTE(dest);
221 ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest)));
222 IP_STATS_INC(ip.rterr);
223 MIB2_STATS_INC(mib2.ipoutnoroutes);
239ip4_canforward(
struct pbuf *p)
243#ifdef LWIP_HOOK_IP4_CANFORWARD
244 int ret = LWIP_HOOK_IP4_CANFORWARD(p, addr);
258 if (IP_EXPERIMENTAL(addr)) {
261 if (IP_CLASSA(addr)) {
262 u32_t net = addr & IP_CLASSA_NET;
263 if ((net == 0) || (net == ((u32_t)IP_LOOPBACKNET << IP_CLASSA_NSHIFT))) {
288 if (!ip4_canforward(p)) {
293 if (ip4_addr_islinklocal(ip4_current_dest_addr())) {
294 LWIP_DEBUGF(
IP_DEBUG, (
"ip4_forward: not forwarding LLA %"U16_F
".%"U16_F
".%"U16_F
".%"U16_F
"\n",
295 ip4_addr1_16(ip4_current_dest_addr()), ip4_addr2_16(ip4_current_dest_addr()),
296 ip4_addr3_16(ip4_current_dest_addr()), ip4_addr4_16(ip4_current_dest_addr())));
301 netif = ip4_route_src(ip4_current_src_addr(), ip4_current_dest_addr());
303 LWIP_DEBUGF(
IP_DEBUG, (
"ip4_forward: no forwarding route for %"U16_F
".%"U16_F
".%"U16_F
".%"U16_F
" found\n",
304 ip4_addr1_16(ip4_current_dest_addr()), ip4_addr2_16(ip4_current_dest_addr()),
305 ip4_addr3_16(ip4_current_dest_addr()), ip4_addr4_16(ip4_current_dest_addr())));
309#if !IP_FORWARD_ALLOW_TX_ON_RX_NETIF
313 LWIP_DEBUGF(
IP_DEBUG, (
"ip4_forward: not bouncing packets back on incoming interface.\n"));
319 IPH_TTL_SET(iphdr, IPH_TTL(iphdr) - 1);
321 if (IPH_TTL(iphdr) == 0) {
322 MIB2_STATS_INC(mib2.ipinhdrerrors);
325 if (IPH_PROTO(iphdr) != IP_PROTO_ICMP) {
333 if (IPH_CHKSUM(iphdr) >= PP_HTONS(0xffffU - 0x100)) {
334 IPH_CHKSUM_SET(iphdr, (u16_t)(IPH_CHKSUM(iphdr) + PP_HTONS(0x100) + 1));
336 IPH_CHKSUM_SET(iphdr, (u16_t)(IPH_CHKSUM(iphdr) + PP_HTONS(0x100)));
340 if (
CHECKSUM_GEN_IP || NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_GEN_IP)) {
341 IPH_CHKSUM_SET(iphdr, 0);
343 switch (IPH_PROTO(iphdr)) {
346 case IP_PROTO_UDPLITE:
349 if (
CHECKSUM_GEN_UDP || NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_GEN_UDP)) {
350 ((
struct udp_hdr *)((u8_t *)iphdr + IPH_HL_BYTES(iphdr)))->chksum = 0;
356 if (
CHECKSUM_GEN_TCP || NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_GEN_TCP)) {
357 ((
struct tcp_hdr *)((u8_t *)iphdr + IPH_HL_BYTES(iphdr)))->chksum = 0;
364 ((
struct icmp_hdr *)((u8_t *)iphdr + IPH_HL_BYTES(iphdr)))->chksum = 0;
373 LWIP_DEBUGF(
IP_DEBUG, (
"ip4_forward: forwarding packet to %"U16_F
".%"U16_F
".%"U16_F
".%"U16_F
"\n",
374 ip4_addr1_16(ip4_current_dest_addr()), ip4_addr2_16(ip4_current_dest_addr()),
375 ip4_addr3_16(ip4_current_dest_addr()), ip4_addr4_16(ip4_current_dest_addr())));
378 MIB2_STATS_INC(mib2.ipforwdatagrams);
379 IP_STATS_INC(ip.xmit);
381 PERF_STOP(
"ip4_forward");
384 if ((IPH_OFFSET(iphdr) & PP_NTOHS(IP_DF)) == 0) {
386 ip4_frag(p,
netif, ip4_current_dest_addr());
402 MIB2_STATS_INC(mib2.ipoutnoroutes);
410 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",
419 if (ip4_addr_eq(ip4_current_dest_addr(), netif_ip4_addr(
netif)) ||
421 ip4_addr_isbroadcast(ip4_current_dest_addr(),
netif)
426 LWIP_DEBUGF(
IP_DEBUG, (
"ip4_input: packet accepted on interface %c%c\n",
434 if (autoip_accept_packet(
netif, ip4_current_dest_addr())) {
435 LWIP_DEBUGF(
IP_DEBUG, (
"ip4_input: LLA packet accepted on interface %c%c\n",
460ip4_input(
struct pbuf *p,
struct netif *inp)
462 const struct ip_hdr *iphdr;
466#if IP_ACCEPT_LINK_LAYER_ADDRESSING || LWIP_IGMP
467 int check_ip_src = 1;
470 raw_input_state_t raw_status;
475 IP_STATS_INC(ip.recv);
476 MIB2_STATS_INC(mib2.ipinreceives);
479 iphdr = (
struct ip_hdr *)p->payload;
480 if (IPH_V(iphdr) != 4) {
484 IP_STATS_INC(ip.err);
485 IP_STATS_INC(ip.drop);
486 MIB2_STATS_INC(mib2.ipinhdrerrors);
490#ifdef LWIP_HOOK_IP4_INPUT
491 if (LWIP_HOOK_IP4_INPUT(p, inp)) {
498 iphdr_hlen = IPH_HL_BYTES(iphdr);
500 iphdr_len = lwip_ntohs(IPH_LEN(iphdr));
503 if (iphdr_len < p->tot_len) {
504 pbuf_realloc(p, iphdr_len);
508 if ((iphdr_hlen > p->len) || (iphdr_len > p->tot_len) || (iphdr_hlen < IP_HLEN)) {
509 if (iphdr_hlen < IP_HLEN) {
511 (
"ip4_input: short IP header (%"U16_F
" bytes) received, IP packet dropped\n", iphdr_hlen));
513 if (iphdr_hlen > p->len) {
515 (
"IP header (len %"U16_F
") does not fit in first pbuf (len %"U16_F
"), IP packet dropped.\n",
516 iphdr_hlen, p->len));
518 if (iphdr_len > p->tot_len) {
520 (
"IP (len %"U16_F
") is longer than pbuf (len %"U16_F
"), IP packet dropped.\n",
521 iphdr_len, p->tot_len));
525 IP_STATS_INC(ip.lenerr);
526 IP_STATS_INC(ip.drop);
527 MIB2_STATS_INC(mib2.ipindiscards);
533 IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_CHECK_IP) {
534 if (inet_chksum(iphdr, iphdr_hlen) != 0) {
537 (
"Checksum (0x%"X16_F
") failed, IP packet dropped.\n", inet_chksum(iphdr, iphdr_hlen)));
540 IP_STATS_INC(ip.chkerr);
541 IP_STATS_INC(ip.drop);
542 MIB2_STATS_INC(mib2.ipinhdrerrors);
549 ip_addr_copy_from_ip4(ip_data.current_iphdr_dest, iphdr->dest);
550 ip_addr_copy_from_ip4(ip_data.current_iphdr_src, iphdr->src);
553 if (ip4_addr_ismulticast(ip4_current_dest_addr())) {
558 IP4_ADDR(&allsystems, 224, 0, 0, 1);
559 if (ip4_addr_eq(ip4_current_dest_addr(), &allsystems) &&
560 ip4_addr_isany(ip4_current_src_addr())) {
568 if ((
netif_is_up(inp)) && (!ip4_addr_isany_val(*netif_ip4_addr(inp)))) {
577 if (ip4_input_accept(inp)) {
581#if !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF
588#if !LWIP_SINGLE_NETIF
589 NETIF_FOREACH(
netif) {
594 if (ip4_input_accept(
netif)) {
603#if IP_ACCEPT_LINK_LAYER_ADDRESSING
615 if (IPH_PROTO(iphdr) == IP_PROTO_UDP) {
616 const struct udp_hdr *udphdr = (
const struct udp_hdr *)((
const u8_t *)iphdr + iphdr_hlen);
618 lwip_ntohs(udphdr->dest)));
619 if (IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(udphdr->dest)) {
629#if LWIP_IGMP || IP_ACCEPT_LINK_LAYER_ADDRESSING
631#
if IP_ACCEPT_LINK_LAYER_ADDRESSING
633 && !ip4_addr_isany_val(*ip4_current_src_addr())
638 if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) ||
639 (ip4_addr_ismulticast(ip4_current_src_addr()))) {
644 IP_STATS_INC(ip.drop);
645 MIB2_STATS_INC(mib2.ipinaddrerrors);
646 MIB2_STATS_INC(mib2.ipindiscards);
657 if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), inp)) {
659 ip4_forward(p, (
struct ip_hdr *)p->payload, inp);
663 IP_STATS_INC(ip.drop);
664 MIB2_STATS_INC(mib2.ipinaddrerrors);
665 MIB2_STATS_INC(mib2.ipindiscards);
671 if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) {
673 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 ip4_reass()\n",
674 lwip_ntohs(IPH_ID(iphdr)), p->tot_len, lwip_ntohs(IPH_LEN(iphdr)), (u16_t)!!(IPH_OFFSET(iphdr) & PP_HTONS(IP_MF)), (u16_t)((lwip_ntohs(IPH_OFFSET(iphdr)) & IP_OFFMASK) * 8)));
681 iphdr = (
const struct ip_hdr *)p->payload;
685 lwip_ntohs(IPH_OFFSET(iphdr))));
686 IP_STATS_INC(ip.opterr);
687 IP_STATS_INC(ip.drop);
689 MIB2_STATS_INC(mib2.ipinunknownprotos);
694#if IP_OPTIONS_ALLOWED == 0
698 if ((iphdr_hlen > IP_HLEN) && (IPH_PROTO(iphdr) != IP_PROTO_IGMP)) {
700 if (iphdr_hlen > IP_HLEN) {
704 IP_STATS_INC(ip.opterr);
705 IP_STATS_INC(ip.drop);
707 MIB2_STATS_INC(mib2.ipinunknownprotos);
713 LWIP_DEBUGF(
IP_DEBUG, (
"ip4_input: \n"));
715 LWIP_DEBUGF(
IP_DEBUG, (
"ip4_input: p->len %"U16_F
" p->tot_len %"U16_F
"\n", p->len, p->tot_len));
717 ip_data.current_netif =
netif;
718 ip_data.current_input_netif = inp;
719 ip_data.current_ip4_header = iphdr;
720 ip_data.current_ip_header_tot_len = IPH_HL_BYTES(iphdr);
724 raw_status = raw_input(p, inp);
725 if (raw_status != RAW_INPUT_EATEN)
730 switch (IPH_PROTO(iphdr)) {
734 case IP_PROTO_UDPLITE:
736 MIB2_STATS_INC(mib2.ipindelivers);
742 MIB2_STATS_INC(mib2.ipindelivers);
748 MIB2_STATS_INC(mib2.ipindelivers);
754 igmp_input(p, inp, ip4_current_dest_addr());
759 if (raw_status == RAW_INPUT_DELIVERED) {
760 MIB2_STATS_INC(mib2.ipindelivers);
766 if (!ip4_addr_isbroadcast(ip4_current_dest_addr(),
netif) &&
767 !ip4_addr_ismulticast(ip4_current_dest_addr())) {
775 IP_STATS_INC(ip.proterr);
776 IP_STATS_INC(ip.drop);
777 MIB2_STATS_INC(mib2.ipinunknownprotos);
785 ip_data.current_netif = NULL;
786 ip_data.current_input_netif = NULL;
787 ip_data.current_ip4_header = NULL;
788 ip_data.current_ip_header_tot_len = 0;
826 return ip4_output_if_opt(p, src, dest, ttl, tos, proto,
netif, NULL, 0);
837 u8_t ttl, u8_t tos, u8_t proto,
struct netif *
netif,
void *ip_options,
842 if (dest != LWIP_IP_HDRINCL) {
843 if (ip4_addr_isany(src)) {
844 src_used = netif_ip4_addr(
netif);
849 return ip4_output_if_opt_src(p, src_used, dest, ttl, tos, proto,
netif,
852 return ip4_output_if_src(p, src_used, dest, ttl, tos, proto,
netif);
866 return ip4_output_if_opt_src(p, src, dest, ttl, tos, proto,
netif, NULL, 0);
875 u8_t ttl, u8_t tos, u8_t proto,
struct netif *
netif,
void *ip_options,
881#if CHECKSUM_GEN_IP_INLINE
888 MIB2_STATS_INC(mib2.ipoutrequests);
891 if (dest != LWIP_IP_HDRINCL) {
892 u16_t ip_hlen = IP_HLEN;
894 u16_t optlen_aligned = 0;
896#if CHECKSUM_GEN_IP_INLINE
899 if (optlen > (IP_HLEN_MAX - IP_HLEN)) {
902 IP_STATS_INC(ip.err);
903 MIB2_STATS_INC(mib2.ipoutdiscards);
907 optlen_aligned = (u16_t)((optlen + 3) & ~3);
908 ip_hlen = (u16_t)(ip_hlen + optlen_aligned);
912 IP_STATS_INC(ip.err);
913 MIB2_STATS_INC(mib2.ipoutdiscards);
916 MEMCPY(p->payload, ip_options, optlen);
917 if (optlen < optlen_aligned) {
919 memset(((
char *)p->payload) + optlen, 0, (
size_t)(optlen_aligned - optlen));
921#if CHECKSUM_GEN_IP_INLINE
922 for (i = 0; i < optlen_aligned / 2; i++) {
923 chk_sum += ((u16_t *)p->payload)[i];
932 IP_STATS_INC(ip.err);
933 MIB2_STATS_INC(mib2.ipoutdiscards);
937 iphdr = (
struct ip_hdr *)p->payload;
938 LWIP_ASSERT(
"check that first pbuf can hold struct ip_hdr",
939 (p->len >=
sizeof(
struct ip_hdr)));
941 IPH_TTL_SET(iphdr, ttl);
942 IPH_PROTO_SET(iphdr, proto);
943#if CHECKSUM_GEN_IP_INLINE
944 chk_sum += PP_NTOHS(proto | (ttl << 8));
949#if CHECKSUM_GEN_IP_INLINE
954 IPH_VHL_SET(iphdr, 4, ip_hlen / 4);
955 IPH_TOS_SET(iphdr, tos);
956#if CHECKSUM_GEN_IP_INLINE
957 chk_sum += PP_NTOHS(tos | (iphdr->_v_hl << 8));
959 IPH_LEN_SET(iphdr, lwip_htons(p->tot_len));
960#if CHECKSUM_GEN_IP_INLINE
961 chk_sum += iphdr->_len;
963 IPH_OFFSET_SET(iphdr, 0);
964 IPH_ID_SET(iphdr, lwip_htons(ip_id));
965#if CHECKSUM_GEN_IP_INLINE
966 chk_sum += iphdr->_id;
977#if CHECKSUM_GEN_IP_INLINE
980 chk_sum = (chk_sum >> 16) + (chk_sum & 0xFFFF);
981 chk_sum = (chk_sum >> 16) + chk_sum;
983 IF__NETIF_CHECKSUM_ENABLED(
netif, NETIF_CHECKSUM_GEN_IP) {
984 iphdr->_chksum = (u16_t)chk_sum;
986#if LWIP_CHECKSUM_CTRL_PER_NETIF
988 IPH_CHKSUM_SET(iphdr, 0);
992 IPH_CHKSUM_SET(iphdr, 0);
994 IF__NETIF_CHECKSUM_ENABLED(
netif, NETIF_CHECKSUM_GEN_IP) {
995 IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, ip_hlen));
1001 if (p->len < IP_HLEN) {
1003 IP_STATS_INC(ip.err);
1004 MIB2_STATS_INC(mib2.ipoutdiscards);
1007 iphdr = (
struct ip_hdr *)p->payload;
1012 IP_STATS_INC(ip.xmit);
1018 if (ip4_addr_eq(dest, netif_ip4_addr(
netif))
1024 LWIP_DEBUGF(
IP_DEBUG, (
"netif_loop_output()\n"));
1025 return netif_loop_output(
netif, p);
1027#if LWIP_MULTICAST_TX_OPTIONS
1029 netif_loop_output(
netif, p);
1036 return ip4_frag(p,
netif, dest);
1040 LWIP_DEBUGF(
IP_DEBUG, (
"ip4_output_if: call netif->output()\n"));
1063 u8_t ttl, u8_t tos, u8_t proto)
1069 if ((
netif = ip4_route_src(src, dest)) == NULL) {
1070 LWIP_DEBUGF(
IP_DEBUG, (
"ip4_output: No route to %"U16_F
".%"U16_F
".%"U16_F
".%"U16_F
"\n",
1071 ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest)));
1072 IP_STATS_INC(ip.rterr);
1076 return ip4_output_if(p, src, dest, ttl, tos, proto,
netif);
1079#if LWIP_NETIF_USE_HINTS
1100 u8_t ttl, u8_t tos, u8_t proto,
struct netif_hint *netif_hint)
1107 if ((
netif = ip4_route_src(src, dest)) == NULL) {
1108 LWIP_DEBUGF(
IP_DEBUG, (
"ip4_output: No route to %"U16_F
".%"U16_F
".%"U16_F
".%"U16_F
"\n",
1109 ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest)));
1110 IP_STATS_INC(ip.rterr);
1114 NETIF_SET_HINTS(
netif, netif_hint);
1115 err = ip4_output_if(p, src, dest, ttl, tos, proto,
netif);
1116 NETIF_RESET_HINTS(
netif);
1127ip4_debug_print(
struct pbuf *p)
1131 LWIP_DEBUGF(
IP_DEBUG, (
"IP header:\n"));
1132 LWIP_DEBUGF(
IP_DEBUG, (
"+-------------------------------+\n"));
1133 LWIP_DEBUGF(
IP_DEBUG, (
"|%2"S16_F
" |%2"S16_F
" | 0x%02"X16_F
" | %5"U16_F
" | (v, hl, tos, len)\n",
1134 (u16_t)IPH_V(iphdr),
1135 (u16_t)IPH_HL(iphdr),
1136 (u16_t)IPH_TOS(iphdr),
1137 lwip_ntohs(IPH_LEN(iphdr))));
1138 LWIP_DEBUGF(
IP_DEBUG, (
"+-------------------------------+\n"));
1139 LWIP_DEBUGF(
IP_DEBUG, (
"| %5"U16_F
" |%"U16_F
"%"U16_F
"%"U16_F
"| %4"U16_F
" | (id, flags, offset)\n",
1140 lwip_ntohs(IPH_ID(iphdr)),
1141 (u16_t)(lwip_ntohs(IPH_OFFSET(iphdr)) >> 15 & 1),
1142 (u16_t)(lwip_ntohs(IPH_OFFSET(iphdr)) >> 14 & 1),
1143 (u16_t)(lwip_ntohs(IPH_OFFSET(iphdr)) >> 13 & 1),
1144 (u16_t)(lwip_ntohs(IPH_OFFSET(iphdr)) & IP_OFFMASK)));
1145 LWIP_DEBUGF(
IP_DEBUG, (
"+-------------------------------+\n"));
1146 LWIP_DEBUGF(
IP_DEBUG, (
"| %3"U16_F
" | %3"U16_F
" | 0x%04"X16_F
" | (ttl, proto, chksum)\n",
1147 (u16_t)IPH_TTL(iphdr),
1148 (u16_t)IPH_PROTO(iphdr),
1149 lwip_ntohs(IPH_CHKSUM(iphdr))));
1150 LWIP_DEBUGF(
IP_DEBUG, (
"+-------------------------------+\n"));
1151 LWIP_DEBUGF(
IP_DEBUG, (
"| %3"U16_F
" | %3"U16_F
" | %3"U16_F
" | %3"U16_F
" | (src)\n",
1152 ip4_addr1_16_val(iphdr->src),
1153 ip4_addr2_16_val(iphdr->src),
1154 ip4_addr3_16_val(iphdr->src),
1155 ip4_addr4_16_val(iphdr->src)));
1156 LWIP_DEBUGF(
IP_DEBUG, (
"+-------------------------------+\n"));
1157 LWIP_DEBUGF(
IP_DEBUG, (
"| %3"U16_F
" | %3"U16_F
" | %3"U16_F
" | %3"U16_F
" | (dest)\n",
1158 ip4_addr1_16_val(iphdr->dest),
1159 ip4_addr2_16_val(iphdr->dest),
1160 ip4_addr3_16_val(iphdr->dest),
1161 ip4_addr4_16_val(iphdr->dest)));
1162 LWIP_DEBUGF(
IP_DEBUG, (
"+-------------------------------+\n"));
#define ip4_addr_copy(dest, src)
struct netif * netif_default
#define ip4_addr_isloopback(ipaddr)
#define IP4_ADDR(ipaddr, a, b, c, d)
#define netif_is_link_up(netif)
#define ip4_addr_get_u32(src_ipaddr)
#define ip4_addr_set_any(ipaddr)
#define LWIP_UNUSED_ARG(x)
#define LWIP_DBG_LEVEL_SERIOUS
#define LWIP_DBG_LEVEL_WARNING
#define CHECKSUM_GEN_ICMP
#define LWIP_ASSERT_CORE_LOCKED()
#define LWIP_NETIF_LOOPBACK
#define MEMCPY(dst, src, len)
#define NETIF_FLAG_BROADCAST
#define netif_is_up(netif)
u8 pbuf_free(struct pbuf *p)
#define LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p)
u8_t pbuf_header_force(struct pbuf *p, s16_t header_size)
u8_t pbuf_add_header(struct pbuf *p, size_t header_size_increment)
#define PBUF_FLAG_LLBCAST
u8_t pbuf_remove_header(struct pbuf *p, size_t header_size)
#define PBUF_FLAG_MCASTLOOP
#define PBUF_FLAG_LLMCAST
struct ip4_addr ip4_addr_t