fixed compilation issue on cooja-net driver
This commit is contained in:
parent
4aaf680c5b
commit
48049f120c
@ -41,15 +41,12 @@
|
||||
#include "net/ipv6/tcpip.h"
|
||||
#include "net/packetbuf.h"
|
||||
#include "net/uip-driver.h"
|
||||
#include "net/linkaddr.h"
|
||||
#include <string.h>
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
uint8_t
|
||||
#if NETSTACK_CONF_WITH_IPV6
|
||||
uip_driver_send(const uip_lladdr_t *addr)
|
||||
#else
|
||||
uip_driver_send(void)
|
||||
#endif
|
||||
uip_driver_send(const linkaddr_t *addr)
|
||||
{
|
||||
packetbuf_copyfrom(&uip_buf[UIP_LLH_LEN], uip_len);
|
||||
|
||||
|
@ -108,11 +108,13 @@ static enum netstack_ip_action
|
||||
ip_output(const linkaddr_t *localdest)
|
||||
{
|
||||
uint8_t proto;
|
||||
uint8_t is_me = 0;
|
||||
uipbuf_get_last_header(uip_buf, uip_len, &proto);
|
||||
PRINTF("Send packet proto: %d to ", proto);
|
||||
is_me = uip_ds6_is_my_addr(&UIP_IP_BUF->srcipaddr);
|
||||
PRINTF("%s packet proto: %d to ", is_me ? "Send" : "Fwd ", proto);
|
||||
PRINT6ADDR(&UIP_IP_BUF->destipaddr);
|
||||
PRINTF("\n");
|
||||
if(proto == UIP_PROTO_UDP) {
|
||||
if(is_me && proto == UIP_PROTO_UDP) {
|
||||
/* fake server-ip address here - just to emulate the UDP-example */
|
||||
PRINTF("DATA send to %d 'Hello %d'\n", 1, seq_id);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user