mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-27 15:31:17 +01:00
commit
2a9aac7f0b
@ -32,7 +32,11 @@
|
||||
|
||||
#ifndef NATIVE_MAX_DATA_LENGTH
|
||||
#include "tap.h"
|
||||
#ifdef MODULE_SIXLOWPAN
|
||||
#define NATIVE_MAX_DATA_LENGTH (255)
|
||||
#else
|
||||
#define NATIVE_MAX_DATA_LENGTH (TAP_MAX_DATA)
|
||||
#endif
|
||||
#else
|
||||
#warning be careful not to exceed (TAP_MAX_DATA) with NATIVE_MAX_DATA_LENGTH
|
||||
#endif /* NATIVE_MAX_DATA_LENGTH */
|
||||
|
||||
@ -20,6 +20,8 @@ rpl_of_t rpl_of_mrhof = {
|
||||
which_parent,
|
||||
which_dodag,
|
||||
reset,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
@ -30,6 +32,7 @@ rpl_of_t *rpl_get_of_mrhof(void)
|
||||
|
||||
void reset(rpl_dodag_t *dodag)
|
||||
{
|
||||
(void) dodag;
|
||||
}
|
||||
|
||||
static uint16_t calc_path_cost(rpl_parent_t *parent)
|
||||
@ -171,5 +174,6 @@ static rpl_parent_t *which_parent(rpl_parent_t *p1, rpl_parent_t *p2)
|
||||
//Not used yet, as the implementation only makes use of one dodag for now.
|
||||
static rpl_dodag_t *which_dodag(rpl_dodag_t *d1, rpl_dodag_t *d2)
|
||||
{
|
||||
(void) d2;
|
||||
return d1;
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@ int readpacket(uint8_t *packet_buf, size_t size)
|
||||
break;
|
||||
}
|
||||
|
||||
if ((line_buf_ptr - packet_buf) >= size - 1) {
|
||||
if ((size_t) (line_buf_ptr - packet_buf) >= size - 1) {
|
||||
return -SIXLOWERROR_ARRAYFULL;
|
||||
}
|
||||
|
||||
@ -179,8 +179,8 @@ int writepacket(uint8_t *packet_buf, size_t size)
|
||||
{
|
||||
uint8_t *byte_ptr = packet_buf;
|
||||
|
||||
while ((byte_ptr - packet_buf) < size) {
|
||||
if ((byte_ptr - packet_buf) > BORDER_BUFFER_SIZE) {
|
||||
while ((size_t) (byte_ptr - packet_buf) < size) {
|
||||
if ((size_t) (byte_ptr - packet_buf) > BORDER_BUFFER_SIZE) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -381,7 +381,7 @@ void recv_echo_req(void)
|
||||
printf("\n");
|
||||
printf("id = 0x%04x, seq = %d\n", echo_buf->id, echo_buf->seq);
|
||||
|
||||
for (int i = 0; i < data_len; i++) {
|
||||
for (size_t i = 0; i < data_len; i++) {
|
||||
printf("%02x ", echo_data_buf[i]);
|
||||
|
||||
if ((i + 1) % 16 || i == data_len - 1) {
|
||||
@ -408,7 +408,7 @@ void recv_echo_repl(void)
|
||||
printf("\n");
|
||||
printf("id = 0x%04x, seq = %d\n", echo_buf->id, echo_buf->seq);
|
||||
|
||||
for (int i = 0; i < data_len; i++) {
|
||||
for (size_t i = 0; i < data_len; i++) {
|
||||
printf("%02x ", echo_data_buf[i]);
|
||||
|
||||
if ((i + 1) % 16 || i == data_len - 1) {
|
||||
@ -1566,7 +1566,7 @@ void def_rtr_lst_rem(ndp_default_router_list_t *entry)
|
||||
//------------------------------------------------------------------------------
|
||||
/* prefix list functions */
|
||||
|
||||
int8_t plist_add(ipv6_addr_t *addr, uint8_t size, uint32_t val_ltime,
|
||||
int plist_add(ipv6_addr_t *addr, uint8_t size, uint32_t val_ltime,
|
||||
uint32_t pref_ltime, uint8_t adv_opt, uint8_t l_a_reserved1)
|
||||
{
|
||||
if (prefix_count == OPT_PI_LIST_LEN) {
|
||||
|
||||
@ -53,7 +53,7 @@ void recv_nbr_adv(void);
|
||||
void recv_nbr_sol(void);
|
||||
|
||||
void nbr_cache_auto_rem(void);
|
||||
int8_t plist_add(ipv6_addr_t *addr, uint8_t size, uint32_t val_ltime,
|
||||
int plist_add(ipv6_addr_t *addr, uint8_t size, uint32_t val_ltime,
|
||||
uint32_t pref_ltime, uint8_t adv_opt, uint8_t l_a_reserved1);
|
||||
|
||||
ndp_a6br_cache_t *abr_add_context(uint16_t version, ipv6_addr_t *abr_addr,
|
||||
|
||||
@ -1637,7 +1637,7 @@ void init_reas_bufs(lowpan_reas_buf_t *buf)
|
||||
void sixlowpan_lowpan_init(transceiver_type_t trans, uint8_t r_addr,
|
||||
int as_border)
|
||||
{
|
||||
lowpan_init(trans, r_addr, NULL, 0);
|
||||
lowpan_init(trans, r_addr, NULL, as_border);
|
||||
}
|
||||
|
||||
void sixlowpan_lowpan_adhoc_init(transceiver_type_t trans,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
SRC = shell_commands.c sc_id.c sc_heap.c
|
||||
SRC = shell_commands.c sc_id.c
|
||||
INCLUDES = -I../../../core/include -I../../include -I../../../drivers/include/
|
||||
|
||||
ifneq (,$(findstring cc110x_ng,$(USEMODULE)))
|
||||
@ -32,6 +32,9 @@ endif
|
||||
ifneq (,$(findstring sht11,$(USEMODULE)))
|
||||
SRC += sc_sht11.c
|
||||
endif
|
||||
ifneq (,$(findstring lpc_common,$(USEMODULE)))
|
||||
SRC += sc_heap.c
|
||||
endif
|
||||
|
||||
OBJ = $(SRC:%.c=$(BINDIR)%.o)
|
||||
DEP = $(SRC:%.c=$(BINDIR)%.d)
|
||||
|
||||
@ -18,8 +18,6 @@
|
||||
* @note $Id: sc_heap.c 3855 2013-09-05 12:40:11 kasmi $
|
||||
*/
|
||||
|
||||
#ifdef MODULE_LPC_COMMON
|
||||
|
||||
extern void heap_stats(void);
|
||||
|
||||
void _heap_handler(char *unused)
|
||||
@ -28,5 +26,3 @@ void _heap_handler(char *unused)
|
||||
heap_stats();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user