Commit Graph

1349 Commits

Author SHA1 Message Date
lebrush
6eafa08313 Make DS6 route notifications optional. 2013-05-21 10:05:02 +02:00
Nicolas Tsiftes
83c08bdf99 Merge pull request #219 from lebrush/sicslowpan-uip-debug
Force sicslowpan to use uip-debug rather than an own system
2013-05-20 04:59:20 -07:00
Robert Quattlebaum
382308e6bf Merge pull request #242 from darconeous/pull-request/resolv-bad-nsec-fix
resolv: Fix for bad NSEC record on announce
2013-05-19 16:34:03 -07:00
Robert Quattlebaum
d0b99cc3cc resolv: Fix for bad NSEC record on announce 2013-05-19 16:09:50 -07:00
Sébastien Dawans
1be01a9c90 Support prefix udpates with PIO Handling 2013-05-19 10:51:57 -04:00
Mariano Alvira
5df586e09d Merge pull request #184 from g-oikonomou/bug-fixes/rimestats
Rimestats Fix (#183)
2013-05-19 07:45:22 -07:00
Robert Quattlebaum
0bed4b17a2 resolv: Fix for word alignment issues in mdns_prep_host_announce_packet(). 2013-05-18 10:43:09 -07:00
lebrush
eef6d7a37e Removed undef 2013-05-15 16:49:36 +02:00
lebrush
82d498f3a1 Removed undef 2013-05-15 16:25:34 +02:00
lebrush
966e9fc484 Force sicslowpan to use uip-debug rather than an own system 2013-05-15 12:23:21 +02:00
lebrush
071cfaf1cb Corrects some leftover uncapitalized printfs which may cause some platforms
to crash.
2013-05-15 12:21:15 +02:00
Nicolas Tsiftes
f8edbbb8d2 Merge pull request #178 from adamdunkels/feature-contiki-default-conf
A first stab at a default configuration system
2013-03-25 20:13:15 -07:00
George Oikonomou
62366813b0 Provide a macro to read rimestats when enabled 2013-03-20 21:14:34 +00:00
George Oikonomou
12860ce5d4 Fix #183 (short term fix)
This is a temporary fix for #183, so that things can
build cleanly until the issue is fixed properly.

If RIMESTATS_CONF_ENABLED is 0, rimestats.foo will always
read as 0, since RIMESTATS_ADD(foo) doesn't do anything
2013-03-20 19:59:20 +00:00
Nicolas Tsiftes
199a89bac4 Merge pull request #173 from adamdunkels/feature-ipv6-not-in-makefile
Allow IPv6 to be compiled via #define
2013-03-19 08:17:52 -07:00
Nicolas Tsiftes
7f2a842b71 Merge pull request #174 from adamdunkels/feature-net-improvements
Improvements to the core/net/ code
2013-03-18 17:12:12 -07:00
Nicolas Tsiftes
6a07172662 Merge pull request #176 from adamdunkels/feature-net-bugfixes
Network system bugfixes
2013-03-18 13:38:44 -07:00
Adam Dunkels
7742b05d8c Major bugfix: when nullrdc is asked to send a list of packets, send the list of packets and not just the first packet - this is essential for retransmissions of fragmented IP packets to work 2013-03-18 13:35:29 +01:00
Adam Dunkels
f81e4071f1 Merge pull request #135 from darconeous/pull-requests/core-net-bridge-mode
core/net: Added support for "bridge mode".
2013-03-18 04:43:15 -07:00
Adam Dunkels
ad28f1b396 Merge pull request #75 from cmorty/mesh_ready
Add mesh_ready() to mesh
2013-03-18 04:42:43 -07:00
Adam Dunkels
2ba293a538 Bugfix: check the size of the outgoing packet to avoid overflowing the output buffer 2013-03-18 11:22:08 +01:00
Adam Dunkels
843d2361dc Include the rimestats variable only if rimestats are enabled by the configuration 2013-03-18 11:22:06 +01:00
Adam Dunkels
4efd570cf9 Minor bugfix: explicitly cast pointer argument in debug printf 2013-03-18 11:22:05 +01:00
Adam Dunkels
f2fbb4b49d Defensive programming: make sure that we don't fail completely if we get a callback for a NULL pointer 2013-03-18 11:22:04 +01:00
Adam Dunkels
82b755c017 Bugfix: keep track of receiver being awake as a local variable rather than a global, as it may have changed between invokations 2013-03-18 11:22:02 +01:00
Adam Dunkels
0670a8e1e2 Minor code style fixes to the contikimac and nullrdc code 2013-03-18 11:22:01 +01:00
Adam Dunkels
3efa84ecc8 New mechanism for computing the 6lowpan header length dynamically, depending on how large header the framer creates. Also check the incoming packet for buffer overflow. 2013-03-18 11:19:22 +01:00
Adam Dunkels
cb2336a322 Send announcements only if the node is configured to be a router 2013-03-18 11:19:21 +01:00
Adam Dunkels
5993595a8f A number of updates to nullrdc
* add a few rimestats to keep track of sent and received acks
* made a number of configuration options possible to override (ack timing)
* added the logic for sending 802.15.4 link layer ack packets, despite not being able to guarentee the 802.15.4 MAC timing
* increased the number of sequence numbers to keep track of for duplicate filtering
2013-03-18 11:19:20 +01:00
Adam Dunkels
4541d3e85b Let the framer functions use ints instead of uint8_t to make them more generic 2013-03-18 11:19:18 +01:00
Adam Dunkels
2d50a40643 A default configuraion file for Contiki
The contiki-default-conf.h file is intended as a safe fallback for
a number of configuration options in Contiki, to avoid putting too
much in the individual contiki-conf.h files.
2013-03-18 11:12:43 +01:00
Adam Dunkels
927cc8d895 Added #if UIP_CONF_IPV6 around the IPv6 code in the uIP source tree to allow the C files to be compiled even if IPv6 is not configured. 2013-03-18 09:45:30 +01:00
Adam Dunkels
db1e8cdbac Separated the uIP makefile from the top-level Makefile.include into a separate core/net/Makefile.uip makefile 2013-03-18 09:45:29 +01:00
Robert Quattlebaum
da81360731 core/net/resolv: Misc. updates and cleanups. 2013-03-14 19:14:32 -07:00
Robert Quattlebaum
7e9f472faa core/net/resolv: Fix for resolving CNAME records. 2013-03-14 19:13:51 -07:00
Robert Quattlebaum
639a9ca399 core/net/resolv: Fix for SDCC. 2013-03-14 19:13:04 -07:00
Oliver Schmidt
46cb6013ae Reduced code size.
Combined recent changes from darconeous...
- Refactor to decrease minimum code footprint.
- Added `RESOLV_CONF_SUPPORTS_RECORD_EXPIRATION`.
...with a few additional changes to reduce code size.
2013-03-14 22:53:52 +01:00
Oliver Schmidt
d8862bd243 Some more changes improving code style conformance and code size. 2013-03-13 17:52:57 +01:00
Oliver Schmidt
7a1fa4de6c Some coding style nomalization. 2013-03-13 16:14:29 +01:00
Oliver Schmidt
8fa9767d47 Restored Contiki compatibility with non-C99 compilers.
(and compilers without non-standard extensions like void pointer arithmetic)
2013-03-13 14:40:24 +01:00
Moritz 'Morty' Strübe
b1dbc2047e Add mesh_ready() to mesh
mesh_ready checkes whether a packet is queued. This allows to avoid
packet loss at application level.
2013-03-13 09:44:38 +01:00
Robert Quattlebaum
c0a693672c core/net: Added support for "bridge mode".
"Bridge mode" allows devices to more easily send 802.15.4 packets as if
they were a different device. It also turns off any packet filtering
that may be implemented at layer 2. It works by allowing
`PACKETBUF_ADDR_SENDER` to be set earlier in the stack.

This is useful for implementing 6LoWPAN-ethernet bridges.

Enabled via setting `NETSTACK_CONF_BRIDGE_MODE` to 1. Disabled by
default.
2013-03-10 14:45:15 -07:00
Adam Dunkels
4e40cb8a8d Merge pull request #116 from cetic/rpl-lifetimes
RPL Lifetimes
2013-03-10 13:04:07 -07:00
Adam Dunkels
39e5a8c6dc Merge pull request #80 from darconeous/mdns-resolv
Adds IPv6 and MDNS domain name resolution.
2013-03-10 12:58:39 -07:00
Adam Dunkels
0841bce833 Merge pull request #82 from darconeous/master
Makefiles: Allow setting UIP_CONF_IPV6=0 to work as expected.
2013-03-10 12:51:03 -07:00
Robert Quattlebaum
f145c17039 core/net/resolv: IPv6 and mDNS ("Bonjour") support. Major refactor.
This patch updates the DNS resolver to support IPv6 and introduces an
improved API for looking up DNS entries. This patch also adds optional
support for mDNS lookups and responses to the DNS resolver.

Here is a quick summary of the changes:

 * Added support for IPv6 lookups.
 * DNS queries now honor record expiration.
 * Added support for mDNS, compatible with "Bonjour".
 * Implemented a new lookup api, `resolv_lookup2()`, which provides
   more information about the state of the record(error, expired,
   looking-up, etc.).

About mDNS/Bonjour Support
--------------------------

This patch adds basic support for mDNS/Bonjour, which allows you to
refer to the name of a device instead of its IP address. This is
incredibly convenient for IPv6 addresses because they tend to be very
long and difficult to remember. It is especially important for
link-local IPv6 addresses, since not all programs support the '%'
notation for indicating a network interface (required on systems with
more than one network interface to disambiguate).

In other words, instead of typing in this:

 * `http://[fe80::58dc:d7ed:a644:628f%en1]/`

You can type this instead:

 * `http://contiki.local/`

Huge improvement, no?

The convenience extends beyond that: this mechanism can be used for
nodes to talk to each other based on their human-readable names instead
of their IPv6 addresses. So instead of a switch on
`aaaa::58dc:d7ed:a644:628f` triggering an actuator on
`aaaa::ed26:19c1:4bd2:f95b`, `light-switch.local` can trigger the
actuator on `living-room-lights.local`.

What you need to do to be able to look up `.local` names on your
workstation depends on a few factors:

 * Your machine needs to be able to send and receive multicast packets
   to and from the LoWPAN. You can do this easily with the Jackdaw
   firmware on an RZUSBStick. If you have a border router, you will need
   it to bridge the mDNS multicast packets across the border.

 * If you are using a Mac, you win. All Apple devices support mDNS
   lookups.

 * If you are using Windows, you can install Apple's Bonjour for Windows
   package. (This may be already installed on your machine if you have
   installed iTunes) After you install this you can easily do `.local`
   lookups.

 * If you are using a Unix machine, you can install Avahi.

The default hostname is set to `contiki.local.`. You can change the
hostname programmatically by calling `resolv_set_hostname()`. You can
change the default hostname by changing `CONTIKI_CONF_DEFAULT_HOSTNAME`.

You may disable mDNS support by setting `RESOLV_CONF_SUPPORTS_MDNS` to
`0`.

---------------------------------

core/net/resolv: `resolv_lookup2()` -> `resolv_lookup()`

Note that this patch should fix several `resolv_lookup()` bugs
that already existed. There were many cases where `resolv_lookup()`
was being called and the IP address ignored, but later code
assumed that the IP address had been fetched... ANYWAY, those
should be fixed now.

---------------------------------

examples/udp-ipv6: Updated client to use MDNS to lookup the server.

Also updated the Cooja regression test simulation.
2013-03-10 11:40:08 -07:00
Robert Quattlebaum
97e16760c3 core/net/uip-ds6: Make uip_ds6_maddr_add() and uip_ds6_maddr_lookup() const-correct. 2013-03-10 11:39:12 -07:00
Robert Quattlebaum
1d113f52ad core/net/uip: Rename uip_ethaddr to uip_lladdr.
There isn't really a good reason I can think of for these
to be different between IPv4 and IPv6.
2013-03-10 11:39:11 -07:00
Sébastien Dawans
e02d480ff5 Moved RPL Lifetime configuration to rpl-conf.h 2013-03-09 16:28:43 +01:00
Sébastien Dawans
b6c54faf9d Adds default route lifetime update in RPL DIO processing 2013-03-09 16:27:37 +01:00