Commit graph

100 commits

Author SHA1 Message Date
Bernhard Hackl ae91d6b4b1 Fix potentially unterminated strings 2017-04-14 08:33:40 -07:00
Antonio Lignan f5f13c968c Merge pull request #2061 from cetic/pr-nat64-small-updates
Various updates for NAT64
2017-02-21 21:52:18 +01:00
Oliver Schmidt 6463c91a4f Removed artifacts of former uip_appdata handling.
Adam Dunkels writes on 2/5/2017 on the Contiki mailing list:
[...] the original idea was that the application could just point the uip_appdata pointer to wherever the data was, but we then changed it so that the data actually had to be copied into the uip_aligned_buf buffer. So, yes, the network device driver should only need to read from this buffer. [...]

This change removes comments on the possibility of uip_appdata pointing somewhere outside the uip_aligned_buf. And it removes code in the SLIP drivers not necessary anymore.

Additionally it makes code in a SLIP driver optional that takes care of the Microsoft-specific CLIENT / SERVER / CLIENTSERVER chat.
2017-02-05 23:20:39 +01:00
Laurent Deru 12c930893c Fix semantic of UIP_ND6_SEND_NA and add UIP_ND6_SEND_NS 2017-01-16 15:48:14 +01:00
Laurent Deru e5a604552e Allow modification of IP64 prefix 2017-01-16 14:38:35 +01:00
Adam Dunkels ae4801bba6 Bugfix: make sure the TCP connection is polled immediately after tcp_socket_send() is called so that the TCP segment goes out directly 2016-11-02 15:16:00 +01:00
Adam Dunkels f11d344d4d Add a tcp_socket_queuelen() function that returns the length of the current TCP output queue 2016-11-02 15:16:00 +01:00
Adam Dunkels 6ab9822fc2 Make debug printouts be PRINTF() statements to avoid including them in non-debug builds 2016-11-02 15:16:00 +01:00
Simon Duquennoy 21387b954f Merge pull request #1493 from simonduq/pr/add-missing-ext-hdr
Insert RPL ext header before sending ICMP, UDP and TCP messages
2016-07-25 14:56:25 +02:00
Kitty(chun hua) Jiang b5bc140680 Update comments: RFC3513 is obsoleted by RFC4921 2016-07-18 17:29:16 +08:00
Simon Duquennoy d73b229624 Fix and cleanup RPL ext header handling 2016-06-29 17:26:01 +02:00
Simon Duquennoy e584a54608 Insert RPL ext header in tcpip_ipv6_output for consistency 2016-06-29 17:25:10 +02:00
Yasuyuki Tanaka ca3a4726d1 Rename two macros related to multicast, which are not user configuration
- UIP_CONF_IPV6_MULTICAST -> UIP_IPV6_MULTICAST
- RPL_CONF_MULTICAST      -> RPL_WITH_MULTICAST
2016-06-20 16:35:09 +02:00
cedric-d 67e0575bd3 Prevent uIP buffer over-read with big UDP packets
When an UDP packet too big to fit in the uIP packet buffer is to be sent, the part fitting in the uIP buffer is copied to it (so no buffer overflow occurs) but uIP actually sends a packet of the original size therefore a buffer over-read occurs.

This modification makes uIP discard the UDP packets that do not fit in the uIP packet buffer.
2016-06-15 10:51:20 +02:00
Antonio Lignan fa88122140 Merge pull request #1589 from ibriano/master
Allow creating connections on unspecified local port
2016-06-14 21:30:34 +02:00
Simon Duquennoy b3e31e1456 Implement RPL non-storing mode 2016-06-08 14:02:45 +02:00
Simon Duquennoy 223a69cef5 Merge pull request #1535 from bkozak-scanimetrics/fix_strcasecmp_warning
Fix warning about missing strcasecmp definition
2016-06-04 15:05:06 +02:00
Antonio Lignan 34af72c047 Merge pull request #1609 from simonduq/pr/net-debug
Added net-debug.[ch] to provide debug functions even in the non-IP case
2016-06-01 23:52:34 +02:00
Simon Duquennoy abf08a7167 Added net-debug.[ch] to provide debug functions even in the non-IP case 2016-04-26 16:08:10 +02:00
Simon Duquennoy 0296e6aba0 Indent tcpip.c 2016-04-25 11:50:14 +02:00
Antonio Lignan c9baf0cb57 Merge pull request #1192 from bkozak-scanimetrics/tcpip_put_temporaries_on_stack
changed tcpip static temporaries to stack vars
2016-04-13 09:30:33 +02:00
Iván Briano 8211db64ae Allow creating connections on unspecified local port
If the given local port is 0, we get no replies.
2016-04-07 10:39:48 -03:00
Joakim Eriksson 4246a8fbe6 updated more nbr_add calls 2016-03-26 09:45:37 +01:00
Simon Duquennoy bbefd4ab4e Merge pull request #1334 from tadodotcom/1333-resolv-fat-camp
trims resolv.c by removing unrequired static declarations
2016-03-14 16:41:33 +01:00
Billy Kozak ff6d336e8b Fix warning about missing strcasecmp definition
On platforms which do not define the macro __SDCC the strcasecmp
function may not have a definition (true at least on CC26xx). The
prototype for this function is now defined if __SDCC is false.
2016-02-26 13:05:21 -07:00
Simon Duquennoy ebc8d9fb1c Merge pull request #1344 from tsparber/fix-doxygen
doxygen: Fixed all warnings
2015-11-30 22:07:15 +01:00
Tommy Sparber 938a425949 Cleanup trailing spaces and convert tabs to spaces
This commit removes trailing spaces and converts
tabs to spaces in all files affected by fix-doxygen PR.
2015-11-18 11:09:43 +11:00
Tommy Sparber 938d17576b doxygen: Fix many warnings
This commit fixes nearly all of the reported doxygen warnings.

I tried to not clutter the log with removed trailing spaces.
Removed whitespace and converted tab/spaces for all files affected by this commit
are in a separate branch.
2015-11-18 11:07:58 +11:00
Valentin Sawadski fbc5b5300d trims resolv.c by removing unrequired static declarations
Closes https://github.com/contiki-os/contiki/issues/1333
2015-10-28 14:58:52 +01:00
Adam Dunkels 5e08b15b0a Merge pull request #1313 from tadodotcom/tmp-remove-uip-is-addr-link-local
Removes duplicate of uip_is_addr_linklocal
2015-10-21 08:16:27 +02:00
Simon Duquennoy 2daa3d7377 Merge pull request #1269 from tadodotcom/tmp-uip-fallback-iface
More flexibility for the fallback interface
2015-10-20 11:33:14 +02:00
Valentin Sawadski b0c7dabf4c Removes duplicate of uip_is_addr_linklocal
A simple search and replace of `uip_is_addr_link_local` to ensure the more
commonly used `uip_is_addr_linklocal` is used consistently.
2015-10-20 11:18:46 +02:00
Valentin Sawadski 44b3cd4e09 Fixes a possible unsafe memcpy in uip_udp_packet_send
If the buffers overlap, memcpy must not be used as it might have arbitrary
results. memmove() on the other hand is safe to use.
2015-10-09 08:30:49 +02:00
Simon Duquennoy 1a6681a09d Merge pull request #987 from ioannisg/send-ns-in-tcpip_ipv6_output
Send the first NS attempt inside tcpip_ipv6_output()
2015-09-28 13:29:04 +02:00
Nicolas Tsiftes 222a75426a Merge pull request #1256 from tadodotcom/tmp-refactor-tcpip-packet-input
Refactor tcpip.c packet input
2015-09-25 16:18:42 +02:00
Valentin Sawadski 5b818d5a39 Fixed formatting of documentation 2015-09-23 09:25:31 +02:00
lebrush b3f6019924 More flexibility for the fallback interface.
When there's a failure to send a packet in the fallback interface the
destination is unreachable and therefore the source should be notified.
2015-09-22 12:53:04 +02:00
Valentin Sawadski cad1c37fb3 Better prints of ::FFFF: prefixed IPv4-mapped addresses
IPv4-mapped Address [1] are now printed accoriding to the text representation
mixed IPv4 and IPv6 networks as specified in [2]

[1] https://tools.ietf.org/html/rfc6890#page-14
[2] https://tools.ietf.org/html/rfc3513#page-5
2015-09-18 14:57:01 +02:00
Valentin Sawadski 43770a934d Refactor tcpip.c packet input
The UIP_CONF_FORWARD is now handled in a better way that the general structure
of packet_input can be clearer seen.
2015-09-15 09:31:43 +02:00
Simon Duquennoy 63ddba93a9 Merge pull request #1169 from feshie/pr-warnings-fix
Fix multiple warnings (TCPIP, coap-observe, msp430, z1/tmp102, ContikiMAC)
2015-09-08 09:05:44 +02:00
Arthur Fabre e8cbf2e5fb Fix warning in TCPIP
When disabling TCP support, the following warning is triggered:
../..//core/net/ip/tcpip.c:159:1: warning: ‘start_periodic_tcp_timer’
defined but not used [-Wunused-function]
An added ifdef guard now only defines this function when TCP support is
enabled.
2015-09-07 17:52:22 +01:00
Adam Dunkels bfb29d2f11 Merge pull request #1116 from cetic/pr-uip-clear-buffer
Add uip_clear_buf() macro and replace all instances of uip_len = 0
2015-08-27 10:27:08 +02:00
Oliver Schmidt 12fd559244 Fixed DHCP client.
RFC2131 states on page 36 regarding DHCPREQUEST: " 'xid' from server DHCPOFFER message "

As the DHCPOFFER message uses the 'xid' from the DHCPDISCOVER message this means that the DHCP client is supposed to re-use the 'xid' from its DHCPDISCOVER for the DHCPREQUEST.
2015-08-25 16:24:37 +02:00
Billy Kozak 9cd439d8c0 changed tcpip static temporaries to stack vars
A number of local variables in tcpip.c were declared with static
storage for no good reason (they do not ever preserve state between
function calls).

This patch removes static declaration from these variables.
2015-08-12 09:51:26 -06:00
Antonio Lignan 8cc0a12a9f Merge pull request #1097 from bthebaudeau/cc2538-examples-fix-warnings
cc2538: examples: Fix build warnings
2015-06-24 11:39:24 +02:00
Laurent Deru c73cd66a92 Change all printf into PRINTA in uip-debug.c; remove compilation warning and move addr check after local variables definition in uip_debug_ipaddr_print 2015-06-18 15:14:46 +02:00
Laurent Deru 60784b40bd Check pointer in uip_debug_lladdr_print 2015-06-18 10:56:45 +02:00
Laurent Deru 1784338b2e Add uip_clear_buf() macro and replace all instances of uip_len = 0; with it 2015-06-15 11:10:51 +02:00
Oliver Schmidt 35becbbcb5 Merge remote-tracking branch 'upstream/master'
Conflicts:
	core/net/ip/uip-nameserver.c
2015-06-14 16:33:23 +02:00
Oliver Schmidt a0d9f028d6 Made first uip_nameserver_update() parameter const.
Both apps/dhcp/dhcp.c:dhcpc_configured() and cpu/6502/ipconfig/ipconfig.c:dhcpc_configured() presume the first parameter of uip_nameserver_update() to be const. As there's no reason for it to be not const just make it const.
2015-06-14 16:27:39 +02:00