forked from contiki-os/contiki
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When UIP_UDP is off, turn off udp functions more accurately.
- Loading branch information
matsutsuka
committed
Sep 29, 2007
1 parent
87e32f0
commit a6527b3
Showing
5 changed files
with
23 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ | |
* | ||
* This file is part of the Contiki operating system. | ||
* | ||
* $Id: rawpacket-udp.c,v 1.1 2006/10/22 12:31:46 adamdunkels Exp $ | ||
* $Id: rawpacket-udp.c,v 1.2 2007/09/29 03:54:18 matsutsuka Exp $ | ||
*/ | ||
|
||
/** | ||
|
@@ -38,6 +38,7 @@ | |
* Adam Dunkels <[email protected]> | ||
*/ | ||
|
||
#if UIP_UDP | ||
#include "contiki-net.h" | ||
|
||
#include "net/rawpacket-udp.h" | ||
|
@@ -69,3 +70,4 @@ rawpacket_received(struct rawpacket_conn *c) | |
return uip_newdata() && (struct uip_udp_conn *)c == uip_udp_conn; | ||
} | ||
/*---------------------------------------------------------------------------*/ | ||
#endif /* UIP_UDP */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ | |
* | ||
* Author: Adam Dunkels <[email protected]> | ||
* | ||
* $Id: tcpip.c,v 1.8 2007/05/20 21:29:39 oliverschmidt Exp $ | ||
* $Id: tcpip.c,v 1.9 2007/09/29 03:54:18 matsutsuka Exp $ | ||
*/ | ||
|
||
#include "contiki-net.h" | ||
|
@@ -168,6 +168,7 @@ tcp_attach(struct uip_conn *conn, | |
s->state = appstate; | ||
} | ||
/*---------------------------------------------------------------------------*/ | ||
#if UIP_UDP | ||
void | ||
udp_attach(struct uip_udp_conn *conn, | ||
void *appstate) | ||
|
@@ -210,6 +211,7 @@ udp_broadcast_new(u16_t port, void *appstate) | |
} | ||
return conn; | ||
} | ||
#endif /* UIP_UDP */ | ||
/*---------------------------------------------------------------------------*/ | ||
static void | ||
eventhandler(process_event_t ev, process_data_t data) | ||
|
@@ -306,6 +308,7 @@ eventhandler(process_event_t ev, process_data_t data) | |
|
||
} | ||
break; | ||
#if UIP_UDP | ||
case UDP_POLL: | ||
if(data != NULL) { | ||
uip_udp_periodic_conn(data); | ||
|
@@ -314,6 +317,7 @@ eventhandler(process_event_t ev, process_data_t data) | |
} | ||
} | ||
break; | ||
#endif /* UIP_UDP */ | ||
|
||
case PACKET_INPUT: | ||
packet_input(); | ||
|
@@ -328,11 +332,13 @@ tcpip_input(void) | |
uip_len = 0; | ||
} | ||
/*---------------------------------------------------------------------------*/ | ||
#if UIP_UDP | ||
void | ||
tcpip_poll_udp(struct uip_udp_conn *conn) | ||
{ | ||
process_post(&tcpip_process, UDP_POLL, conn); | ||
} | ||
#endif /* UIP_UDP */ | ||
/*---------------------------------------------------------------------------*/ | ||
void | ||
tcpip_poll_tcp(struct uip_conn *conn) | ||
|
@@ -347,11 +353,15 @@ tcpip_uipcall(void) | |
static unsigned char i; | ||
register struct listenport *l; | ||
|
||
#if UIP_UDP | ||
if(uip_conn != NULL) { | ||
ts = &uip_conn->appstate; | ||
} else { | ||
ts = &uip_udp_conn->appstate; | ||
} | ||
#else /* UIP_UDP */ | ||
ts = &uip_conn->appstate; | ||
#endif /* UIP_UDP */ | ||
|
||
/* If this is a connection request for a listening port, we must | ||
mark the connection with the right process ID. */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ | |
* | ||
* This file is part of the Contiki operating system. | ||
* | ||
* $Id: uaodv.c,v 1.31 2007/08/30 14:39:17 matsutsuka Exp $ | ||
* $Id: uaodv.c,v 1.32 2007/09/29 03:54:18 matsutsuka Exp $ | ||
*/ | ||
|
||
/** | ||
|
@@ -38,7 +38,7 @@ | |
* Adam Dunkels <[email protected]> | ||
*/ | ||
|
||
|
||
#if UIP_UDP | ||
#include <stdio.h> | ||
#include <stdarg.h> | ||
|
||
|
@@ -626,3 +626,4 @@ PROCESS_THREAD(uaodv_process, ev, data) | |
PROCESS_END(); | ||
} | ||
/*---------------------------------------------------------------------------*/ | ||
#endif /* UIP_UDP */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ | |
* | ||
* This file is part of the Contiki operating system. | ||
* | ||
* $Id: uip-udp-packet.c,v 1.3 2007/04/30 15:19:21 bg- Exp $ | ||
* $Id: uip-udp-packet.c,v 1.4 2007/09/29 03:54:18 matsutsuka Exp $ | ||
*/ | ||
|
||
/** | ||
|
@@ -38,6 +38,7 @@ | |
* Adam Dunkels <[email protected]> | ||
*/ | ||
|
||
#if UIP_UDP | ||
#include "net/uip-udp-packet.h" | ||
|
||
#include <string.h> | ||
|
@@ -58,3 +59,4 @@ uip_udp_packet_send(struct uip_udp_conn *c, const void *data, int len) | |
uip_slen = 0; | ||
} | ||
/*---------------------------------------------------------------------------*/ | ||
#endif /* UIP_UDP */ |