History log of /seL4-camkes-master/projects/lwip/src/netif/lowpan6.c
Revision Date Author Comments
# 130f9470 27-Sep-2018 Martine Lenders <m.lenders@fu-berlin.de>

lowpan6.c: Fix IEEE 802.15.4 address setting

Reverts a regression introduced in
3a8af612b3b818a89de5846cc9b046756af184cc:

Use hardware address fetched from neighbor cache *not* the hardware
address of the interface as destination address.

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>


# 7b8a784c 11-Jul-2018 Simon Goldschmidt <goldsimon@gmx.de>

fix 2 small bugs found by coverity


# a4b9beef 14-Mar-2018 goldsimon <goldsimon@gmx.de>

Move common 6LoWPAN code to new file lopwan6_common.c

This is mainly IPHC (de)compression.

TODO: adapt the 6LoWPAN-over-BLE netif to this.

Signed-off-by: goldsimon <goldsimon@gmx.de>


# d79416ee 13-Mar-2018 goldsimon <goldsimon@gmx.de>

lowpan6: move a function to delete one prototype


# 08bcfa2b 13-Mar-2018 goldsimon <goldsimon@gmx.de>

netif: initialize netif->output with a dummy function for IPv6 only netifs


# 10ae311a 12-Mar-2018 Axel Lin <axel.lin@ingics.com>

lowpan6: Rework to speed up dequeue datagram process

Current implementation iterates the lowpan6_data.reass_list every time
dequeue_datagram() is called.
We can get previous lrh in all the context calling dequeue_datagram().
By adding a prev arguemnt to dequeue_datagram(), we can speed up the
dequeue datagram process.

All the callers never check return value of dequeue_datagram() as it
always return ERR_OR, thus make it return void instead.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Simon Goldschmidt <goldsimon@gmx.de>


# 16afe566 09-Mar-2018 goldsimon <goldsimon@gmx.de>

lowpan6: fix doc warning in clang


# 8d857235 09-Mar-2018 goldsimon <goldsimon@gmx.de>

lowpan6: fix bug #47291 (wrong datagram size for fragmentation)

Fragment datagram_size and datagram_offset should be calculated from the uncompressed datagram.
We did this on the compressed size and thus were not compatible to other implementations.
Now my test setup communicates with contiki sicslowpan.

Signed-off-by: goldsimon <goldsimon@gmx.de>


# b86f9b97 08-Mar-2018 goldsimon <goldsimon@gmx.de>

lowpan6: refactor decompression to not allocate a pbuf


# 91038e49 03-Mar-2018 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Improve 6LoWPAN documentation


# 282e1601 01-Mar-2018 goldsimon <goldsimon@gmx.de>

finally got zepif running


# ab0e4570 01-Mar-2018 goldsimon <goldsimon@gmx.de>

lowpan6: change the name of 2 members to indicate usage for tx


# a137e16f 28-Feb-2018 goldsimon <goldsimon@gmx.de>

lowpan6.c: fix referenced RFCs


# fcccc47b 28-Feb-2018 goldsimon <goldsimon@gmx.de>

lowpan6.c: fix clang doc warnings


# 3a8af612 28-Feb-2018 goldsimon <goldsimon@gmx.de>

lowpan6.c: handle 6-byte MAC addresses on netif, too


# 2a5b66c9 28-Feb-2018 goldsimon <goldsimon@gmx.de>

lowpan6.c: tiny whitespace fix


# 3a93029e 28-Feb-2018 goldsimon <goldsimon@gmx.de>

lowpan6.c: implement software CRC (e.g. required for use with ZEP)


# fe68fa49 28-Feb-2018 goldsimon <goldsimon@gmx.de>

lowpan6.c: refactor parsing and writing the ieee 802.15.4 header to separate function


# 5e91cd47 28-Feb-2018 goldsimon <goldsimon@gmx.de>

lowpan6.c: ensure netif->hwaddr_len == 8 (to not create invalid frames)


# 569464ff 28-Feb-2018 goldsimon <goldsimon@gmx.de>

lowpan6.c: move static variables declared inside lowpan6_frag into lowpan6_data


# 2e2c6077 27-Feb-2018 Axel Lin <axel.lin@ingics.com>

lowpan6.c: Fix ‘lowpan6_context_lookup’ defined but not used build warning

Fix build warning with LWIP_6LOWPAN_NUM_CONTEXTS==0.
lowpan6_context_lookup() is only used when LWIP_6LOWPAN_IPHC &&
LWIP_6LOWPAN_NUM_CONTEXTS > 0.

Signed-off-by: Axel Lin <axel.lin@ingics.com>


# 49acdae8 27-Feb-2018 goldsimon <goldsimon@gmx.de>

lowpan6.c: fix building with LWIP_6LOWPAN_NUM_CONTEXTS==0


# 7db978ca 26-Feb-2018 goldsimon <goldsimon@gmx.de>

lowpan6.c: rework lowpan6_input processing of the ieee 802.15.4 header

This should fix bug #48825 (lowpan6: source PAN ID is skipped without
checking PAN ID compression flag)


# 731b83ac 26-Feb-2018 goldsimon <goldsimon@gmx.de>

lowpan6.c: a netif input function must return ERR_OK only if the input pbuf was freed


# fb5bbca1 26-Feb-2018 goldsimon <goldsimon@gmx.de>

lowpan6.c: move IEEE 802.15.4 definitions to their own header file

This is mainly a preparation to merge the two 6LoWPAN netifs


# a022590f 26-Feb-2018 goldsimon <goldsimon@gmx.de>

lowpan6.c: move netif-specific data to a common struct


# 47c55c3d 18-Feb-2018 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Improve documentation for 6LOWPAN and SLIPIF


# 5b9f7968 08-Dec-2017 Axel Lin <axel.lin@ingics.com>

lowpan6: Fix build warning when LWIP_6LOWPAN_IPHC=0

Fix below build warning if LWIP_6LOWPAN_IPHC=0.

../../../../lwip/src/netif/lowpan6.c:186:1: error: ‘lowpan6_get_address_mode_mc’ defined but not used [-Werror=unused-function]
lowpan6_get_address_mode_mc(const ip6_addr_t *ip6addr)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../lwip/src/netif/lowpan6.c:160:1: error: ‘lowpan6_get_address_mode’ defined but not used [-Werror=unused-function]
lowpan6_get_address_mode(const ip6_addr_t *ip6addr, const struct ieee_802154_addr *mac_addr)
^~~~~~~~~~~~~~~~~~~~~~~~

Also correct comment typo: s/LWIP_6LOWPAN_HC/LWIP_6LOWPAN_IPHC/g

Signed-off-by: Axel Lin <axel.lin@ingics.com>


# de5b693e 03-Oct-2017 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Reformat netif subdir using astylerc


# a1c7924c 04-Aug-2017 goldsimon <goldsimon@gmx.de>

task #14597: cleanup pbuf_header usages (use pbuf_add_header/pbuf_remove_header instead)


# 749e078d 05-May-2017 goldsimon <goldsimon@gmx.de>

6lowpan: fix compiling with !LWIP_UDP


# b71878f0 21-Apr-2017 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Fix bug #50739: 6lowpan - IPHC de-compression bug
Apply fix provided by Aigner B.


# d9b279d1 15-Mar-2017 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Cleanup documentation a bit: rename "Addons" to "NETIFs" - its a more appropriate name


# 29ddfd1d 23-Jan-2017 David van Moolenbroek <david@minix3.org>

Add support for IPv6 address scopes

This patch adds full support for IPv6 address scopes, thereby aiming
to be compliant with IPv6 standards in general and RFC 4007 in
particular. The high-level summary is that link-local addresses are
now meaningful only in the context of their own link, guaranteeing
full isolation between links (and their addresses) in this respect.
This isolation even allows multiple interfaces to have the same
link-local addresses locally assigned.

The implementation achieves this by extending the lwIP IPv6 address
structure with a zone field that, for addresses that have a scope,
carries the scope's zone in which that address has meaning. The zone
maps to one or more interfaces. By default, lwIP uses a policy that
provides a 1:1 mapping between links and interfaces, and considers
all other addresses unscoped, corresponding to the default policy
sketched in RFC 4007 Sec. 6. The implementation allows for replacing
the default policy with a custom policy if desired, though.

The lwIP core implementation has been changed to provide somewhat of
a balance between correctness and efficiency on on side, and backward
compatibility on the other. In particular, while the application would
ideally always provide a zone for a scoped address, putting this in as
a requirement would likely break many applications. Instead, the API
accepts both "properly zoned" IPv6 addresses and addresses that, while
scoped, "lack" a zone. lwIP will try to add a zone as soon as possible
for efficiency reasons, in particular from TCP/UDP/RAW PCB bind and
connect calls, but this may fail, and sendto calls may bypass that
anyway. Ultimately, a zone is always added when an IP packet is sent
when needed, because the link-layer lwIP code (and ND6 in particualar)
requires that all addresses be properly zoned for correctness: for
example, to provide isolation between links in the ND6 destination
cache. All this applies to packet output only, because on packet
input, all scoped addresses will be given a zone automatically.

It is also worth remarking that on output, no attempt is made to stop
outgoing packets with addresses for a zone not matching the outgoing
interface. However, unless the application explicitly provides
addresses that will result in such zone violations, the core API
implementation (and the IPv6 routing algorithm in particular) itself
will never take decisions that result in zone violations itself.

This patch adds a new header file, ip6_zone.h, which contains comments
that explain several implementation aspects in a bit more detail.

For now, it is possible to disable scope support by changing the new
LWIP_IPV6_SCOPES configuration option. For users of the core API, it
is important to note that scoped addresses that are locally assigned
to a netif must always have a zone set; the standard netif address
assignment functions always do this on behalf of the caller, though.
Also, core API users will want to enable LWIP_IPV6_SCOPES_DEBUG at
least initially when upgrading, to ensure that all addresses are
properly initialized.


# 4c16ea92 14-Dec-2016 sg <goldsimon@gmx.de>

Minor: nd6_packet_send_check() -> nd6_get_next_hop_addr_or_queue() (too long, but a little more self-explaining); cosmetics...


# 69a7039f 14-Dec-2016 David van Moolenbroek <david@minix3.org>

nd6: centralize link-local packet send decision

Previously, ethip6 and lowpan6 each had their own copy of code that
used internal nd6 data structures to decide whether to send a packet
on the local link right away, or queue it while nd6 performed local
address resolution. This patch moves that code into nd6, thereby
eliminating all remaining cases of external access to internal nd6
data structures, as well as the need to expose two specific nd6
functions.

As a side effect, the patch effectively fixes two bugs in the lowpan6
code that were already fixed in the ethip6 code.


# f6e27940 08-Oct-2016 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Make lwIP compile with clang -Wdocumentation -> several documentation fixes


# 13fb616b 05-Oct-2016 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Cleanup hton*/ntoh* function handling and platform abstraction
Let lwip use functions/macros prefixed by lwip_ internally to avoid naming clashes with external #includes.
Remove over-complicated #define handling in def.h
Make functions easier to override in cc.h. The following is sufficient now (no more LWIP_PLATFORM_BYTESWAP):
#define lwip_htons(x) <your_htons>
#define lwip_htonl(x) <your_htonl>


# 92f385aa 01-Aug-2016 goldsimon <goldsimon@gmx.de>

fixed compiling lowpan6 for NO_SYS==1


# 7b770dd9 26-Jul-2016 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Document 6LoWPAN and SLIP netif


# 8dc77ef5 22-Jun-2016 Dirk Ziegelmeier <dirk@ziegelmeier.net>

doxygen updates - include IPv6 in documentation. Exclude include/netif/ppp/polarssl.
Convert TODO -> @todo


# cc4f94f4 02-Mar-2016 Dirk Ziegelmeier <dirk@ziegelmeier.net>

lowpan6: Fix incorrect array bounds check (found by Coverity)


# fd4a109f 23-Feb-2016 Dirk Ziegelmeier <dirk@ziegelmeier.net>

lowpan6.c: Implement SNMP counters


# a5ac41c2 23-Feb-2016 goldsimon <goldsimon@gmx.de>

lowpan6: fixed compiler warning when casting u16_t to u8_t


# e4457335 23-Feb-2016 goldsimon <goldsimon@gmx.de>

minor: tried to fix coding style in lowpan6.c


# 799fe7a5 23-Feb-2016 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Fix shadowing warning in lowpan6.c - found by Erik Ekman's Travis CI
https://travis-ci.org/yarrick/lwip-merged


# e2a35659 22-Feb-2016 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Initial import of Ivan Delamer's 6LoWPAN implementation with slight modifications to allow compiling in IPv6 only mode