Commit Graph

179 Commits

Author SHA1 Message Date
Rémy Léone
e6bd4f1dde Rename to md 2013-03-26 23:15:37 +01:00
Rémy Léone
7b40a568a6 Update to markdown
- Spellchecking
- Update plain text to github markdown
2013-03-26 16:55:19 +01:00
Adam Dunkels
277a348f60 Changed the name of the IPv6 number of route entries configuration from UIP_CONF_DS6_ROUTE_NBU to UIP_CONF_MAX_ROUTES. 2013-03-18 11:12:44 +01: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
Sébastien Dawans
de3cd3811d Restore CC2420 as default in slip-radio 2013-02-20 18:26:52 +01:00
Laurent Deru
3486c69981 SLIP-radio support for the Econotag 2013-02-19 21:52:59 +01:00
Sébastien Dawans
e05ab21557 SLIP-radio support for the Nooliberry (RF230 radio) 2013-02-19 21:52:54 +01:00
Johannes Gilger
3877f361e4 Load Makefile.target for slip-radio
This loads Makefile.target into Makefile so we can check for TARGET==sky
when building this. Compilation for sky fails without it.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2013-01-30 15:34:06 +01:00
George Oikonomou
de251aeb85 We can now turn off example-provided putchars 2013-01-09 22:23:22 +00:00
Adam Dunkels
99f541e8fd Updated to the latest uip-ds6-route API 2012-11-27 23:04:34 +01:00
Adam Dunkels
5406dd8b18 Updated to use the new uip-ds6-route API 2012-11-27 23:04:34 +01:00
Adam Dunkels
ec8c7e9be0 Cleanup of the node-id.h files. The node-id.h file contains
declarations of functions for setting and getting a node ID number, a
functionality that exists on many platforms. Since this functionality
was not considered part of the Contiki core, each platform defined its
own node-id.h file. This commit attempts to clean this up by
collecting the node-id.h into a core/sys/node-id.h file that replaces
the old node-id.h files from the platform directories.
2012-11-20 19:59:46 +01:00
Adam Dunkels
944537fccf Removed all old RCS tags in the Contiki source tree. Those RCS tags are not used any more, as we are now using git to manage the Contiki source tree 2012-10-26 15:54:49 +02:00
Joakim Eriksson
51b73127e9 * Simple JSON parser and generator.
* Simple HTTP webservice with support for both receiving and sending HTTP requests.
* json-ws example that optionally push sensor data to COSM over IPv6.
2012-06-12 16:42:16 +02:00
Niclas Finne
f177284a73 Added option to specify the IPv6 prefix 2012-06-12 16:32:05 +02:00
Niclas Finne
16bb9295f3 Added configurable delay between slip packets to avoid losing data 2012-04-20 22:40:45 +02:00
Niclas Finne
28c62208cb Added check for illegal attributes in packet attribute serialization 2012-04-20 22:40:24 +02:00
Niclas Finne
1733f3b6bc Added command context. Patch by Joakim Eriksson 2012-04-20 22:31:37 +02:00
Joakim Eriksson
90e969344a added config for serializing attributes 2012-03-16 03:08:47 -07:00
Niclas Finne
9217c8b321 fixed compiler warning 2012-03-14 15:20:02 +01:00
Joakim Eriksson
adff634b88 Merge branch 'master' of ssh://contiki.git.sourceforge.net/gitroot/contiki/contiki 2012-03-09 01:11:21 -08:00
Joakim Eriksson
ae3ff57c39 replaced inet6 with inet for linux to get tunbridge working. 2012-03-09 01:09:56 -08:00
David Kopf
07f6e10c1c Add display options to border router web page, default now uses stack instead of static buffer.
Turn radio off until prefix is acquired.
2012-03-02 16:01:12 -05:00
Ilya Dmitrichenko
b67e49051c Use __APPLE__ instead of __MACH__. 2012-03-02 15:15:46 -05:00
Ilya Dmitrichenko
7621bdfc77 Fixed ifconfig for Darwin 2012-03-02 15:15:45 -05:00
Ilya Dmitrichenko
70d3acf9af Fixed baudrate issue on Darwin. 2012-03-02 15:15:44 -05:00
David Kopf
7110075108 Make static buffer the default, add comments. 2012-03-06 09:10:12 -05:00
Niclas Finne
40c32990e3 Added missing arguments to usage information 2012-03-06 12:33:16 +01:00
Joakim Eriksson
417a2b691f increase uip buffer size for native border router 2012-02-23 13:59:39 -08:00
Niclas Finne
5fdcd6bc13 Fixed typo, added option to run without slip connection 2012-02-21 14:42:05 +01:00
Nicholas J Humfrey
a561d20828 Converted u8_t to uint8_t and u16_t to uint16_t in the examples directory. 2012-02-21 08:33:25 -05:00
Niclas Finne
23a70177b2 Added option to connect to server instead of serial device 2012-02-21 11:05:52 +01:00
David Kopf
0327fe3020 Turn off RDC before SLIP prefix interchange. Disable SIN/SUT prints, leave off-route prints. 2012-02-11 15:15:00 -05:00
Niclas Finne
aceb36c66b Replaced SELECT_CALLBACK with an API that supports multiple select callbacks 2012-01-19 17:52:01 +01:00
Adam Dunkels
8a89f90e3e Update to the newest RPL API 2012-01-18 06:12:24 -08:00
David Kopf
b251619a2f Add wpcap for cygwin/Windows native border router 2012-01-08 13:37:56 -05:00
David Kopf
777cc88872 Add 921600 baud to slip options, fix compiler warnings 2012-01-08 13:33:40 -05:00
Joakim Eriksson
3d388760c3 added parsing of frame to get receiver address, etc 2012-01-08 02:27:37 -08:00
Niclas Finne
8b83ffec67 Added native-border-router and slip-radio 2012-01-01 09:29:33 +01:00
Joakim Eriksson
65163a9b57 Changed FRAMER to return negative values for error to allow 0 size headers. 2012-01-01 09:10:56 +01:00
Mariano Alvira
5247be27bf dio_intcurrent is now part of the instance struct 2011-12-09 11:15:33 -05:00
Nicolas Tsiftes
d0ebeb409e Merge remote-tracking branch 'sf/master' into rpl-patch
Conflicts:
	core/net/tcpip.c
2011-12-08 15:26:11 +01:00
Nicolas Tsiftes
6177187954 Check the return value of udp_new. 2011-12-01 14:40:55 +01:00
Nicolas Tsiftes
2b1549bfe8 Continued merge with sf master 2011-11-21 15:25:13 +01:00
Nicolas Tsiftes
0e32956a63 Merge remote-tracking branch 'sf/master' into rpl-patch 2011-11-21 14:59:31 +01:00
Niclas Finne
c273969400 Added missing include 2011-11-15 15:14:43 +01:00
David Kopf
899123a634 Use fixed font for neighbors and routes 2011-10-27 09:25:56 -04:00
Joakim Eriksson
cf61e522a8 added powertrace to IPv6 including an example 2011-10-13 15:09:40 +02:00
Matthias Kovatsch
2522566b68 Added SMALL flag for border-router (exceeded sky memory) 2011-10-10 14:30:31 +02:00
Niclas Finne
c46acc0a77 Updated for the latest version of httpd-simple in rpl-border-router 2011-09-06 00:25:20 +02:00
Niclas Finne
c1b88afe48 Added safeguard to avoid copying too much data to filename 2011-09-06 00:19:31 +02:00
Adam Dunkels
bfc314a037 Remove debug output to save space 2011-09-05 12:08:26 +02:00
Adam Dunkels
a06cf93e4c Made the sky and z1 platform handling of PROJECT_CONF_H the same as the other platforms: the makefile should define PROJECT_CONF_H to be the name of the header file to include. This header file should #undef everything it #defines, as it is included after all the other configuration options in contiki-conf.h 2011-09-05 11:46:15 +02:00
Adam Dunkels
722b6e0b96 Print out sender IPv6 address when receiving data. When sending data, include a counter in the message. 2011-09-01 09:19:26 +02:00
Adam Dunkels
69d262af5b Merge branch 'master' of ssh://contiki.git.sourceforge.net/gitroot/contiki/contiki 2011-08-31 20:57:31 +02:00
Adam Dunkels
587ac9c501 Copyright headers 2011-08-31 20:54:57 +02:00
David Kopf
407c76c5df output buffer unused at present, save some RAM 2011-08-31 11:52:55 -04:00
Adam Dunkels
823f28e87c Made the simple UDP examples simpler 2011-08-29 21:51:09 +02:00
Adam Dunkels
2ae835ef65 Simulation file for the unicast example 2011-08-29 21:41:25 +02:00
Adam Dunkels
e480740fd9 Simulation file for the broadcast example 2011-08-29 21:41:15 +02:00
Adam Dunkels
b3f3163661 Example code for the simple UDP API 2011-08-29 21:33:23 +02:00
David Kopf
c42085c00b Add warning about slip overrun 2011-08-24 10:59:15 -04:00
David Kopf
b7cd4fbd90 Add CONTIKI_PROJECT to the makefile, enabling make upload. 2011-08-16 14:37:28 -04:00
maniacbug
1c53807727 Make PERIOD and SERVER_REPLY configurable 2011-08-16 14:17:01 -04:00
maniacbug
912ea85199 Make PERIOD configurable in Makefile 2011-08-16 14:16:19 -04:00
David Kopf
db5cee9f1b [Forget to add to previous commit]
Free internal webserver from dependency on /apps/webserver.
2011-08-16 10:43:47 -04:00
David Kopf
e4257647cd Free internal webserver from dependency on /apps/webserver.
Allow choice of webservers with makefile switch.
2011-08-15 18:30:31 -04:00
David Kopf
83e3b99d54 Let RPL examples enable platform RPL 2011-08-15 14:45:44 -04:00
David Kopf
6ec85fe079 Add Iris port of Shinta Hatatani 2011-08-03 10:17:59 -04:00
Adam Dunkels
63bfaa22ae Bugfix: IPv6 address to Rime address traslation did not appear correctly in the Collect-View GUI. 2011-07-29 20:26:57 +02:00
David Kopf
031c45994b Add WITH_WEBSERVER=<webserver> options 2011-07-24 11:59:28 -04:00
HATATANI Shinta
04b4ff157f change some examples for iris 2011-07-18 19:53:18 +09:00
Vincent Brillault
dc9cbe647d Changes in RPL implementation :
- Structural modification of RPL data storage.
- Support multiple gateways (multiple DODAG-ID with a unique InstanceID)
- Use Lollipop counters
- Add leaf-only configuration option for RPL
Bugfix :
- Correctly send "Grounded" flag in DIO
2011-07-11 16:52:45 +02:00
Nicolas Tsiftes
ccfb30707a print node ids correctly 2011-06-28 17:44:35 +02:00
Niclas Finne
5a4a39afb3 changed etx to metric 2011-04-07 09:46:37 +02:00
Joakim Eriksson
90ae09c7e5 fixed parsing of address to handle [<addr>] 2011-03-22 10:42:38 +01:00
dak664
14246ef811 Add optional build without internal webserver 2011-03-13 11:59:17 -04:00
dak664
97a71fea76 Conditional inclusion of the internal webserver 2011-03-11 15:07:15 -05:00
Joakim Eriksson
7033bc859e fixed the prefix query 2011-03-11 16:34:30 +01:00
dak664
d4f58ca7f0 Server address options giving different 6lowpan header compression 2011-03-08 14:15:55 -05:00
Fredrik Osterlind
499c13a357 removed execute flag of source files (avoids diff problems with egit) 2011-03-01 18:16:42 +01:00
Mariano Alvira
ea527da162 don't do a hard override of platform config in rpl project config 2011-02-08 09:21:16 -05:00
joxe
db0423af20 added response to Mac addr request and added addrs in printout 2011-01-17 20:05:51 +00:00
joxe
d7712b27d0 added undef of putchar for platforms where it is a macro 2011-01-14 17:57:48 +00:00
joxe
a920b73903 fixed Makefile to work with platform other than sky 2010-11-07 18:32:55 +00:00
adamdunkels
46ce00c173 Even out the transmissions during the interval 2010-11-06 11:55:15 +00:00
adamdunkels
1bf044f2c4 Moved project-conf.h 2010-11-03 15:46:41 +00:00
adamdunkels
5444581739 Data collection over RPL/IPv6 2010-11-03 15:36:38 +00:00
adamdunkels
39cfd156b2 Bugfix: avoid sending bogus data over the radio when no prefix is set; bug reported by mathieupouillot 2010-11-03 07:53:12 +00:00
joxe
aefd88c110 moved config file 2010-10-21 18:23:44 +00:00
adamdunkels
5585d72c86 A simple but substantial change: uIP used the htons()/HTONS() macro
functions for converting between host and network byte order. These
names are the de facto standard names for this functionality because
of the original BSD TCP/IP implementation. But they cause problems for
uIP/Contiki: some platforms define these names themselves (Mac OS,
most notably), causing compilation problems for Contiki on those
platforms.

This commit changes all htons to uip_htons instead. Same goes for
htonl, ntohs, and ntohl. All-caps versions as well.
2010-10-19 18:29:03 +00:00
joxe
71d5c5f3c1 removed servreg_hack from the rpl-udp example 2010-10-18 13:43:41 +00:00
nvt-se
072f208a29 Removed unused variable. 2010-09-15 15:55:08 +00:00
joxe
a36ea1f506 fixed compilation bug 2010-08-31 20:05:44 +00:00
oliverschmidt
a5dff5e08a Up to now the root of the webserver filesystem was always the current directory. Now an optional file 'wwwroot.cfg' is read. If present its content is used as prefix in the conversion of http paths to local paths. This prefix may be a relative path as well as an absolute path.
This is especially useful for the cc65-based targets as it ain't possible there to "just change into the wwwroot directory and start the webserver using its pathname".
2010-08-30 19:44:38 +00:00
joxe
a72252cbd8 removed forced configuration of number of routes and neigbors 2010-08-24 17:54:56 +00:00
adamdunkels
12a1ad2e7d Add the servreg-hack app to the Makefile 2010-06-15 19:02:40 +00:00
adamdunkels
237398a74b Rewrote the code to use the servreg-hack module, so that clients can look up the IP address of the collector node. 2010-06-15 19:02:00 +00:00
adamdunkels
951fd78f6c ctimer moved from net/rime to sys/ 2010-06-14 18:58:45 +00:00
nvt-se
6eadf2522f ctimer.h moved 2010-06-14 16:19:45 +00:00