*** stock_iot-lab_M3/openwsn/07-App/tcpinject/tcpinject.c Thu Apr 24 11:01:37 2014 --- riot-openwsn-wip/openwsn/07-App/tcpinject/tcpinject.c Thu Apr 24 16:55:54 2014 *************** *** 7,33 **** //=========================== variables ======================================= - typedef struct { - OpenQueueEntry_t* pkt; - bool sending; - open_addr_t hisAddress; - uint16_t hisPort; - } tcpinject_vars_t; - tcpinject_vars_t tcpinject_vars; //=========================== prototypes ====================================== //=========================== public ========================================== ! void tcpinject_init() { } ! bool tcpinject_shouldIlisten() { return FALSE; } ! void tcpinject_trigger() { uint8_t number_bytes_from_input_buffer; uint8_t input_buffer[18]; //get command from OpenSerial (16B IPv6 destination address, 2B destination port) --- 7,26 ---- //=========================== variables ======================================= tcpinject_vars_t tcpinject_vars; //=========================== prototypes ====================================== //=========================== public ========================================== ! void tcpinject_init(void) { } ! bool tcpinject_shouldIlisten(void) { return FALSE; } ! void tcpinject_trigger(void) { uint8_t number_bytes_from_input_buffer; uint8_t input_buffer[18]; //get command from OpenSerial (16B IPv6 destination address, 2B destination port) *************** *** 45,51 **** opentcp_connect(&tcpinject_vars.hisAddress,tcpinject_vars.hisPort,WKP_TCP_INJECT); } ! void tcpinject_connectDone(error_t error) { if (error==E_SUCCESS) { tcpinject_vars.pkt = openqueue_getFreePacketBuffer(COMPONENT_TCPINJECT); if (tcpinject_vars.pkt==NULL) { --- 38,44 ---- opentcp_connect(&tcpinject_vars.hisAddress,tcpinject_vars.hisPort,WKP_TCP_INJECT); } ! void tcpinject_connectDone(owerror_t error) { if (error==E_SUCCESS) { tcpinject_vars.pkt = openqueue_getFreePacketBuffer(COMPONENT_TCPINJECT); if (tcpinject_vars.pkt==NULL) { *************** *** 74,80 **** } } ! void tcpinject_sendDone(OpenQueueEntry_t* msg, error_t error) { msg->owner = COMPONENT_TCPINJECT; if (msg->creator!=COMPONENT_TCPINJECT) { openserial_printError(COMPONENT_TCPINJECT,ERR_UNEXPECTED_SENDDONE, --- 67,73 ---- } } ! void tcpinject_sendDone(OpenQueueEntry_t* msg, owerror_t error) { msg->owner = COMPONENT_TCPINJECT; if (msg->creator!=COMPONENT_TCPINJECT) { openserial_printError(COMPONENT_TCPINJECT,ERR_UNEXPECTED_SENDDONE, *************** *** 88,94 **** void tcpinject_receive(OpenQueueEntry_t* msg) { } ! bool tcpinject_debugPrint() { return FALSE; } --- 81,87 ---- void tcpinject_receive(OpenQueueEntry_t* msg) { } ! bool tcpinject_debugPrint(void) { return FALSE; }