Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
ecab43f
sys: net: Initial import of a basic MAC protocol layer
Jul 19, 2014
237eecd
unittests: provide unittests for basic_mac
miri64 Aug 14, 2014
acae10d
[SQUASH ME] unittests: add missing semicolons on macro calls
miri64 Nov 8, 2014
9990df6
[SQUASH ME] unittests: use global tests macros instead of random values
miri64 Nov 8, 2014
7a688c4
[SQUASH ME] basic_mac: Update doc to rename
miri64 Nov 10, 2014
044ffae
[SQUASH ME] unittests,basic_mac: add proto to netdev_hlist_t struct
miri64 Nov 18, 2014
3142030
[SQUASH ME] basic_mac: adapt for registry context
miri64 Nov 18, 2014
b66ac58
[SQUASH ME] basic_mac: adapt to netapi changes
miri64 Nov 21, 2014
34be8f8
[SQUASH ME] basic_mac rename all dummy to basic
miri64 Nov 27, 2014
8c6738a
[SQUASH ME] basic_mac: clarify some documentation
miri64 Nov 27, 2014
6715062
[SQUASH ME] basic_mac: remove flags parameter from init function
miri64 Nov 27, 2014
f6090a7
[SQUASH ME] basic_mac: clarify registrar/recipant in doc
miri64 Nov 27, 2014
e7e80b0
[SQUASH ME] basic_mac: fix recipant getter
miri64 Nov 27, 2014
f076a8f
[SQUASH ME] basic_mac: fix spelling errors
miri64 Nov 28, 2014
dd44bb9
[SQUASH ME] basic_mac: remove unnecessary line from unittest Makefile
miri64 Nov 28, 2014
06899fd
[SQUASH ME] basic_mac: reduce some variable scope
miri64 Dec 1, 2014
2bd938a
[SQUASH ME] basic_mac: make registry getter a function
miri64 Dec 1, 2014
91b7187
[SQUASH ME] basic_mac: add doc group closing
miri64 Dec 1, 2014
cd39899
sixlowpan: rename to sixlowpan_legacy
miri64 Nov 7, 2014
3a463a6
Merge branch 'issue-1935' into HEAD
miri64 Dec 3, 2014
d0706f8
ipv6: Initial import of preliminary refactored IPv6 header
miri64 Nov 7, 2014
3403bca
sixlowpan: refactor 6LoWPAN fragmentation for netapi
miri64 Nov 7, 2014
38b5464
sixlowpan.iphc_cbuf: Initial import of an IPHC context buffer
miri64 Oct 8, 2014
2e3c5e5
sixlowpan: Initial import of refactored IPHC
miri64 Oct 9, 2014
93f7b73
[SQUASH ME] basic_mac: address comments
miri64 Dec 3, 2014
e502efd
[SQUASH ME] basic_mac: address more comments
miri64 Dec 4, 2014
22dd52e
[SQUASH ME] basic_mac: one rename more
miri64 Dec 4, 2014
a67804f
Merge branch 'basic_mac' into HEAD
miri64 Dec 5, 2014
2f8a404
ipv6: Initial import of address module
miri64 Nov 12, 2014
f0858d9
ipv6: Initial import of IPv6 interfaces module
miri64 Nov 12, 2014
26202fe
ipv6: Initial import of the reworked IPv6 module
miri64 Nov 18, 2014
375a62a
[SQUASH ME] ipv6: continue implementation and specification
miri64 Nov 18, 2014
e82b02b
[SQUASH ME] ipv6.addr: add ipv6_addr_init_prefix function
miri64 Nov 18, 2014
153a17a
[SQUASH ME] ipv6: better checksum handling
miri64 Nov 19, 2014
0de1bea
[SQUASH ME] ipv6: more stuff
miri64 Nov 19, 2014
320e716
[SQUASH ME] ipv6: specify internal sending functions
miri64 Nov 19, 2014
2b0214c
[SQUASH ME] ipv6: upper layer registry functions
miri64 Nov 19, 2014
72e7b85
[SQUASH ME] ipv6: start implementation of control thread
miri64 Nov 20, 2014
e7a47f5
[SQUASH ME] ipv6.if: add MTU
miri64 Nov 23, 2014
02eefaa
[SQUASH ME] ipv6: more ignores
miri64 Nov 23, 2014
ef979bc
[SQUASH ME] ipv6: done. going to bed now.
miri64 Dec 5, 2014
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
46 changes: 40 additions & 6 deletions Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,68 @@ ifneq (,$(filter tcp,$(USEMODULE)))
endif

ifneq (,$(filter socket_base,$(USEMODULE)))
USEMODULE += sixlowpan
USEMODULE += sixlowpan_legacy
USEMODULE += net_help
USEMODULE += vtimer
endif

ifneq (,$(filter sixlowborder,$(USEMODULE)))
USEMODULE += sixlowpan
ifneq (,$(filter sixlowborder_legacy,$(USEMODULE)))
USEMODULE += sixlowpan_legacy
endif

ifneq (,$(filter rpl,$(USEMODULE)))
USEMODULE += routing
endif

ifneq (,$(filter routing,$(USEMODULE)))
USEMODULE += sixlowpan
USEMODULE += sixlowpan_legacy
endif

ifneq (,$(filter sixlowpan,$(USEMODULE)))
ifneq (,$(filter sixlowpan_legacy,$(USEMODULE)))
USEMODULE += ieee802154
USEMODULE += net_help
USEMODULE += net_if
USEMODULE += posix
USEMODULE += vtimer
endif

ifneq (,$(filter sixlowpan_hc,$(USEMODULE)))
USEMODULE += sixlowpan
USEMODULE += sixlowpan_iphc_cbuf
endif

ifneq (,$(filter sixlowpan_iphc_cbuf,$(USEMODULE)))
USEMODULE += ipv6_addr
USEMODULE += vtimer
endif

ifneq (,$(filter sixlowpan,$(USEMODULE)))
USEMODULE += ipv6
USEMODULE += netapi
USEMODULE += netdev_base
USEMODULE += pktbuf
USEMODULE += vtimer
endif

ifneq (,$(filter ipv6_router,$(USEMODULE)))
USEMODULE += ipv6
endif

ifneq (,$(filter ipv6,$(USEMODULE)))
USEMODULE += ipv6_if
USEMODULE += ipv6_addr
USEMODULE += netapi
USEMODULE += net_help
endif

ifneq (,$(filter ipv6_if,$(USEMODULE)))
USEMODULE += ipv6_addr
USEMODULE += netapi
endif

ifneq (,$(filter aodvv2,$(USEMODULE)))
USEMODULE += vtimer
USEMODULE += sixlowpan
USEMODULE += sixlowpan_legacy
USEMODULE += oonf_common
USEMODULE += oonf_rfc5444
endif
Expand Down
1 change: 1 addition & 0 deletions Makefile.pseudomodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
PSEUDOMODULES += defaulttransceiver
PSEUDOMODULES += transport_layer
PSEUDOMODULES += pktqueue
PSEUDOMODULES += ipv6_router
2 changes: 1 addition & 1 deletion cpu/native/include/nativenet.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
extern "C" {
#endif

#ifdef MODULE_SIXLOWPAN
#ifdef MODULE_SIXLOWPAN_LEGACY
#define NATIVE_MAX_DATA_LENGTH (127)
#else
#define NATIVE_MAX_DATA_LENGTH (TAP_MAX_DATA)
Expand Down
26 changes: 13 additions & 13 deletions examples/rpl_udp/helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <stdlib.h>
#include <string.h>
#include "msg.h"
#include "sixlowpan/ip.h"
#include "sixlowpan_legacy/ip.h"
#include "transceiver.h"
#include "ieee802154_frame.h"
#include "rpl/rpl_structs.h"
Expand All @@ -33,9 +33,9 @@
#include "debug.h"

#define LL_HDR_LEN (0x4)
#define IPV6_HDR_LEN (0x28)
#define IPV6_LEGACY_HDR_LEN (0x28)

extern uint8_t ipv6_ext_hdr_len;
extern uint8_t ipv6_legacy_ext_hdr_len;

msg_t msg_q[RCV_BUFFER_SIZE];

Expand Down Expand Up @@ -63,7 +63,7 @@ void *rpl_udp_monitor(void *arg)

msg_t m;
radio_packet_t *p;
ipv6_hdr_t *ipv6_buf;
ipv6_legacy_hdr_t *ipv6_legacy_buf;
uint8_t icmp_type, icmp_code;
icmpv6_hdr_t *icmpv6_buf = NULL;

Expand All @@ -89,19 +89,19 @@ void *rpl_udp_monitor(void *arg)
p->processing--;
DEBUG("\n");
}
else if (m.type == IPV6_PACKET_RECEIVED) {
ipv6_buf = (ipv6_hdr_t *) m.content.ptr;
printf("IPv6 datagram received (next header: %02X)", ipv6_buf->nextheader);
printf(" from %s ", ipv6_addr_to_str(addr_str, IPV6_MAX_ADDR_STR_LEN,
&ipv6_buf->srcaddr));

if (ipv6_buf->nextheader == IPV6_PROTO_NUM_ICMPV6) {
icmpv6_buf = (icmpv6_hdr_t *) &ipv6_buf[(LL_HDR_LEN + IPV6_HDR_LEN) + ipv6_ext_hdr_len];
else if (m.type == IPV6_LEGACY_PACKET_RECEIVED) {
ipv6_legacy_buf = (ipv6_legacy_hdr_t *) m.content.ptr;
printf("IPv6 datagram received (next header: %02X)", ipv6_legacy_buf->nextheader);
printf(" from %s ", ipv6_legacy_addr_to_str(addr_str, IPV6_LEGACY_MAX_ADDR_STR_LEN,
&ipv6_legacy_buf->srcaddr));

if (ipv6_legacy_buf->nextheader == IPV6_LEGACY_PROTO_NUM_ICMPV6) {
icmpv6_buf = (icmpv6_hdr_t *) &ipv6_legacy_buf[(LL_HDR_LEN + IPV6_LEGACY_HDR_LEN) + ipv6_legacy_ext_hdr_len];
icmp_type = icmpv6_buf->type;
icmp_code = icmpv6_buf->code;
}

if (ipv6_buf->nextheader == IPV6_PROTO_NUM_ICMPV6) {
if (ipv6_legacy_buf->nextheader == IPV6_LEGACY_PROTO_NUM_ICMPV6) {
DEBUG("\t ICMP type: %02X ", icmp_type);
DEBUG("\t ICMP code: %02X ", icmp_code);
(void) icmp_type;
Expand Down
24 changes: 12 additions & 12 deletions examples/rpl_udp/rpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "vtimer.h"
#include "thread.h"
#include "net_if.h"
#include "sixlowpan.h"
#include "sixlowpan_legacy.h"
#include "udp.h"
#include "rpl.h"
#include "rpl/rpl_dodag.h"
Expand Down Expand Up @@ -83,11 +83,11 @@ void rpl_udp_init(int argc, char **argv)

if (command == 'r') {
rpl_init_root();
ipv6_iface_set_routing_provider(rpl_get_next_hop);
ipv6_legacy_iface_set_routing_provider(rpl_get_next_hop);
is_root = 1;
}
else {
ipv6_iface_set_routing_provider(rpl_get_next_hop);
ipv6_legacy_iface_set_routing_provider(rpl_get_next_hop);
}
}
else {
Expand All @@ -104,24 +104,24 @@ void rpl_udp_init(int argc, char **argv)
"monitor");
DEBUGF("Register at transceiver %02X\n", TRANSCEIVER);
transceiver_register(TRANSCEIVER, monitor_pid);
ipv6_register_packet_handler(monitor_pid);
//sixlowpan_lowpan_register(monitor_pid);
ipv6_legacy_register_packet_handler(monitor_pid);
//sixlowpan_legacy_lowpan_register(monitor_pid);
}
else {
printf("ERROR: Unknown command '%c'\n", command);
return;
}

/* add global address */
ipv6_addr_t tmp;
ipv6_legacy_addr_t tmp;
/* initialize prefix */
ipv6_addr_init(&tmp, 0xabcd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, id);
ipv6_legacy_addr_init(&tmp, 0xabcd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, id);
/* set host suffix */
ipv6_addr_set_by_eui64(&tmp, 0, &tmp);
ipv6_net_if_add_addr(0, &tmp, NDP_ADDR_STATE_PREFERRED, 0, 0, 0);
ipv6_legacy_addr_set_by_eui64(&tmp, 0, &tmp);
ipv6_legacy_net_if_add_addr(0, &tmp, NDP_ADDR_STATE_PREFERRED, 0, 0, 0);

if (command != 'h') {
ipv6_init_as_router();
ipv6_legacy_init_as_router();
}

/* set channel to 10 */
Expand Down Expand Up @@ -152,13 +152,13 @@ void rpl_udp_dodag(int argc, char **argv)
}

printf("Part of Dodag:\n");
printf("%s\n", ipv6_addr_to_str(addr_str, IPV6_MAX_ADDR_STR_LEN,
printf("%s\n", ipv6_legacy_addr_to_str(addr_str, IPV6_LEGACY_MAX_ADDR_STR_LEN,
(&mydodag->dodag_id)));
printf("my rank: %d\n", mydodag->my_rank);

if (!is_root) {
printf("my preferred parent:\n");
printf("%s\n", ipv6_addr_to_str(addr_str, IPV6_MAX_ADDR_STR_LEN,
printf("%s\n", ipv6_legacy_addr_to_str(addr_str, IPV6_LEGACY_MAX_ADDR_STR_LEN,
(&mydodag->my_preferred_parent->addr)));
}

Expand Down
2 changes: 1 addition & 1 deletion examples/rpl_udp/rpl_udp.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void *rpl_udp_monitor(void *arg);
extern radio_address_t id;

/** @brief Char array for IP address printing */
extern char addr_str[IPV6_MAX_ADDR_STR_LEN];
extern char addr_str[IPV6_LEGACY_MAX_ADDR_STR_LEN];

#ifdef __cplusplus
}
Expand Down
10 changes: 5 additions & 5 deletions examples/rpl_udp/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#define SERVER_PORT (0xFF01)

char udp_server_stack_buffer[KERNEL_CONF_STACKSIZE_MAIN];
char addr_str[IPV6_MAX_ADDR_STR_LEN];
char addr_str[IPV6_LEGACY_MAX_ADDR_STR_LEN];

static void *init_udp_server(void *);

Expand Down Expand Up @@ -97,7 +97,7 @@ void udp_send(int argc, char **argv)
{
int sock;
sockaddr6_t sa;
ipv6_addr_t ipaddr;
ipv6_legacy_addr_t ipaddr;
int bytes_sent;
int address;
char text[5];
Expand All @@ -122,10 +122,10 @@ void udp_send(int argc, char **argv)
memset(&sa, 0, sizeof(sa));

if (address) {
ipv6_addr_init(&ipaddr, 0xabcd, 0x0, 0x0, 0x0, 0x0, 0x00ff, 0xfe00, (uint16_t)address);
ipv6_legacy_addr_init(&ipaddr, 0xabcd, 0x0, 0x0, 0x0, 0x0, 0x00ff, 0xfe00, (uint16_t)address);
}
else {
ipv6_addr_set_all_nodes_addr(&ipaddr);
ipv6_legacy_addr_set_all_nodes_addr(&ipaddr);
}

sa.sin6_family = AF_INET;
Expand All @@ -141,7 +141,7 @@ void udp_send(int argc, char **argv)
}
else {
printf("Successful deliverd %i bytes over UDP to %s to 6LoWPAN\n",
bytes_sent, ipv6_addr_to_str(addr_str, IPV6_MAX_ADDR_STR_LEN,
bytes_sent, ipv6_legacy_addr_to_str(addr_str, IPV6_LEGACY_MAX_ADDR_STR_LEN,
&ipaddr));
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/libcoap/0001-Add-RIOT-Makefile.patch
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ index 0000000..f90baa1
+++ b/Makefile
@@ -0,0 +1,5 @@
+MODULE:=$(shell basename $(CURDIR))
+INCLUDES += -I$(RIOTBASE) -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/drivers/cc110x_legacy/include -I$(RIOTBASE)/cpu/arm7_common/include -I$(RIOTBASE)/sys/net/transport_layer/include -I$(RIOTBASE)/sys/net/sixlowpan/include/ -I$(RIOTBASE)/sys/net/ieee802154/include -I$(RIOTBASE)/sys/net/net_help -I$(RIOTBASE)/sys/posix/include -I$(RIOTBASE)/sys/posix/pnet/include
+INCLUDES += -I$(RIOTBASE) -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/drivers/cc110x_legacy/include -I$(RIOTBASE)/cpu/arm7_common/include -I$(RIOTBASE)/sys/net/transport_layer/include -I$(RIOTBASE)/sys/net/sixlowpan_legacy/include/ -I$(RIOTBASE)/sys/net/ieee802154/include -I$(RIOTBASE)/sys/net/net_help -I$(RIOTBASE)/sys/posix/include -I$(RIOTBASE)/sys/posix/pnet/include
+CFLAGS += -DWITH_POSIX
+
+include $(RIOTBASE)/Makefile.base
Expand Down
27 changes: 24 additions & 3 deletions sys/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ endif
ifneq (,$(filter l2_ping,$(USEMODULE)))
DIRS += net/link_layer/ping
endif
ifneq (,$(filter nomac,$(USEMODULE)))
DIRS += net/link_layer/nomac
endif
ifneq (,$(filter transport_layer,$(USEMODULE)))
USEMODULE += udp
USEMODULE += tcp
Expand All @@ -35,11 +38,29 @@ endif
ifneq (,$(filter protocol_multiplex,$(USEMODULE)))
DIRS += net/link_layer/protocol-multiplex
endif
ifneq (,$(filter sixlowpan,$(USEMODULE)))
DIRS += net/network_layer/sixlowpan
ifneq (,$(filter sixlowpan_legacy,$(USEMODULE)))
DIRS += net/network_layer/sixlowpan_legacy
endif
ifneq (,$(filter sixlowborder,$(USEMODULE)))
DIRS += net/network_layer/sixlowpan/border
DIRS += net/network_layer/sixlowpan_legacy/border
endif
ifneq (,$(filter sixlowpan,$(USEMODULE)))
DIRS += net/link_layer/sixlowpan
endif
ifneq (,$(filter sixlowpan_hc,$(USEMODULE)))
DIRS += net/link_layer/sixlowpan/hc
endif
ifneq (,$(filter sixlowpan_iphc_cbuf,$(USEMODULE)))
DIRS += net/link_layer/sixlowpan/iphc_cbuf
endif
ifneq (,$(filter ipv6,$(USEMODULE)))
DIRS += net/network_layer/ipv6
endif
ifneq (,$(filter ipv6_addr,$(USEMODULE)))
DIRS += net/network_layer/ipv6/addr
endif
ifneq (,$(filter ipv6_if,$(USEMODULE)))
DIRS += net/network_layer/ipv6/if
endif
ifneq (,$(filter rpl,$(USEMODULE)))
DIRS += net/routing/rpl
Expand Down
20 changes: 19 additions & 1 deletion sys/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
ifneq (,$(filter nomac,$(USEMODULE)))
USEMODULE_INCLUDES += $(RIOTBASE)/sys/net/include
endif
ifneq (,$(filter transport_layer,$(USEMODULE)))
USEMODULE_INCLUDES += $(RIOTBASE)/sys/net/include
endif
Expand Down Expand Up @@ -31,7 +34,22 @@ endif
ifneq (,$(filter protocol_multiplex,$(USEMODULE)))
USEMODULE_INCLUDES += $(RIOTBASE)/sys/net/include
endif
ifneq (,$(filter sixlowpan,$(USEMODULE)))
ifneq (,$(filter sixlowpan_legacy,$(USEMODULE)))
USEMODULE_INCLUDES += $(RIOTBASE)/sys/net/include
endif
ifneq (,$(filter sixlowpan_hc,$(USEMODULE)))
USEMODULE_INCLUDES += $(RIOTBASE)/sys/net/include
endif
ifneq (,$(filter sixlowpan_iphc_cbuf,$(USEMODULE)))
USEMODULE_INCLUDES += $(RIOTBASE)/sys/net/include
endif
ifneq (,$(filter ipv6,$(USEMODULE)))
USEMODULE_INCLUDES += $(RIOTBASE)/sys/net/include
endif
ifneq (,$(filter ipv6_addr,$(USEMODULE)))
USEMODULE_INCLUDES += $(RIOTBASE)/sys/net/include
endif
ifneq (,$(filter ipv6_if,$(USEMODULE)))
USEMODULE_INCLUDES += $(RIOTBASE)/sys/net/include
endif
ifneq (,$(filter rpl,$(USEMODULE)))
Expand Down
4 changes: 4 additions & 0 deletions sys/auto_init/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ ifneq (,$(filter net_if,$(USEMODULE)))
INCLUDES += -I$(RIOTBASE)/sys/net/include/
endif

ifneq (,$(filter nomac,$(USEMODULE)))
INCLUDES += -I$(RIOTBASE)/sys/net/include/
endif

include $(RIOTBASE)/Makefile.base
Loading