*** stock_iot-lab_M3/openwsn/03b-IPv6/icmpv6echo.c Thu Apr 24 11:01:36 2014 --- riot-openwsn-wip/openwsn/03b-IPv6/icmpv6echo.c Thu Apr 24 16:55:54 2014 *************** *** 4,33 **** #include "openserial.h" #include "openqueue.h" #include "packetfunctions.h" //=========================== variables ======================================= - typedef struct { - bool busySending; - open_addr_t hisAddress; - uint16_t seq; - } icmpv6echo_vars_t; - icmpv6echo_vars_t icmpv6echo_vars; //=========================== prototypes ====================================== //=========================== public ========================================== ! void icmpv6echo_init() { icmpv6echo_vars.busySending = FALSE; icmpv6echo_vars.seq = 0; } ! void icmpv6echo_trigger() { uint8_t number_bytes_from_input_buffer; uint8_t input_buffer[16]; OpenQueueEntry_t* msg; //get command from OpenSerial (16B IPv6 destination address) number_bytes_from_input_buffer = openserial_getInputBuffer(&(input_buffer[0]),sizeof(input_buffer)); --- 4,29 ---- #include "openserial.h" #include "openqueue.h" #include "packetfunctions.h" + //#include "debugpins.h" //=========================== variables ======================================= icmpv6echo_vars_t icmpv6echo_vars; //=========================== prototypes ====================================== //=========================== public ========================================== ! void icmpv6echo_init(void) { icmpv6echo_vars.busySending = FALSE; icmpv6echo_vars.seq = 0; } ! void icmpv6echo_trigger(void) { uint8_t number_bytes_from_input_buffer; uint8_t input_buffer[16]; OpenQueueEntry_t* msg; + //get command from OpenSerial (16B IPv6 destination address) number_bytes_from_input_buffer = openserial_getInputBuffer(&(input_buffer[0]),sizeof(input_buffer)); *************** *** 84,90 **** } } ! void icmpv6echo_sendDone(OpenQueueEntry_t* msg, error_t error) { msg->owner = COMPONENT_ICMPv6ECHO; if (msg->creator!=COMPONENT_ICMPv6ECHO) {//that was a packet I had not created openserial_printError(COMPONENT_ICMPv6ECHO,ERR_UNEXPECTED_SENDDONE, --- 80,86 ---- } } ! void icmpv6echo_sendDone(OpenQueueEntry_t* msg, owerror_t error) { msg->owner = COMPONENT_ICMPv6ECHO; if (msg->creator!=COMPONENT_ICMPv6ECHO) {//that was a packet I had not created openserial_printError(COMPONENT_ICMPv6ECHO,ERR_UNEXPECTED_SENDDONE, *************** *** 93,99 **** } openqueue_freePacketBuffer(msg); icmpv6echo_vars.busySending = FALSE; ! } void icmpv6echo_receive(OpenQueueEntry_t* msg) { OpenQueueEntry_t* reply; --- 89,95 ---- } openqueue_freePacketBuffer(msg); icmpv6echo_vars.busySending = FALSE; ! } void icmpv6echo_receive(OpenQueueEntry_t* msg) { OpenQueueEntry_t* reply; *************** *** 149,152 **** } } ! //=========================== private ========================================= \ No newline at end of file --- 145,148 ---- } } ! //=========================== private =========================================