mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
ba3088c4bd
into separate patch files
78 lines
2.2 KiB
Diff
78 lines
2.2 KiB
Diff
*** stock_iot-lab_M3/openwsn/04-TRAN/openudp.c Thu Apr 24 11:01:36 2014
|
|
--- riot-openwsn-wip/openwsn/04-TRAN/openudp.c Thu Apr 24 16:55:54 2014
|
|
***************
|
|
*** 21,30 ****
|
|
|
|
//=========================== public ==========================================
|
|
|
|
! void openudp_init() {
|
|
}
|
|
|
|
! error_t openudp_send(OpenQueueEntry_t* msg) {
|
|
msg->owner = COMPONENT_OPENUDP;
|
|
msg->l4_protocol = IANA_UDP;
|
|
msg->l4_payload = msg->payload;
|
|
--- 21,30 ----
|
|
|
|
//=========================== public ==========================================
|
|
|
|
! void openudp_init(void) {
|
|
}
|
|
|
|
! owerror_t openudp_send(OpenQueueEntry_t* msg) {
|
|
msg->owner = COMPONENT_OPENUDP;
|
|
msg->l4_protocol = IANA_UDP;
|
|
msg->l4_payload = msg->payload;
|
|
***************
|
|
*** 37,43 ****
|
|
return forwarding_send(msg);
|
|
}
|
|
|
|
! void openudp_sendDone(OpenQueueEntry_t* msg, error_t error) {
|
|
msg->owner = COMPONENT_OPENUDP;
|
|
switch(msg->l4_sourcePortORicmpv6Type) {
|
|
case WKP_UDP_COAP:
|
|
--- 37,43 ----
|
|
return forwarding_send(msg);
|
|
}
|
|
|
|
! void openudp_sendDone(OpenQueueEntry_t* msg, owerror_t error) {
|
|
msg->owner = COMPONENT_OPENUDP;
|
|
switch(msg->l4_sourcePortORicmpv6Type) {
|
|
case WKP_UDP_COAP:
|
|
***************
|
|
*** 108,115 ****
|
|
case NHC_UDP_PORTS_4S_4D:
|
|
// source port: 0xf0b + 4 bits in-line
|
|
// dest port: 0xf0b + 4 bits in-line
|
|
! msg->l4_sourcePortORicmpv6Type = 0xf0b0 + (msg->payload[0] >> 4) & 0x0f;
|
|
! msg->l4_destination_port = 0xf0b0 + (msg->payload[0] >> 0) & 0x0f;
|
|
packetfunctions_tossHeader(msg,1);
|
|
break;
|
|
}
|
|
--- 108,115 ----
|
|
case NHC_UDP_PORTS_4S_4D:
|
|
// source port: 0xf0b + 4 bits in-line
|
|
// dest port: 0xf0b + 4 bits in-line
|
|
! msg->l4_sourcePortORicmpv6Type = 0xf0b0 + ((msg->payload[0] >> 4) & 0x0f);
|
|
! msg->l4_destination_port = 0xf0b0 + ((msg->payload[0] >> 0) & 0x0f);
|
|
packetfunctions_tossHeader(msg,1);
|
|
break;
|
|
}
|
|
***************
|
|
*** 151,157 ****
|
|
}
|
|
}
|
|
|
|
! bool openudp_debugPrint() {
|
|
return FALSE;
|
|
}
|
|
|
|
--- 151,157 ----
|
|
}
|
|
}
|
|
|
|
! bool openudp_debugPrint(void) {
|
|
return FALSE;
|
|
}
|