Commit Graph

191 Commits

Author SHA1 Message Date
Adam Dunkels
0fd503af42 Removed the experimental checkpointing code 2013-11-28 14:09:17 +01:00
Adam Dunkels
bb2dcaa057 A massive all-tree automated update of all double inclusion guard #defines that changes from using two underscores as a prefix, which are reserved, to not using two underscores as a prefix 2013-11-24 20:20:11 +01:00
Oliver Schmidt
2316c6b461 Reverted commit below as the cc65 bug in question is fixed.
Rearranged some expressions to avoid triggering a cc65 bug. (reverse-merged from commit 7134da0915)
2013-10-08 22:42:41 +02:00
Oliver Schmidt
7134da0915 Rearranged some expressions to avoid triggering a cc65 bug. 2013-10-05 21:26:28 +02:00
Mariano Alvira
e24a50c1b2 Remove everything that depended on the now gone twitter APP. 2013-05-18 18:22:37 -04:00
François Revol
ba541fd510 shell: Fix GUI build
* Fix shell_exit() signature, it's called without any argument.
2013-03-19 19:23:08 +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
Oliver Schmidt
b493395f00 Allow to reduce functionality if non-standard alloca() isn't available. 2013-02-04 00:49:52 +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
Fredrik Osterlind
10064dbdd9 bugfix: control messages were lost due to lack of buffers; wait for buffer before sending 2012-05-30 18:01:04 +02:00
Niclas Finne
7bf4fa4bff Removed obsolete mac pointer 2012-03-28 21:51:19 +02:00
Nicholas J Humfrey
efab964451 Converted u8_t to uint8_t and u16_t to uint16_t in the apps directory. 2012-02-21 08:33:25 -05:00
Fredrik Osterlind
abc4cee94d hex conversion and crc shell commands 2011-12-21 10:54:39 +01:00
Fredrik Osterlind
e743039261 no newline added by echo command 2011-12-21 10:51:23 +01:00
Adam Dunkels
4e5d3217ca Copy the string first, since shell_output_str() does not ensure constness of the first string 2011-08-31 22:03:31 +02:00
David Kopf
44f4ee9315 Use PROCESS_NAME_STRING macro to handle NO_PROCESS_NAMES 2011-08-03 11:08:40 -04:00
Oliver Schmidt
baae42b2f8 Made DNS optional - just like the other web clients. 2011-05-21 22:33:18 +02:00
Oliver Schmidt
8c00be1a56 Minor beautification / optmization of prompt / banner custimization. 2011-05-21 20:52:00 +02:00
Oliver Schmidt
3d9771403e Merge remote-tracking branch 'origin/master' 2011-05-21 11:50:56 +02:00
Oliver Schmidt
ff9dd0fce4 Improved shell banner / prompt customization.
Working with string-type macros on cmdlines is a pain in the nack so rather go for global string constants activated by simple flag-type macros.
2011-05-21 11:48:50 +02:00
Oliver Schmidt
831312e311 Some Telnet server enhancements:
- PETSCII sending support
- Option to customize shell prompt and banner
- Stop all running commands on shell close
- New 'exit' and 'quit' commands to close shell
2011-04-16 21:10:22 +02:00
Oliver Schmidt
07f3df45be Converted scope-local variables into function-local variables.
The 6502-specific LC implementation doesn't allow for scope-local vaiables between PT_BEGIN/PROCESS_BEGIN/PSOCK_BEGIN and PT_BEGIN/PROCESS_END/PSOCK_END.
2011-04-12 14:12:09 +02:00
Enric M. Calvo
1716d837fc Merge branch 'master' of git://contiki.git.sourceforge.net/gitroot/contiki/contiki into master_cleanup
Makefile.z1 is broken into .common and .z1 to share it with Z1 Starter Platform

Conflicts:
	.gitignore
	platform/z1/Makefile.z1
2011-03-25 17:46:38 +01:00
Niclas Finne
1601b25d53 Updated to use new Rime sniffer API 2011-05-10 15:48:34 +02:00
Adam Dunkels
f5a6b6f20a Fixed bugs in the types to the printf arguments 2011-03-02 15:49:04 +01:00
Enric M. Calvo
840c1331d1 examples/sky-shell now runs out-of-the-box on Z1
For best results, use a Z1 Starter Platform with an sht11 sensor plugged
in the ziglet port.
Keep in mind that the light-sensor is mapped to the potentiometer in this platform.
XXX Tracing why powertrace does not show anything different from 0.
2011-03-01 19:42:23 +01:00
Adam Dunkels
847c99d804 Explicitly turn LEDs off if the command is interrupted 2011-02-10 22:43:18 +01:00
Adam Dunkels
9c62a8c1a6 Set default number of retries to 8 to make the netperf command more robust 2011-02-07 17:34:39 +01:00
nifi
569895af1c Removed void * operations 2011-01-12 22:58:33 +00:00
adamdunkels
7f95059703 The collect view functions now take the node's routing metric, not the parent's routing metric. 2010-10-24 21:04:39 +00:00
adamdunkels
d6cb77a1d0 Broke out shell code from the collect-view app to make it useful for non-shell apps too. Added a shell app for interacting with collect-view. Broke out handling of parent, rtmetric, etx, and num_neighbors to make collect-view independent of rime collect. 2010-10-20 15:21:43 +00:00
adamdunkels
ce53d7b748 Rewrote part of the repeat command to make the repeat cycle deterministic 2010-10-20 15:18:49 +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
adamdunkels
0c5f9992c1 Increased the default number of retransmissions for the send command 2010-10-12 11:36:42 +00:00
adamdunkels
3f6dc30373 Added a powertrace command as an interface to the powertrace app 2010-10-12 11:34:49 +00:00
adamdunkels
04ede258d0 Bugfix: rfchannel did not print out over the correct command structure 2010-10-12 11:34:08 +00:00
oliverschmidt
32701dacb5 Fixed recent build error in example-shell.
Both apps/webbrowser and apps/webserver contain a http-strings.c. It seems unclear to me if the original intention was to have them identical (but then they should have been factored out in the first place) or if they were only very similiar by chance.

Anyway, currently webserver/http-strings.c is a clean superset of webbrowser/http-strings.c so if a project has both HTTP server and client parts it is desirable to use the webserver variant. In the case of apps/shell this can be archived by adding webserver *before* webbrowser to the APPS variable.

This seems like a hack to me - but the whole shell build qualifies as hack, doesn't it ;-)
2010-09-29 11:53:39 +00:00
adamdunkels
0261af4af2 Made use of the new collect keepalive timer 2010-09-22 22:11:20 +00:00
adamdunkels
2be8454a15 Const and typecast bugfix 2010-09-14 07:18:14 +00:00
adamdunkels
f11b0d56ee Fixed compilation error 2010-09-14 06:40:17 +00:00
adamdunkels
6794154aa5 Set a default value for 'send' commands without arguments 2010-09-13 19:15:21 +00:00
adamdunkels
3be23eb3fc Fixed alignment issue 2010-09-13 13:29:47 +00:00
adamdunkels
f1769a3622 Added the number of hop-by-hop retransmissions to the 'send' command 2010-09-13 13:29:29 +00:00
nifi
a453acd325 Added support for IPv6 URLs 2010-06-09 08:36:43 +00:00
nifi
b54c6e673b Updated API for uiplib and resolv to use uip_ipaddr_t instead of uint16_t for compability with IPv6 2010-05-31 15:22:08 +00:00
adamdunkels
e53b93384a Print out rdc instead of mac 2010-04-30 07:17:50 +00:00
nifi
a5264324b5 Added missing urlconv.c for optional URL filtering. 2010-04-19 21:25:49 +00:00
nvt-se
40f7541f88 Report an error if cfs_write failed. 2010-04-12 13:21:58 +00:00
adamdunkels
1fa81eac59 Print out the name of the radio duty cycling mechanism instead of the MAC 2010-04-04 12:27:31 +00:00