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.1 KiB
Diff
78 lines
2.1 KiB
Diff
*** stock_iot-lab_M3/openwsn/04-TRAN/opentcp.h Thu Apr 24 11:01:36 2014
|
|
--- riot-openwsn-wip/openwsn/04-TRAN/opentcp.h Thu Apr 24 16:53:29 2014
|
|
***************
|
|
*** 4,13 ****
|
|
/**
|
|
\addtogroup Transport
|
|
\{
|
|
! \addtogroup TCP
|
|
\{
|
|
*/
|
|
|
|
//=========================== define ==========================================
|
|
|
|
enum {
|
|
--- 4,15 ----
|
|
/**
|
|
\addtogroup Transport
|
|
\{
|
|
! \addtogroup OpenTcp
|
|
\{
|
|
*/
|
|
|
|
+ #include "opentimers.h"
|
|
+
|
|
//=========================== define ==========================================
|
|
|
|
enum {
|
|
***************
|
|
*** 98,114 ****
|
|
uint16_t urgent_pointer;
|
|
} tcp_ht;
|
|
|
|
! //=========================== variables =======================================
|
|
|
|
//=========================== prototypes ======================================
|
|
|
|
! void opentcp_init();
|
|
! error_t opentcp_connect(open_addr_t* dest, uint16_t param_hisPort, uint16_t param_myPort);
|
|
! error_t opentcp_send(OpenQueueEntry_t* msg);
|
|
! void opentcp_sendDone(OpenQueueEntry_t* msg, error_t error);
|
|
void opentcp_receive(OpenQueueEntry_t* msg);
|
|
! error_t opentcp_close();
|
|
! bool opentcp_debugPrint();
|
|
|
|
/**
|
|
\}
|
|
--- 100,129 ----
|
|
uint16_t urgent_pointer;
|
|
} tcp_ht;
|
|
|
|
! //=========================== module variables ================================
|
|
!
|
|
! typedef struct {
|
|
! uint8_t state;
|
|
! uint32_t mySeqNum;
|
|
! uint16_t myPort;
|
|
! uint32_t hisNextSeqNum;
|
|
! uint16_t hisPort;
|
|
! open_addr_t hisIPv6Address;
|
|
! OpenQueueEntry_t* dataToSend;
|
|
! OpenQueueEntry_t* dataReceived;
|
|
! bool timerStarted;
|
|
! opentimer_id_t timerId;
|
|
! } tcp_vars_t;
|
|
|
|
//=========================== prototypes ======================================
|
|
|
|
! void opentcp_init(void);
|
|
! owerror_t opentcp_connect(open_addr_t* dest, uint16_t param_hisPort, uint16_t param_myPort);
|
|
! owerror_t opentcp_send(OpenQueueEntry_t* msg);
|
|
! void opentcp_sendDone(OpenQueueEntry_t* msg, owerror_t error);
|
|
void opentcp_receive(OpenQueueEntry_t* msg);
|
|
! owerror_t opentcp_close(void);
|
|
! bool opentcp_debugPrint(void);
|
|
|
|
/**
|
|
\}
|