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

M6lbr #187

Open
wants to merge 38 commits into
base: develop
Choose a base branch
from
Open

M6lbr #187

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
95841fb
Remove all the DODAG from the instance when the node is set as Root
laurentderu Jan 16, 2015
33fccf7
Fix indentation
laurentderu Jan 16, 2015
1c27755
Do not delete instance when a new DODAG can not be created
laurentderu Jan 16, 2015
678ed30
Do not priotirize new packets in sicslowpan
laurentderu Jan 16, 2015
507a1b0
Set uip_ext_len to 0 after dropping packet
mwasilak Dec 19, 2014
7d7cd00
fixed so that trickle timer rpl config is updated at global repair
Oct 24, 2014
f680514
Use debuild to create debian package
laurentderu Mar 27, 2015
a30daa5
Check node existence first in add route notification in node-info
laurentderu Mar 25, 2015
81cbab7
Allow more baudrates for slip-radio interface
laurentderu Apr 1, 2015
76fa87d
Force bridge mac address to eth0 mac address in example interface files
laurentderu Apr 17, 2015
d7be652
Fix webserver formatting
laurentderu Apr 17, 2015
f41cc92
Add support for non constant Ethernet padding
laurentderu Apr 29, 2015
ebf7707
Send the first NS attempt inside tcpip_ipv6_output()
ioannisg Mar 9, 2015
7d591c3
Add DESTDIR to install target and fix 6lbr startup script
laurentderu May 5, 2015
28377c1
Add usb scanning workaround for BB
laurentderu May 6, 2015
6ca958a
Update documentation
laurentderu May 6, 2015
ac97c54
Add protection on MacOS-X
laurentderu May 6, 2015
f034d3c
Add forward compatibility in node-info
laurentderu May 6, 2015
0102f69
Check mac address message size
laurentderu Apr 24, 2015
49aa515
Split up install target
laurentderu May 7, 2015
574eaff
Add documentation on SCAN_DEVICE
laurentderu May 7, 2015
b13c95d
Add interfaces example file for debian Beaglebone
laurentderu May 7, 2015
68bc940
Bump version to 1.3.3
laurentderu May 6, 2015
3715b49
Update 1.3.3 changelog
laurentderu May 8, 2015
4ba93cd
Merge branch 'develop'
laurentderu May 12, 2016
4f7a1cd
Update 1.4.0 changelog
laurentderu May 8, 2015
c33493f
Bump version to 1.4.0
laurentderu May 12, 2016
fc76af7
Update package creation rules
laurentderu May 13, 2016
58c6736
Fix version in debian/changelog
laurentderu May 17, 2016
d71e082
Instance menu
manuwsn May 20, 2016
84b917e
Allow nvm data file to contain more that one RPL instance
manuwsn May 20, 2016
01c3512
Instances menus generation
manuwsn May 20, 2016
6c321ac
Instance creation and recording
manuwsn May 27, 2016
5ca2a2d
Augments the number of RPL instance in contiki
manuwsn May 27, 2016
65a0896
Forgetting one file
manuwsn May 27, 2016
92b45f2
RPL Instance suppression
manuwsn May 27, 2016
6dfc1dc
Shows sensors and status/RPL info of the current RPL instance
manuwsn May 30, 2016
715eff3
Case of 0 RPL instance and lookup before loop in rio
manuwsn May 31, 2016
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
2 changes: 1 addition & 1 deletion apps/tinydtls
Submodule tinydtls updated 70 files
+1 −48 .gitignore
+0 −60 ABOUT.md
+0 −47 CONTRIBUTING.md
+21 −12 LICENSE
+29 −0 Makefile.contiki
+36 −37 Makefile.in
+7 −11 Makefile.tinydtls
+18 −9 aes/Makefile.in
+1 −7 aes/rijndael.c
+11 −6 aes/rijndael.h
+26 −19 alert.h
+27 −30 ccm.c
+27 −18 ccm.h
+83 −0 config.h
+74 −0 config.h.contiki
+146 −0 config.h.in
+36 −52 configure.in
+111 −200 crypto.c
+67 −56 crypto.h
+65 −56 debug.c
+47 −81 debug.h
+0 −9 doc/Makefile.in
+241 −0 dtls-client.c
+204 −0 dtls-server.c
+900 −1,246 dtls.c
+100 −122 dtls.h
+20 −13 dtls_time.c
+34 −20 dtls_time.h
+0 −7 ecc/Makefile.contiki
+0 −3 ecc/Makefile.ecc
+26 −22 ecc/Makefile.in
+20 −7 ecc/ecc.c
+0 −12 ecc/test_helper.c
+0 −6 ecc/test_helper.h
+6 −32 ecc/testecc.c
+2 −36 ecc/testfield.c
+142 −41 global.h
+20 −17 hmac.c
+23 −15 hmac.h
+31 −55 netq.c
+13 −35 netq.h
+100 −118 numeric.h
+38 −26 peer.c
+38 −87 peer.h
+0 −27 platform-specific/Makefile.in
+0 −2 platform-specific/config-cc2538dk.h
+0 −2 platform-specific/config-econotag.h
+0 −1 platform-specific/config-minimal-net.h
+0 −3 platform-specific/config-sky.h
+0 −1 platform-specific/config-wismote.h
+0 −65 platform-specific/platform.h
+30 −37 prng.h
+0 −5 reconf.sh
+0 −74 session.c
+0 −67 session.h
+19 −10 sha2/Makefile.in
+41 −9 sha2/sha2.c
+28 −23 state.h
+145 −0 t_list.h
+18 −13 tests/Makefile.in
+1 −1 tests/cbc_aes128-test.c
+1 −2 tests/ccm-test.c
+42 −183 tests/dtls-client.c
+33 −71 tests/dtls-server.c
+76 −96 tests/netq-test.c
+1 −1 tests/pcap.c
+2 −2 tests/prf-test.c
+0 −35 tinydtls.h.in
+163 −139 uthash.h
+60 −327 utlist.h
2 changes: 2 additions & 0 deletions examples/6lbr/6lbr/nvm-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
#include "nvm-itf.h"
#include "log-6lbr.h"

nvm_data_t *nvms_data;
uint16_t rpl_instances, rpl_current_instance;
nvm_data_t nvm_data;

/*---------------------------------------------------------------------------*/
Expand Down
2 changes: 2 additions & 0 deletions examples/6lbr/6lbr/nvm-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@

#include "nvm-data.h"

extern nvm_data_t *nvms_data;
extern nvm_data_t nvm_data;
extern uint16_t rpl_instances, rpl_current_instance;

void load_nvm_config(void);
void store_nvm_config(void);
Expand Down
28 changes: 16 additions & 12 deletions examples/6lbr/6lbr/rio.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,22 @@ uip_ds6_route_info_add(uip_ipaddr_t * ipaddr, uint8_t ipaddrlen,
if(uip_ds6_list_loop
((uip_ds6_element_t *) uip_ds6_route_info_list, UIP_DS6_ROUTE_INFO_NB,
sizeof(uip_ds6_route_info_t), ipaddr, ipaddrlen,
(uip_ds6_element_t **) & locrtinfo) == FREESPACE) {
locrtinfo->isused = 1;
uip_ipaddr_copy(&locrtinfo->ipaddr, ipaddr);
locrtinfo->length = ipaddrlen;
locrtinfo->flags = flags;
locrtinfo->lifetime = rlifetime;
LOG6LBR_6ADDR(DEBUG, &locrtinfo->ipaddr, "Adding route information: length=%u, flags=%x, route lifetime=%lu, dest=",
ipaddrlen, flags, rlifetime);
return locrtinfo;
} else {
LOG6LBR_ERROR("No more space in route information list\n");
}
(uip_ds6_element_t **) & locrtinfo) != FOUND)
if(uip_ds6_list_loop
((uip_ds6_element_t *) uip_ds6_route_info_list, UIP_DS6_ROUTE_INFO_NB,
sizeof(uip_ds6_route_info_t), ipaddr, ipaddrlen,
(uip_ds6_element_t **) & locrtinfo) == FREESPACE) {
locrtinfo->isused = 1;
uip_ipaddr_copy(&locrtinfo->ipaddr, ipaddr);
locrtinfo->length = ipaddrlen;
locrtinfo->flags = flags;
locrtinfo->lifetime = rlifetime;
LOG6LBR_6ADDR(DEBUG, &locrtinfo->ipaddr, "Adding route information: length=%u, flags=%x, route lifetime=%lu, dest=",
ipaddrlen, flags, rlifetime);
return locrtinfo;
} else {
LOG6LBR_ERROR("No more space in route information list\n");
}
return NULL;
}

Expand Down
3 changes: 3 additions & 0 deletions examples/6lbr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ CETIC_6LBR_LEARN_RPL_MAC=1

CONTIKI_WITH_IPV6 = 1

RPL_CONF_MAX_INSTANCES=10

6LBR?=.

CONTIKI = $(6LBR)/../..
Expand Down Expand Up @@ -40,6 +42,7 @@ CFLAGS +=-DCETIC_6LBR_ROUTER=$(CETIC_6LBR_ROUTER)
CFLAGS +=-DCETIC_6LBR_6LR=$(CETIC_6LBR_6LR)
CFLAGS +=-DCETIC_6LBR_ONE_ITF=$(CETIC_6LBR_ONE_ITF)
CFLAGS +=-DCETIC_6LBR_LEARN_RPL_MAC=$(CETIC_6LBR_LEARN_RPL_MAC)
CFLAGS +=-DRPL_CONF_MAX_INSTANCES=$(RPL_CONF_MAX_INSTANCES)

CONTIKI_WITH_RPL ?= 1
WITH_IP64?=1
Expand Down
2 changes: 1 addition & 1 deletion examples/6lbr/angstrom/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: cetic-6lbr
Version: 1.3.2
Version: 1.4.0
Architecture: armv7a
Maintainer: CETIC <[email protected]>
Section: network
Expand Down
1 change: 1 addition & 0 deletions examples/6lbr/apps/6lbr-webserver/Makefile.6lbr-webserver
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CFLAGS += -DWEBSERVER=1
6lbr-webserver_src = httpd.c httpd-cgi.c httpd-urlconv.c webserver.c webserver-utils.c \
webserver-main.c webserver-network.c \
webserver-instances.c \
webserver-config.c webserver-statistics.c webserver-admin.c webserver-log.c

ifeq ($(CONTIKI_WITH_RPL),1)
Expand Down
48 changes: 48 additions & 0 deletions examples/6lbr/apps/6lbr-webserver/httpd-cgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,59 @@

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#include "contiki-net.h"
#include "httpd-cgi.h"
#include "nvm-config.h"

static httpd_group_t *instances = NULL;
static httpd_group_t *groups = NULL;
static httpd_cgi_call_t *calls = NULL;
static httpd_cgi_command_t *commands = NULL;
/*---------------------------------------------------------------------------*/
void
httpd_instances_add(void *dgroup, uint16_t nb)
{
httpd_group_t *group;
if(nb > 0){
group = (httpd_group_t *)malloc(2 + nb * sizeof(httpd_group_t));

group[0].title = (char*)malloc(2*sizeof(char));
sprintf(group[0].title, "%c", '-');
group[0].next = &group[1];
group[1].title = (char*)malloc(2*sizeof(char));
sprintf(group[1].title, "%c", '+');
}
else {
group = (httpd_group_t *)malloc(sizeof(httpd_group_t));

group[0].title = (char*)malloc(2*sizeof(char));
sprintf(group[0].title, "%c", '+');
group[0].next = NULL;
}

if(nb > 0){
group[1].next = &group[2];
int i;
char * instance;
for(i=0;i<nb-1;i++){
instance = (char*)malloc(5*sizeof(char));
sprintf(instance,"%d",nvms_data[i].rpl_instance_id);
group[i+2].title = instance;
LOG6LBR_INFO("Adding instance : %s\n", group[i+2].title);
group[i+2].next = &group[i+3];
}
instance = (char*)malloc(5*sizeof(char));
sprintf(instance,"%d",nvms_data[i].rpl_instance_id);
group[nb+1].title = instance;
group[nb+1].next = NULL;
}

instances = &group[0];
}
/*---------------------------------------------------------------------------*/
void
httpd_group_add(httpd_group_t *group)
{
httpd_group_t *l;
Expand All @@ -60,6 +103,11 @@ httpd_group_add(httpd_group_t *group)
}
}
/*---------------------------------------------------------------------------*/
httpd_group_t* httpd_instance_head(void)
{
return instances;
}
/*---------------------------------------------------------------------------*/
httpd_group_t* httpd_group_head(void)
{
return groups;
Expand Down
8 changes: 8 additions & 0 deletions examples/6lbr/apps/6lbr-webserver/httpd-cgi.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ typedef struct httpd_cgi_command httpd_cgi_command_t;
#define HTTPD_CUSTOM_TOP 0x00000002
#define HTTPD_CUSTOM_BOTTOM 0x00000004

void httpd_instances_add(void *group, uint16_t nb);
void httpd_group_add(httpd_group_t *group);
void httpd_group_add_page(httpd_group_t *group, httpd_cgi_call_t *c);
httpd_group_t* httpd_instance_head(void);
httpd_group_t* httpd_group_head(void);

void httpd_cgi_add(httpd_cgi_call_t *c);
Expand All @@ -94,9 +96,15 @@ httpd_cgi_command_t* httpd_cgi_command_head(void);
#define HTTPD_CGI_CALL_NAME(name) \
extern struct httpd_cgi_call name;

#define HTTPD_GROUPS_NAME(name) \
extern httpd_group_t * name;

#define HTTPD_GROUP_NAME(name) \
extern httpd_group_t name;

#define HTTPD_GROUPS(name) \
httpd_group_t * name = NULL

#define HTTPD_GROUP(name, str) \
httpd_group_t name = {NULL, str, NULL, 0}

Expand Down
4 changes: 2 additions & 2 deletions examples/6lbr/apps/6lbr-webserver/httpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ PT_THREAD(handle_input(struct httpd_state *s))
}
#endif /* URLCONV */
if(s->query) {
LOG6LBR_6ADDR(DEBUG, &uip_conn->ripaddr, "Request for '%s?%s' from ", s->filename, s->query);
LOG6LBR_6ADDR(INFO, &uip_conn->ripaddr, "Request for '%s?%s' from ", s->filename, s->query);
} else {
LOG6LBR_6ADDR(DEBUG, &uip_conn->ripaddr, "Request for '%s' from ", s->filename);
LOG6LBR_6ADDR(INFO, &uip_conn->ripaddr, "Request for '%s' from ", s->filename);
}

s->state = STATE_OUTPUT;
Expand Down
7 changes: 7 additions & 0 deletions examples/6lbr/apps/6lbr-webserver/webserver-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,13 @@ update_config(const char *name, uint8_t *reboot_needed)
}
}
if(do_update) {
int i,find=0;
for(i=0;i<rpl_instances && !find;i++)
if(nvms_data[i].rpl_instance_id == rpl_current_instance){
nvms_data[i] = nvm_data;
find=1;
}

store_nvm_config();
#if !LOG6LBR_STATIC
if(nvm_data.log_level != 0xFF) {
Expand Down
Loading