From caa02ae51e2e81d479f613f6bd5463b51f2a2db2 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Wed, 17 Oct 2018 09:24:52 +0200 Subject: [PATCH] Define UIP_IP_BUF globally in uip.h --- examples/libs/ipv6-hooks/ipv6-hooks.c | 2 -- examples/multicast/sink.c | 2 -- .../jn516x/tsch/simple-sensor-network/node/node.c | 2 -- os/net/app-layer/coap/coap-uip.c | 1 - os/net/ipv6/multicast/esmrf.c | 1 - os/net/ipv6/multicast/roll-tm.c | 1 - os/net/ipv6/multicast/smrf.c | 4 ---- os/net/ipv6/sicslowpan.c | 2 -- os/net/ipv6/simple-udp.c | 12 ++++++------ os/net/ipv6/tcpip.c | 1 - os/net/ipv6/udp-socket.c | 11 +++++------ os/net/ipv6/uip-icmp6.c | 1 - os/net/ipv6/uip-nd6.c | 1 - os/net/ipv6/uip.h | 5 +++++ os/net/ipv6/uip6.c | 1 - os/net/routing/rpl-classic/rpl-ext-header.c | 1 - os/net/routing/rpl-classic/rpl-icmp6.c | 1 - os/net/routing/rpl-classic/rpl-nbr-policy.c | 1 - os/net/routing/rpl-lite/rpl-ext-header.c | 1 - os/net/routing/rpl-lite/rpl-icmp6.c | 1 - os/net/routing/rpl-lite/rpl-nbr-policy.c | 1 - os/services/ip64/ip64-eth-interface.c | 2 -- os/services/ip64/ip64-slip-interface.c | 8 +++----- os/services/rpl-border-router/embedded/slip-bridge.c | 2 -- tools/sky/uip6-bridge/fakeuip.c | 2 -- tools/sky/uip6-bridge/sicslow_ethernet.c | 1 - tools/sky/uip6-bridge/uip6-bridge-tap.c | 2 -- 27 files changed, 19 insertions(+), 51 deletions(-) diff --git a/examples/libs/ipv6-hooks/ipv6-hooks.c b/examples/libs/ipv6-hooks/ipv6-hooks.c index d3ca8861c..8d8561049 100644 --- a/examples/libs/ipv6-hooks/ipv6-hooks.c +++ b/examples/libs/ipv6-hooks/ipv6-hooks.c @@ -10,8 +10,6 @@ #define LOG_MODULE "App" #define LOG_LEVEL LOG_LEVEL_INFO -#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) - /*---------------------------------------------------------------------------*/ PROCESS(ipv6_hooks_process, "IPv6 Hooks"); AUTOSTART_PROCESSES(&ipv6_hooks_process); diff --git a/examples/multicast/sink.c b/examples/multicast/sink.c index 34ad6009d..49180b69a 100644 --- a/examples/multicast/sink.c +++ b/examples/multicast/sink.c @@ -55,8 +55,6 @@ static struct uip_udp_conn *sink_conn; static uint16_t count; -#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) - #if !NETSTACK_CONF_WITH_IPV6 || !UIP_CONF_ROUTER || !UIP_IPV6_MULTICAST || !UIP_CONF_IPV6_RPL #error "This example can not work with the current contiki configuration" #error "Check the values of: NETSTACK_CONF_WITH_IPV6, UIP_CONF_ROUTER, UIP_CONF_IPV6_RPL" diff --git a/examples/platform-specific/jn516x/tsch/simple-sensor-network/node/node.c b/examples/platform-specific/jn516x/tsch/simple-sensor-network/node/node.c index 251b0d135..b3ef311fd 100644 --- a/examples/platform-specific/jn516x/tsch/simple-sensor-network/node/node.c +++ b/examples/platform-specific/jn516x/tsch/simple-sensor-network/node/node.c @@ -50,8 +50,6 @@ #define DEBUG DEBUG_PRINT #include "net/ipv6/uip-debug.h" -#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) - #define INTERVAL (10) #define BLINK_TIME (CLOCK_SECOND/4) diff --git a/os/net/app-layer/coap/coap-uip.c b/os/net/app-layer/coap/coap-uip.c index 1e817e657..3c9347bc6 100644 --- a/os/net/app-layer/coap/coap-uip.c +++ b/os/net/app-layer/coap/coap-uip.c @@ -78,7 +78,6 @@ #define SERVER_LISTEN_SECURE_PORT UIP_HTONS(COAP_DEFAULT_SECURE_PORT) /* direct access into the buffer */ -#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) #define UIP_UDP_BUF ((struct uip_udp_hdr *)&uip_buf[uip_l2_l3_hdr_len]) #ifdef WITH_DTLS diff --git a/os/net/ipv6/multicast/esmrf.c b/os/net/ipv6/multicast/esmrf.c index 5b6f1b863..edbc32b16 100644 --- a/os/net/ipv6/multicast/esmrf.c +++ b/os/net/ipv6/multicast/esmrf.c @@ -105,7 +105,6 @@ static uip_ipaddr_t des_ip; /*---------------------------------------------------------------------------*/ /* uIPv6 Pointers */ /*---------------------------------------------------------------------------*/ -#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) #define UIP_ICMP_BUF ((struct uip_icmp_hdr *)&uip_buf[uip_l2_l3_hdr_len]) #define UIP_ICMP_PAYLOAD ((unsigned char *)&uip_buf[uip_l2_l3_icmp_hdr_len]) #define UIP_UDP_BUF ((struct uip_udp_hdr *)&uip_buf[UIP_LLH_LEN + UIP_IPH_LEN]) diff --git a/os/net/ipv6/multicast/roll-tm.c b/os/net/ipv6/multicast/roll-tm.c index 1d19512d6..20a681fc5 100644 --- a/os/net/ipv6/multicast/roll-tm.c +++ b/os/net/ipv6/multicast/roll-tm.c @@ -461,7 +461,6 @@ static uint16_t last_seq; #define UIP_EXT_BUF ((struct uip_ext_hdr *)&uip_buf[UIP_LLH_LEN + UIP_IPH_LEN]) #define UIP_EXT_BUF_NEXT ((uint8_t *)&uip_buf[UIP_LLH_LEN + UIP_IPH_LEN + HBHO_TOTAL_LEN]) #define UIP_EXT_OPT_FIRST ((struct hbho_mcast *)&uip_buf[UIP_LLH_LEN + UIP_IPH_LEN + 2]) -#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) #define UIP_ICMP_BUF ((struct uip_icmp_hdr *)&uip_buf[uip_l2_l3_hdr_len]) #define UIP_ICMP_PAYLOAD ((unsigned char *)&uip_buf[uip_l2_l3_icmp_hdr_len]) extern uint16_t uip_slen; diff --git a/os/net/ipv6/multicast/smrf.c b/os/net/ipv6/multicast/smrf.c index 86a053648..bb23b060b 100644 --- a/os/net/ipv6/multicast/smrf.c +++ b/os/net/ipv6/multicast/smrf.c @@ -77,10 +77,6 @@ static uip_buf_t mcast_buf; static uint8_t fwd_delay; static uint8_t fwd_spread; /*---------------------------------------------------------------------------*/ -/* uIPv6 Pointers */ -/*---------------------------------------------------------------------------*/ -#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) -/*---------------------------------------------------------------------------*/ static void mcast_fwd(void *p) { diff --git a/os/net/ipv6/sicslowpan.c b/os/net/ipv6/sicslowpan.c index 9e4e3a8b4..b5c23a3be 100644 --- a/os/net/ipv6/sicslowpan.c +++ b/os/net/ipv6/sicslowpan.c @@ -121,8 +121,6 @@ #define SICSLOWPAN_UDP_BUF(buf) ((struct uip_udp_hdr *)&buf[UIP_IPH_LEN]) #define SICSLOWPAN_IPPAYLOAD_BUF(buf) (&buf[UIP_IPH_LEN]) - -#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) #define UIP_UDP_BUF(p) ((struct uip_udp_hdr *)&uip_buf[UIP_LLIPH_LEN + p]) #define UIP_TCP_BUF ((struct uip_tcp_hdr *)&uip_buf[UIP_LLIPH_LEN]) #define UIP_ICMP_BUF ((struct uip_icmp_hdr *)&uip_buf[UIP_LLIPH_LEN]) diff --git a/os/net/ipv6/simple-udp.c b/os/net/ipv6/simple-udp.c index c98107c99..49aab96dc 100644 --- a/os/net/ipv6/simple-udp.c +++ b/os/net/ipv6/simple-udp.c @@ -52,7 +52,7 @@ PROCESS(simple_udp_process, "Simple UDP process"); static uint8_t started = 0; static uint8_t databuffer[UIP_BUFSIZE]; -#define UIP_IP_BUF ((struct uip_udpip_hdr *)&uip_buf[UIP_LLH_LEN]) +#define UIP_UDPIP_BUF ((struct uip_udpip_hdr *)&uip_buf[UIP_LLH_LEN]) /*---------------------------------------------------------------------------*/ static void @@ -134,7 +134,7 @@ PROCESS_THREAD(simple_udp_process, ev, data) { struct simple_udp_connection *c; PROCESS_BEGIN(); - + while(1) { PROCESS_WAIT_EVENT(); if(ev == tcpip_event) { @@ -164,10 +164,10 @@ PROCESS_THREAD(simple_udp_process, ev, data) if(c->receive_callback != NULL) { PROCESS_CONTEXT_BEGIN(c->client_process); c->receive_callback(c, - &(UIP_IP_BUF->srcipaddr), - UIP_HTONS(UIP_IP_BUF->srcport), - &(UIP_IP_BUF->destipaddr), - UIP_HTONS(UIP_IP_BUF->destport), + &(UIP_UDPIP_BUF->srcipaddr), + UIP_HTONS(UIP_UDPIP_BUF->srcport), + &(UIP_UDPIP_BUF->destipaddr), + UIP_HTONS(UIP_UDPIP_BUF->destport), databuffer, uip_datalen()); PROCESS_CONTEXT_END(); } diff --git a/os/net/ipv6/tcpip.c b/os/net/ipv6/tcpip.c index 8d546c1d7..740054010 100644 --- a/os/net/ipv6/tcpip.c +++ b/os/net/ipv6/tcpip.c @@ -56,7 +56,6 @@ #define LOG_LEVEL LOG_LEVEL_TCPIP #define UIP_ICMP_BUF ((struct uip_icmp_hdr *)&uip_buf[UIP_LLIPH_LEN + uip_ext_len]) -#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) #define UIP_TCP_BUF ((struct uip_tcpip_hdr *)&uip_buf[UIP_LLH_LEN]) #ifdef UIP_FALLBACK_INTERFACE diff --git a/os/net/ipv6/udp-socket.c b/os/net/ipv6/udp-socket.c index 700306ca1..11126fedc 100644 --- a/os/net/ipv6/udp-socket.c +++ b/os/net/ipv6/udp-socket.c @@ -38,8 +38,7 @@ PROCESS(udp_socket_process, "UDP socket process"); static uint8_t buf[UIP_BUFSIZE]; -#define UIP_IP_BUF ((struct uip_udpip_hdr *)&uip_buf[UIP_LLH_LEN]) - +#define UIP_UDPIP_BUF ((struct uip_udpip_hdr *)&uip_buf[UIP_LLH_LEN]) /*---------------------------------------------------------------------------*/ static void @@ -181,10 +180,10 @@ PROCESS_THREAD(udp_socket_process, ev, data) if(c->input_callback != NULL) { PROCESS_CONTEXT_BEGIN(c->p); c->input_callback(c, c->ptr, - &(UIP_IP_BUF->srcipaddr), - UIP_HTONS(UIP_IP_BUF->srcport), - &(UIP_IP_BUF->destipaddr), - UIP_HTONS(UIP_IP_BUF->destport), + &(UIP_UDPIP_BUF->srcipaddr), + UIP_HTONS(UIP_UDPIP_BUF->srcport), + &(UIP_UDPIP_BUF->destipaddr), + UIP_HTONS(UIP_UDPIP_BUF->destport), buf, uip_datalen()); PROCESS_CONTEXT_END(); } diff --git a/os/net/ipv6/uip-icmp6.c b/os/net/ipv6/uip-icmp6.c index 707a13309..13d03a859 100644 --- a/os/net/ipv6/uip-icmp6.c +++ b/os/net/ipv6/uip-icmp6.c @@ -53,7 +53,6 @@ #define LOG_MODULE "ICMPv6" #define LOG_LEVEL LOG_LEVEL_IPV6 -#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) #define UIP_ICMP_BUF ((struct uip_icmp_hdr *)&uip_buf[uip_l2_l3_hdr_len]) #define UIP_ICMP6_ERROR_BUF ((struct uip_icmp6_error *)&uip_buf[uip_l2_l3_icmp_hdr_len]) #define UIP_EXT_BUF ((struct uip_ext_hdr *)&uip_buf[uip_l2_l3_hdr_len]) diff --git a/os/net/ipv6/uip-nd6.c b/os/net/ipv6/uip-nd6.c index 63ae46b47..d3e50bdcf 100644 --- a/os/net/ipv6/uip-nd6.c +++ b/os/net/ipv6/uip-nd6.c @@ -94,7 +94,6 @@ * value of these length variables */ -#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) /**< Pointer to IP header */ #define UIP_ICMP_BUF ((struct uip_icmp_hdr *)&uip_buf[uip_l2_l3_hdr_len]) /**< Pointer to ICMP header*/ /**@{ Pointers to messages just after icmp header */ #define UIP_ND6_RS_BUF ((uip_nd6_rs *)&uip_buf[uip_l2_l3_icmp_hdr_len]) diff --git a/os/net/ipv6/uip.h b/os/net/ipv6/uip.h index 5e72ba844..fa3bdbd98 100755 --- a/os/net/ipv6/uip.h +++ b/os/net/ipv6/uip.h @@ -76,6 +76,11 @@ #define uip_l2_l3_icmp_hdr_len (UIP_LLH_LEN + UIP_IPH_LEN + uip_ext_len + UIP_ICMPH_LEN) #define uip_l3_icmp_hdr_len (UIP_IPH_LEN + uip_ext_len + UIP_ICMPH_LEN) +/** + * Direct access to IPv6 header + */ +#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) + #include "net/ipv6/uipopt.h" #include "net/ipv6/uipbuf.h" #include "net/linkaddr.h" diff --git a/os/net/ipv6/uip6.c b/os/net/ipv6/uip6.c index dfbec52b7..5b86de266 100644 --- a/os/net/ipv6/uip6.c +++ b/os/net/ipv6/uip6.c @@ -142,7 +142,6 @@ uint8_t uip_ext_opt_offset = 0; * @{ */ #define FBUF ((struct uip_tcpip_hdr *)&uip_reassbuf[0]) -#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) #define UIP_ICMP_BUF ((struct uip_icmp_hdr *)&uip_buf[uip_l2_l3_hdr_len]) #define UIP_UDP_BUF ((struct uip_udp_hdr *)&uip_buf[UIP_LLH_LEN + UIP_IPH_LEN]) #define UIP_TCP_BUF ((struct uip_tcp_hdr *)&uip_buf[UIP_LLH_LEN + UIP_IPH_LEN]) diff --git a/os/net/routing/rpl-classic/rpl-ext-header.c b/os/net/routing/rpl-classic/rpl-ext-header.c index 8488d5ac6..18ebfa3a8 100644 --- a/os/net/routing/rpl-classic/rpl-ext-header.c +++ b/os/net/routing/rpl-classic/rpl-ext-header.c @@ -61,7 +61,6 @@ #include /*---------------------------------------------------------------------------*/ -#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) #define UIP_EXT_BUF ((struct uip_ext_hdr *)&uip_buf[uip_l2_l3_hdr_len]) #define UIP_HBHO_BUF ((struct uip_hbho_hdr *)&uip_buf[uip_l2_l3_hdr_len]) #define UIP_HBHO_NEXT_BUF ((struct uip_ext_hdr *)&uip_buf[uip_l2_l3_hdr_len + RPL_HOP_BY_HOP_LEN]) diff --git a/os/net/routing/rpl-classic/rpl-icmp6.c b/os/net/routing/rpl-classic/rpl-icmp6.c index a246e576e..ed0bde02a 100644 --- a/os/net/routing/rpl-classic/rpl-icmp6.c +++ b/os/net/routing/rpl-classic/rpl-icmp6.c @@ -70,7 +70,6 @@ #define RPL_DIO_MOP_MASK 0x38 #define RPL_DIO_PREFERENCE_MASK 0x07 -#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) #define UIP_ICMP_BUF ((struct uip_icmp_hdr *)&uip_buf[uip_l2_l3_hdr_len]) #define UIP_ICMP_PAYLOAD ((unsigned char *)&uip_buf[uip_l2_l3_icmp_hdr_len]) /*---------------------------------------------------------------------------*/ diff --git a/os/net/routing/rpl-classic/rpl-nbr-policy.c b/os/net/routing/rpl-classic/rpl-nbr-policy.c index 344840d0e..f6b26bae2 100644 --- a/os/net/routing/rpl-classic/rpl-nbr-policy.c +++ b/os/net/routing/rpl-classic/rpl-nbr-policy.c @@ -65,7 +65,6 @@ * neighbors and are not only MAC neighbors. */ #define MAX_CHILDREN (NBR_TABLE_MAX_NEIGHBORS - 2) -#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) static int num_parents; /* any node that are possible parents */ static int num_children; /* all children that we have as nexthop */ diff --git a/os/net/routing/rpl-lite/rpl-ext-header.c b/os/net/routing/rpl-lite/rpl-ext-header.c index af67cdaff..414a93104 100644 --- a/os/net/routing/rpl-lite/rpl-ext-header.c +++ b/os/net/routing/rpl-lite/rpl-ext-header.c @@ -54,7 +54,6 @@ #define LOG_LEVEL LOG_LEVEL_RPL /*---------------------------------------------------------------------------*/ -#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) #define UIP_EXT_BUF ((struct uip_ext_hdr *)&uip_buf[uip_l2_l3_hdr_len]) #define UIP_HBHO_BUF ((struct uip_hbho_hdr *)&uip_buf[uip_l2_l3_hdr_len]) #define UIP_HBHO_NEXT_BUF ((struct uip_ext_hdr *)&uip_buf[uip_l2_l3_hdr_len + RPL_HOP_BY_HOP_LEN]) diff --git a/os/net/routing/rpl-lite/rpl-icmp6.c b/os/net/routing/rpl-lite/rpl-icmp6.c index be5ea2948..f369b34c7 100644 --- a/os/net/routing/rpl-lite/rpl-icmp6.c +++ b/os/net/routing/rpl-lite/rpl-icmp6.c @@ -62,7 +62,6 @@ #define RPL_DIO_MOP_MASK 0x38 #define RPL_DIO_PREFERENCE_MASK 0x07 -#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) #define UIP_ICMP_BUF ((struct uip_icmp_hdr *)&uip_buf[uip_l2_l3_hdr_len]) #define UIP_ICMP_PAYLOAD ((unsigned char *)&uip_buf[uip_l2_l3_icmp_hdr_len]) diff --git a/os/net/routing/rpl-lite/rpl-nbr-policy.c b/os/net/routing/rpl-lite/rpl-nbr-policy.c index 9752b1446..0c542f780 100644 --- a/os/net/routing/rpl-lite/rpl-nbr-policy.c +++ b/os/net/routing/rpl-lite/rpl-nbr-policy.c @@ -59,7 +59,6 @@ * NOTE: this policy assumes that all neighbors end up being IPv6 * neighbors and are not only MAC neighbors. */ -#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) static int num_parents; /* all nodes that are possible parents */ static int num_free; diff --git a/os/services/ip64/ip64-eth-interface.c b/os/services/ip64/ip64-eth-interface.c index 1dcaeb5ad..d70b7576a 100644 --- a/os/services/ip64/ip64-eth-interface.c +++ b/os/services/ip64/ip64-eth-interface.c @@ -39,8 +39,6 @@ #include -#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) - #define DEBUG DEBUG_NONE #include "net/ipv6/uip-debug.h" #define printf(...) diff --git a/os/services/ip64/ip64-slip-interface.c b/os/services/ip64/ip64-slip-interface.c index 10422f2c7..665a342d9 100644 --- a/os/services/ip64/ip64-slip-interface.c +++ b/os/services/ip64/ip64-slip-interface.c @@ -38,8 +38,6 @@ #include #include -#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) - #define DEBUG DEBUG_NONE #include "net/ipv6/uip-debug.h" @@ -88,12 +86,12 @@ input_callback(void) } uip_clear_buf(); } else { - + /* Save the last sender received over SLIP to avoid bouncing the packet back if no route is found */ uip_ipaddr_copy(&last_sender, &UIP_IP_BUF->srcipaddr); - - uint16_t len = ip64_4to6(&uip_buf[UIP_LLH_LEN], uip_len, + + uint16_t len = ip64_4to6(&uip_buf[UIP_LLH_LEN], uip_len, ip64_packet_buffer); if(len > 0) { memcpy(&uip_buf[UIP_LLH_LEN], ip64_packet_buffer, len); diff --git a/os/services/rpl-border-router/embedded/slip-bridge.c b/os/services/rpl-border-router/embedded/slip-bridge.c index d1f97339d..ff980ea69 100644 --- a/os/services/rpl-border-router/embedded/slip-bridge.c +++ b/os/services/rpl-border-router/embedded/slip-bridge.c @@ -43,8 +43,6 @@ #include "dev/slip.h" #include /*---------------------------------------------------------------------------*/ -#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) -/*---------------------------------------------------------------------------*/ /* Log configuration */ #include "sys/log.h" #define LOG_MODULE "SLIP" diff --git a/tools/sky/uip6-bridge/fakeuip.c b/tools/sky/uip6-bridge/fakeuip.c index 84f6440ce..86658429a 100644 --- a/tools/sky/uip6-bridge/fakeuip.c +++ b/tools/sky/uip6-bridge/fakeuip.c @@ -8,8 +8,6 @@ #include "net/ipv6/uip-ds6.h" #include -#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) - uip_buf_t uip_aligned_buf; uint16_t uip_len; diff --git a/tools/sky/uip6-bridge/sicslow_ethernet.c b/tools/sky/uip6-bridge/sicslow_ethernet.c index 7217e3229..317c7abe8 100644 --- a/tools/sky/uip6-bridge/sicslow_ethernet.c +++ b/tools/sky/uip6-bridge/sicslow_ethernet.c @@ -155,7 +155,6 @@ //#define PRINTF printf #define PRINTF(...) -#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) #define ETHBUF(x) ((struct uip_eth_hdr *)x) //For little endian, such as our friend mr. AVR diff --git a/tools/sky/uip6-bridge/uip6-bridge-tap.c b/tools/sky/uip6-bridge/uip6-bridge-tap.c index 694499b6d..19ce22a6f 100644 --- a/tools/sky/uip6-bridge/uip6-bridge-tap.c +++ b/tools/sky/uip6-bridge/uip6-bridge-tap.c @@ -48,8 +48,6 @@ #include #include -#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) - PROCESS(uip6_bridge, "IPv6/6lowpan TAP bridge"); PROCESS(tcpip_process, "tcpip dummy"); AUTOSTART_PROCESSES(&uip6_bridge);