ping-ipv6 example compiles on native cygwin

This commit is contained in:
julienabeille 2008-10-14 13:39:12 +00:00
parent b693690fbe
commit 4f9bc05f90
6 changed files with 43 additions and 22 deletions

View file

@ -31,7 +31,6 @@
#include "contiki-lib.h"
#include "contiki-net.h"
#include "frame.h"
#include "mac.h"
#include <string.h>

View file

@ -32,7 +32,7 @@
*
* 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
@ -53,7 +53,6 @@
#include "net/rime.h"
#include "net/sicslowpan.h"
#define DEBUG 0
#if DEBUG
u8_t p;
@ -1049,15 +1048,6 @@ send_packet(rimeaddr_t *dest)
if(mac != NULL) {
/** \todo: Fix sending delays so they aren't blocking, or even better would
* 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();
}
}

View file

@ -30,7 +30,7 @@
*
* 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>
@ -48,6 +48,7 @@
void
uip_split_output(void)
{
#if UIP_TCP
u16_t tcplen, len1, len2;
/* We only try to split maximum sized TCP segments. */
@ -87,7 +88,11 @@ uip_split_output(void)
/* Transmit the first packet. */
/* uip_fw_output();*/
#if UIP_CONF_IPV6
tcpip_ipv6_output();
#else
tcpip_output();
#endif /* UIP_CONF_IPV6 */
/* 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
@ -126,11 +131,21 @@ uip_split_output(void)
/* Transmit the second packet. */
/* uip_fw_output();*/
#if UIP_CONF_IPV6
tcpip_ipv6_output();
#else
tcpip_output();
} else {
/* uip_fw_output();*/
tcpip_output();
#endif /* UIP_CONF_IPV6 */
return;
}
#endif /* UIP_TCP */
/* uip_fw_output();*/
#if UIP_CONF_IPV6
tcpip_ipv6_output();
#else
tcpip_output();
#endif /* UIP_CONF_IPV6 */
}
/*-----------------------------------------------------------------------------*/

View file

@ -28,7 +28,7 @@
*
* 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>
/*---------------------------------------------------------------------------*/
void
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;
memcpy(&uip_buf[UIP_LLH_LEN + UIP_IPUDPH_LEN], data, len > UIP_BUFSIZE? UIP_BUFSIZE: len);
uip_process(UIP_UDP_SEND_CONN);
#if UIP_CONF_IPV6 //math
tcpip_ipv6_output();
#else
if(uip_len > 0) {
tcpip_output();
tcpip_output();
}
#endif
uip_slen = 0;
#endif /* UIP_UDP */
}

View file

@ -41,7 +41,7 @@
*
* 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.
*/
#include "net/uip.h"
#include "net/uipopt.h"
#include "net/uip-icmp6.h"
#include "net/uip-nd6.h"
#include "net/uip-netif.h"

View file

@ -28,7 +28,7 @@
*
* 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__
@ -60,6 +60,16 @@ typedef unsigned short uip_stats_t;
#define UIP_CONF_LOGGING 0
#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;
#define CLOCK_CONF_SECOND 1000