diff --git a/.gitignore b/.gitignore index 7b0464eeff..1c15b417d2 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,8 @@ settings /projects/telosb/01bsp_uart/path.txt /projects/telosb/03oos_macpong/path.txt /projects/telosb/02drv_opentimers/path.txt + +Exe +Obj +List +*.ewt \ No newline at end of file diff --git a/bsp/boards/python/openwsnmodule_obj.h b/bsp/boards/python/openwsnmodule_obj.h index 295e351fd2..40318bb6c6 100644 --- a/bsp/boards/python/openwsnmodule_obj.h +++ b/bsp/boards/python/openwsnmodule_obj.h @@ -206,7 +206,9 @@ struct OpenMote { icmpv6rpl_vars_t icmpv6rpl_vars; // l3 monitor_expiration_vars_t monitor_expiration_vars; +#if OPENWSN_6LO_FRAGMENTATION_C frag_vars_t frag_vars; +#endif // l2b sixtop_vars_t sixtop_vars; neighbors_vars_t neighbors_vars; diff --git a/openstack/03a-IPHC/frag.h b/openstack/03a-IPHC/frag.h index b520d2c064..fd438fc884 100644 --- a/openstack/03a-IPHC/frag.h +++ b/openstack/03a-IPHC/frag.h @@ -17,6 +17,8 @@ #include "config.h" +#if OPENWSN_6LO_FRAGMENTATION_C + #include "opendefs.h" #include "openqueue.h" #include "opentimers.h" @@ -102,7 +104,7 @@ typedef struct { -//=========================== variables ======================================= +//=========================== variables ======================================= //=========================== prototypes ====================================== @@ -114,4 +116,6 @@ void frag_receive(OpenQueueEntry_t *msg); owerror_t frag_fragment6LoPacket(OpenQueueEntry_t *msg); +#endif /* OPENWSN_6LO_FRAGMENTATION_C */ + #endif /* OPENWSN_FRAG_H */ diff --git a/openstack/03a-IPHC/iphc.c b/openstack/03a-IPHC/iphc.c index ca69e00f67..775f44950b 100644 --- a/openstack/03a-IPHC/iphc.c +++ b/openstack/03a-IPHC/iphc.c @@ -10,6 +10,7 @@ #include "neighbors.h" #include "openbridge.h" #include "icmpv6rpl.h" +#include "openqueue.h" //=========================== variables ======================================= @@ -145,7 +146,7 @@ owerror_t iphc_sendFromForwarding( return E_FAIL; } *((uint8_t * )(msg->payload)) = IPECAP_6LOTH_TYPE; - // length + // length if (packetfunctions_reserveHeader(&msg, sizeof(uint8_t)) == E_FAIL) { return E_FAIL; } @@ -1221,7 +1222,7 @@ uint8_t iphc_retrieveIPv6HopByHopHeader(OpenQueueEntry_t *msg, rpl_option_ht *rp \param[in,out] msg The message to retrieve the header from. \param[in] deadline_msg_ptr Pointer to the Deadline header. -\param[out] deadline_option Pointer to the structure to hold the retrieved Deadline option +\param[out] deadline_option Pointer to the structure to hold the retrieved Deadline option */ void iphc_retrieveIPv6DeadlineHeader( OpenQueueEntry_t *msg, diff --git a/openstack/04-TRAN/sock.c b/openstack/04-TRAN/sock.c index 689a4cb220..c53ce1d0ba 100644 --- a/openstack/04-TRAN/sock.c +++ b/openstack/04-TRAN/sock.c @@ -18,6 +18,57 @@ sock_udp_t* udp_socket_list; +// some toolchains errno.h apparently doesn't define all error codes. Use arbitrary placeholder here to cover that. + +#ifndef EAFNOSUPPORT +// There is no real good choice for what to set +// errno to in this case, so we just pick the +// value '0x01' somewhat arbitrarily. +#define EAFNOSUPPORT 0x01 +#endif + +#ifndef EADDRINUSE +// There is no real good choice for what to set +// errno to in this case, so we just pick the +// value '0x02' somewhat arbitrarily. +#define EADDRINUSE 0x02 +#endif + +#ifndef ENOTCONN +// There is no real good choice for what to set +// errno to in this case, so we just pick the +// value '0x03' somewhat arbitrarily. +#define ENOTCONN 0x03 +#endif + +#ifndef EOVERFLOW +// There is no real good choice for what to set +// errno to in this case, so we just pick the +// value '0x04' somewhat arbitrarily. +#define EOVERFLOW 0x04 +#endif + +#ifndef ENOMEM +// There is no real good choice for what to set +// errno to in this case, so we just pick the +// value '0x05' somewhat arbitrarily. +#define ENOMEM 0x05 +#endif + +#ifndef EINVAL +// There is no real good choice for what to set +// errno to in this case, so we just pick the +// value '0x06' somewhat arbitrarily. +#define EINVAL 0x06 +#endif + +#ifndef ENOBUFS +// There is no real good choice for what to set +// errno to in this case, so we just pick the +// value '0x07' somewhat arbitrarily. +#define ENOBUFS 0x07 +#endif + // =========================== variables ======================================= // =========================== prototypes ====================================== diff --git a/openstack/04-TRAN/sock.h b/openstack/04-TRAN/sock.h index 8eb6a79d79..9a131d20a5 100644 --- a/openstack/04-TRAN/sock.h +++ b/openstack/04-TRAN/sock.h @@ -22,11 +22,6 @@ struct _sock_tl_ep { */ typedef struct _sock_tl_ep sock_udp_ep_t; -/** - * @brief Type for a UDP sock object - */ -typedef struct sock_udp sock_udp_t; - /** * @brief Initialize the internal UDP socket structures */ diff --git a/openweb/opencoap/oscore.c b/openweb/opencoap/oscore.c index bfc17133d5..abd5d8188a 100644 --- a/openweb/opencoap/oscore.c +++ b/openweb/opencoap/oscore.c @@ -11,7 +11,7 @@ #define EAAD_MAX_LEN 9 + OSCOAP_MAX_ID_LEN // assumes no Class I options #define AAD_MAX_LEN 12 + EAAD_MAX_LEN -#define INFO_MAX_LEN 2 * OSCOAP_MAX_ID_LEN + 2 + 1 + 4 + 1 + 3 +#define INFO_MAX_LEN 2 * OSCOAP_MAX_ID_LEN + 2 + 1 + 4 + 1 + 3 //=========================== variables ======================================= @@ -420,7 +420,7 @@ owerror_t oscore_parse_compressed_COSE(uint8_t *buffer, uint8_t **kid, uint8_t *kidLen) { - uint8_t tmp[0]; + uint8_t tmp; uint8_t *ptr; uint8_t index; uint8_t n; @@ -429,8 +429,8 @@ owerror_t oscore_parse_compressed_COSE(uint8_t *buffer, uint8_t reserved; if (bufferLen == 0) { - tmp[0] = 0x00; - ptr = tmp; + tmp = 0x00; + ptr = &tmp; bufferLen = 1; } else { ptr = buffer; diff --git a/projects/openmote-b/03oos_openwsn/03oos_openwsn.ewp b/projects/openmote-b/03oos_openwsn/03oos_openwsn.ewp index cf4b26633a..74851c5323 100644 --- a/projects/openmote-b/03oos_openwsn/03oos_openwsn.ewp +++ b/projects/openmote-b/03oos_openwsn/03oos_openwsn.ewp @@ -207,7 +207,7 @@ 1