ping-ipv6 example compiles on native cygwin
This commit is contained in:
parent
b693690fbe
commit
4f9bc05f90
|
@ -31,7 +31,6 @@
|
||||||
#include "contiki-lib.h"
|
#include "contiki-lib.h"
|
||||||
#include "contiki-net.h"
|
#include "contiki-net.h"
|
||||||
|
|
||||||
#include "frame.h"
|
|
||||||
#include "mac.h"
|
#include "mac.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: sicslowpan.c,v 1.2 2008/10/14 12:26:18 adamdunkels Exp $
|
* $Id: sicslowpan.c,v 1.3 2008/10/14 13:39:12 julienabeille Exp $
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* \file
|
* \file
|
||||||
|
@ -53,7 +53,6 @@
|
||||||
#include "net/rime.h"
|
#include "net/rime.h"
|
||||||
#include "net/sicslowpan.h"
|
#include "net/sicslowpan.h"
|
||||||
|
|
||||||
|
|
||||||
#define DEBUG 0
|
#define DEBUG 0
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
u8_t p;
|
u8_t p;
|
||||||
|
@ -1049,15 +1048,6 @@ send_packet(rimeaddr_t *dest)
|
||||||
if(mac != NULL) {
|
if(mac != NULL) {
|
||||||
/** \todo: Fix sending delays so they aren't blocking, or even better would
|
/** \todo: Fix sending delays so they aren't blocking, or even better would
|
||||||
* be to figure out how to get rid of delays entirely */
|
* be to figure out how to get rid of delays entirely */
|
||||||
|
|
||||||
|
|
||||||
#if DEBUG
|
|
||||||
#warning "*************************************************************"
|
|
||||||
#warning "Debug code enabled in sicslowpan.c, you MUST enable debug "
|
|
||||||
#warning "code in sicslowmac.c as well, and ALL nodes on network must "
|
|
||||||
#warning "have debug code in sicslowmac.c enabled. See documentation "
|
|
||||||
#warning "*************************************************************"
|
|
||||||
#endif
|
|
||||||
mac->send();
|
mac->send();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
*
|
*
|
||||||
* Author: Adam Dunkels <adam@sics.se>
|
* Author: Adam Dunkels <adam@sics.se>
|
||||||
*
|
*
|
||||||
* $Id: uip-split.c,v 1.1 2006/06/17 22:41:19 adamdunkels Exp $
|
* $Id: uip-split.c,v 1.2 2008/10/14 13:39:12 julienabeille Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -48,6 +48,7 @@
|
||||||
void
|
void
|
||||||
uip_split_output(void)
|
uip_split_output(void)
|
||||||
{
|
{
|
||||||
|
#if UIP_TCP
|
||||||
u16_t tcplen, len1, len2;
|
u16_t tcplen, len1, len2;
|
||||||
|
|
||||||
/* We only try to split maximum sized TCP segments. */
|
/* We only try to split maximum sized TCP segments. */
|
||||||
|
@ -87,7 +88,11 @@ uip_split_output(void)
|
||||||
|
|
||||||
/* Transmit the first packet. */
|
/* Transmit the first packet. */
|
||||||
/* uip_fw_output();*/
|
/* uip_fw_output();*/
|
||||||
|
#if UIP_CONF_IPV6
|
||||||
|
tcpip_ipv6_output();
|
||||||
|
#else
|
||||||
tcpip_output();
|
tcpip_output();
|
||||||
|
#endif /* UIP_CONF_IPV6 */
|
||||||
|
|
||||||
/* Now, create the second packet. To do this, it is not enough to
|
/* Now, create the second packet. To do this, it is not enough to
|
||||||
just alter the length field, but we must also update the TCP
|
just alter the length field, but we must also update the TCP
|
||||||
|
@ -126,11 +131,21 @@ uip_split_output(void)
|
||||||
|
|
||||||
/* Transmit the second packet. */
|
/* Transmit the second packet. */
|
||||||
/* uip_fw_output();*/
|
/* uip_fw_output();*/
|
||||||
|
#if UIP_CONF_IPV6
|
||||||
|
tcpip_ipv6_output();
|
||||||
|
#else
|
||||||
tcpip_output();
|
tcpip_output();
|
||||||
} else {
|
#endif /* UIP_CONF_IPV6 */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif /* UIP_TCP */
|
||||||
|
|
||||||
/* uip_fw_output();*/
|
/* uip_fw_output();*/
|
||||||
|
#if UIP_CONF_IPV6
|
||||||
|
tcpip_ipv6_output();
|
||||||
|
#else
|
||||||
tcpip_output();
|
tcpip_output();
|
||||||
|
#endif /* UIP_CONF_IPV6 */
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------*/
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: uip-udp-packet.c,v 1.5 2007/11/17 18:05:21 adamdunkels Exp $
|
* $Id: uip-udp-packet.c,v 1.6 2008/10/14 13:39:12 julienabeille Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,6 +46,7 @@ extern u16_t uip_slen;
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
uip_udp_packet_send(struct uip_udp_conn *c, const void *data, int len)
|
uip_udp_packet_send(struct uip_udp_conn *c, const void *data, int len)
|
||||||
|
@ -55,9 +56,13 @@ uip_udp_packet_send(struct uip_udp_conn *c, const void *data, int len)
|
||||||
uip_slen = len;
|
uip_slen = len;
|
||||||
memcpy(&uip_buf[UIP_LLH_LEN + UIP_IPUDPH_LEN], data, len > UIP_BUFSIZE? UIP_BUFSIZE: len);
|
memcpy(&uip_buf[UIP_LLH_LEN + UIP_IPUDPH_LEN], data, len > UIP_BUFSIZE? UIP_BUFSIZE: len);
|
||||||
uip_process(UIP_UDP_SEND_CONN);
|
uip_process(UIP_UDP_SEND_CONN);
|
||||||
|
#if UIP_CONF_IPV6 //math
|
||||||
|
tcpip_ipv6_output();
|
||||||
|
#else
|
||||||
if(uip_len > 0) {
|
if(uip_len > 0) {
|
||||||
tcpip_output();
|
tcpip_output();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
uip_slen = 0;
|
uip_slen = 0;
|
||||||
#endif /* UIP_UDP */
|
#endif /* UIP_UDP */
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the uIP TCP/IP stack.
|
* This file is part of the uIP TCP/IP stack.
|
||||||
*
|
*
|
||||||
* $Id: uip6.c,v 1.2 2008/10/14 12:26:18 adamdunkels Exp $
|
* $Id: uip6.c,v 1.3 2008/10/14 13:39:12 julienabeille Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -71,6 +71,8 @@
|
||||||
* the packet back to the peer.
|
* the packet back to the peer.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "net/uip.h"
|
||||||
|
#include "net/uipopt.h"
|
||||||
#include "net/uip-icmp6.h"
|
#include "net/uip-icmp6.h"
|
||||||
#include "net/uip-nd6.h"
|
#include "net/uip-nd6.h"
|
||||||
#include "net/uip-netif.h"
|
#include "net/uip-netif.h"
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* @(#)$Id: contiki-conf.h,v 1.8 2007/11/28 15:32:25 adamdunkels Exp $
|
* @(#)$Id: contiki-conf.h,v 1.9 2008/10/14 13:39:12 julienabeille Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __CONTIKI_CONF_H__
|
#ifndef __CONTIKI_CONF_H__
|
||||||
|
@ -60,6 +60,16 @@ typedef unsigned short uip_stats_t;
|
||||||
#define UIP_CONF_LOGGING 0
|
#define UIP_CONF_LOGGING 0
|
||||||
#define UIP_CONF_UDP_CHECKSUMS 1
|
#define UIP_CONF_UDP_CHECKSUMS 1
|
||||||
|
|
||||||
|
#define UIP_CONF_IPV6 1
|
||||||
|
#define UIP_CONF_IPV6_CHECKS 1
|
||||||
|
#define UIP_CONF_IPV6_QUEUE_PKT 1
|
||||||
|
#define UIP_CONF_IPV6_REASSEMBLY 0
|
||||||
|
#define UIP_CONF_NETIF_MAX_ADDRESSES 3
|
||||||
|
#define UIP_CONF_ND6_MAX_PREFIXES 3
|
||||||
|
#define UIP_CONF_ND6_MAX_NEIGHBORS 4
|
||||||
|
#define UIP_CONF_ND6_MAX_DEFROUTERS 2
|
||||||
|
#define UIP_CONF_ICMP6 1
|
||||||
|
|
||||||
typedef unsigned long clock_time_t;
|
typedef unsigned long clock_time_t;
|
||||||
#define CLOCK_CONF_SECOND 1000
|
#define CLOCK_CONF_SECOND 1000
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue