Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FW-887 fix compile issues and update openmote-b, openmote_cc2538 oos… #533

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions bsp/boards/python/openwsnmodule_obj.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 5 additions & 1 deletion openstack/03a-IPHC/frag.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

#include "config.h"

#if OPENWSN_6LO_FRAGMENTATION_C

#include "opendefs.h"
#include "openqueue.h"
#include "opentimers.h"
Expand Down Expand Up @@ -102,7 +104,7 @@ typedef struct {



//=========================== variables =======================================
//=========================== variables =======================================

//=========================== prototypes ======================================

Expand All @@ -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 */
5 changes: 3 additions & 2 deletions openstack/03a-IPHC/iphc.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "neighbors.h"
#include "openbridge.h"
#include "icmpv6rpl.h"
#include "openqueue.h"

//=========================== variables =======================================

Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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,
Expand Down
51 changes: 51 additions & 0 deletions openstack/04-TRAN/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ======================================

Expand Down
5 changes: 0 additions & 5 deletions openstack/04-TRAN/sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
8 changes: 4 additions & 4 deletions openweb/opencoap/oscore.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 =======================================

Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Loading