Commit graph

570 commits

Author SHA1 Message Date
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
Simon Duquennoy 248301a041 Fix naming issues and includes in uip-ds6-nbr.h 2013-08-19 17:48:30 +02:00
Simon Duquennoy 5dc05e7913 Port apps, examples, platforms and tools so they use the new neighbor and route API. 2013-08-19 17:48:30 +02:00
Nicolas Tsiftes b27fb1b697 Prevent erroneous index creation for non-numerical attributes. 2013-08-07 10:50:30 +02:00
Oliver Schmidt 3f2fd36d8a Merge pull request #310 from oliverschmidt/master
Minor code style fix
2013-07-30 13:51:52 -07:00
Oliver Schmidt 49fb300aa0 Minor code style fix 2013-07-30 22:48:04 +02:00
Daniele Alessandrelli 9230c0a158 Fix for coap_get_header_token() always returning 0 and not retrieving the token when using CoAP draft v13.
Every reference to the old Token Option has been removed (in CoAP draft v13 the Token Option has been promoted to a field following the CoAP Header).
2013-07-22 19:36:01 +02:00
Nicolas Tsiftes f606322ae0 Merge pull request #276 from mkovatsc/er-coap-13
Erbium (Er) fixes and updates
2013-06-24 01:44:23 -07:00
Matthias Kovatsch a8653f1a70 Fixed stimer issues due to core changes for older Erbium versions. 2013-06-19 15:59:45 +02:00
Matthias Kovatsch 75b958bb03 Added CoAP ping support. 2013-06-19 15:27:23 +02:00
Matthias Kovatsch 5e18efa10c Updated copyright information. 2013-06-19 15:27:20 +02:00
Matthias Kovatsch 78e3a75b9c Updated buffer definition macro due to core changes. 2013-06-19 15:27:04 +02:00
Matthias Kovatsch 3048126ff1 Limited observe clock to 24 bits. 2013-06-19 14:45:57 +02:00
Matthias Kovatsch 56f877b633 Fixed option header bug for large deltas. 2013-06-19 14:45:20 +02:00
Adam Dunkels 0b882cd516 Telnetd improvement: allow specifying a maximum silence time and kill the connection after that time. This is to avoid the telnet connection getting stuck forever if the connecting host reboots. 2013-05-25 12:10:26 +02:00
Karl Palsson 2146ee1c84 [webserver] Update urls in default data
Replace all links to sics.se with contiki.org
2013-05-21 21:19:32 +00: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
Mariano Alvira e24a50c1b2 Remove everything that depended on the now gone twitter APP. 2013-05-18 18:22:37 -04:00
Adam Dunkels 59a8df14a8 Merge pull request #189 from sieben/markdown
Update to markdown
2013-05-16 00:24:25 -07:00
Karl Palsson 7345579ad6 Replace twitter app with generic http-post-auth
Twitter removed http basic auth from the api in august 2010, but this
underlying code is a good example of doing http basic auth in contiki.

The app has been renamed, and some fixes applied to make it build
cleanly.
2013-05-04 12:17:18 +00:00
François Revol b9774989a1 Add missing include
Fix log_message() undefined warning.
2013-04-20 14:43:37 +02:00
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
George Oikonomou a82746e72a Fix a mismatch between declaration and definition 2013-03-23 15:07:47 +00:00
George Oikonomou db078cf7e8 Replace reads of rimestats with RIMESTATS_GET(x) 2013-03-20 21:14:35 +00:00
George Oikonomou 8c0cf50dca Rename RIMESTATS_CONF_ON to RIMESTATS_CONF_ENABLED 2013-03-20 21:14:34 +00: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
Mariano Alvira 163cb7cf13 Merge pull request #154 from malvira/erbium-build-fixes-er3-7
Fix er 3 and 7 buids in latest erbuim (subscribers counter has changed type)
2013-03-13 08:47:24 -07:00
Oliver Schmidt 3a486d3954 Merge pull request #159 from oliverschmidt/master
Added support for <input type='hidden'>.
2013-03-13 02:53:46 -07:00
Oliver Schmidt 66fa843389 Added support for <input type='hidden'>.
Hidden form fields are aded to the page attribute buffer like text form fields so there's no need for special treatment in formsubmit(). However they are not added as widgets to the window so there's no user interaction.
2013-03-13 10:50:11 +01:00
Mariano Alvira 4dd29cca64 er-13 has changed the type of notify_subscribers counter to int32_t
from uint16_t which breaks builds of WITH_COAP=3 or 7.

This patch changes the 03 and 07 engine to int32_t.

An alternate fix would be to switch out the type in erbuim.h based on
WITH_COAP.

Or, maybe better, would be to drop old COAP versions.
2013-03-11 16:49:52 -04: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
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 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
Matthias Kovatsch 23e56e57b0 Merge branch 'master' of https://github.com/contiki-os/contiki 2013-03-08 20:21:54 +01:00
Oliver Schmidt c7b8bac006 Reorganized web page attribute data handling.
- Up to now the web browser used several fixed size arrays to hold the various types attribute data of the web page. This turned out to be way to inflexible for any non-trivial web page. Therefore now all attribute data is stored in a single buffer one after the other as they arrive from the parser only occupying the memory actually needed. This allows for pages with many links with rather short URLs as well as pages with few link with long URLs as well as pages with several simple forms as well as pages with one form with many form inputs.

- Using the actual web page buffer to hold the text buffers of text entry fields was in general a cool idea but in reality it  is often necessary to enter text longer than the size of the text entry field. Therefore the text buffer is now stored in the new unified attribute data buffer.

- Splitting up the process of canonicalizing a link URL and actually navigating to the resulting URL allowed to get rid of the 'tmpurl' buffer used during form submit. Now the form action is canonicalized like a usual link, then the form input name/value pairs are written right into the 'url' buffer and afterwards the navigation is triggered.

- Support for the 'render states' was completely removed. The only actually supported render state was centered output. The new unified attribute buffer would have complicated enumerating all widgets added to the page in order to adjust their position. Therefore I decided to drop the whole feature as the <center> tag is barely used anymore and newer center attributes are to hard to parse.
2013-03-06 16:29:36 +01:00
Oliver Schmidt 65a4472a0d Limit content of web browser version of http-strings to web browser.
In general it seems a bad idea to have two http-strings.c files as this precludes to have them both in the Contiki library. However as it stands it seems most reasonable to have one http-strings.c file be a clean superset of all usecases in order to allow them to run together in a single binary. As webserver/http-strings.c already contained strings not present in webbrowser/http-strings.c it seems reasonable to consider webserver/http-strings.c as the superset described. From that perspective it is appropriate to remove all strings from webbrowser/http-strings.c which are not used by the web browser in order to save memory otherwise wasted.
2013-03-06 15:12:02 +01:00
Oliver Schmidt d71ce70c54 Made sure that HTML form values get initialized properly. 2013-02-19 21:40:21 +01:00
Oliver Schmidt d5d646528e Added support for self closing tags.
XHTML requires self closing tags to be used for empty tags, so we need to recognize them.
2013-02-19 00:49:01 +01:00
Oliver Schmidt 374c89be01 Added newline on </div>.
The tag <div> (in contrast to the tag <span>) is normally used to denote content placed on a line by its own. So it makes sense to trigger a newline when </div> is processed.
2013-02-19 00:43:16 +01:00
Oliver Schmidt 4938877dd9 Lifted restrictions on accepted MIME type.
The "normal" web is moving forward quickly reducing the interoperability of the Contiki web browser to nearly zero. The Mobile Web fits the capabilities of the Contiki web browser much better. Modern smartphones don't need the Mobile Web anymore but there are large areas in world with rather low end mobile phones and limited mobile bandwidth where the Mobile Web will be necessary for quite some time.

From that perspective it is reasonable to increase the Contiki web browser's interoperability with the Mobie Web - namely WAP 2.0 aka XHTML MP. XHTML MP is delivered as MIME types 'application/vnd.wap.xhtml+xml' or 'application/xhtml+xml'. Therefore we (try to) parse the document if the MIME type contains the substring 'html' (which is true 'text/html' too).
2013-02-19 00:25:36 +01:00
Oliver Schmidt 15fb63ba9a Harmonized ststus texts and and added status on wrong MIME type. 2013-02-18 23:08:05 +01:00
Matthias Kovatsch 82884ab63f Fixed legacy CoAP versions. 2013-02-13 19:22:21 +01:00
Matthias Kovatsch a522357d20 Added Erbium coap-12 and coap-13. 2013-02-13 17:46:35 +01: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 99f541e8fd Updated to the latest 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
nvt 757a54f63c Added some comments about Antelope and Coffee. 2012-11-19 13:21:59 +01:00