Skip to content

Lwip 2.0.1 stable #3721

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,10 @@ err_t k64f_etharp_output_ipv6(struct netif *netif, struct pbuf *q, const ip6_add
* \param[in] action
* \return ERR_OK or error code
*/
err_t igmp_mac_filter(struct netif *netif, const ip4_addr_t *group, u8_t action)
err_t igmp_mac_filter(struct netif *netif, const ip4_addr_t *group, enum netif_mac_filter_action action)
{
switch (action) {
case IGMP_ADD_MAC_FILTER:
case NETIF_ADD_MAC_FILTER:
{
uint32_t group23 = ntohl(group->addr) & 0x007FFFFF;
uint8_t addr[6];
Expand All @@ -312,7 +312,7 @@ err_t igmp_mac_filter(struct netif *netif, const ip4_addr_t *group, u8_t action)
ENET_AddMulticastGroup(ENET, addr);
return ERR_OK;
}
case IGMP_DEL_MAC_FILTER:
case NETIF_DEL_MAC_FILTER:
/* As we don't reference count, silently ignore delete requests */
return ERR_OK;
default:
Expand All @@ -330,10 +330,10 @@ err_t igmp_mac_filter(struct netif *netif, const ip4_addr_t *group, u8_t action)
* \param[in] action
* \return ERR_OK or error code
*/
err_t mld_mac_filter(struct netif *netif, const ip6_addr_t *group, u8_t action)
err_t mld_mac_filter(struct netif *netif, const ip6_addr_t *group, enum netif_mac_filter_action action)
{
switch (action) {
case MLD6_ADD_MAC_FILTER:
case NETIF_ADD_MAC_FILTER:
{
uint32_t group32 = ntohl(group->addr[3]);
uint8_t addr[6];
Expand All @@ -346,7 +346,7 @@ err_t mld_mac_filter(struct netif *netif, const ip6_addr_t *group, u8_t action)
ENET_AddMulticastGroup(ENET, addr);
return ERR_OK;
}
case MLD6_DEL_MAC_FILTER:
case NETIF_DEL_MAC_FILTER:
/* As we don't reference count, silently ignore delete requests */
return ERR_OK;
default:
Expand Down
20 changes: 1 addition & 19 deletions features/FEATURE_LWIP/lwip-interface/lwip-sys/arch/cc.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,6 @@
#include <stdint.h>
#include <stddef.h> /* for size_t */

/* Types based on stdint.h */
typedef uint8_t u8_t;
typedef int8_t s8_t;
typedef uint16_t u16_t;
typedef int16_t s16_t;
typedef uint32_t u32_t;
typedef int32_t s32_t;
typedef uintptr_t mem_ptr_t;

/* Define (sn)printf formatters for these lwIP types */
#define U16_F "hu"
#define S16_F "hd"
#define X16_F "hx"
#define U32_F "lu"
#define S32_F "ld"
#define X32_F "lx"
#define SZT_F "uz"

/* ARM/LPC17xx is little endian only */
#if !defined(BYTE_ORDER) || (BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN)
#ifdef BYTE_ORDER
Expand Down Expand Up @@ -97,7 +79,7 @@ typedef uintptr_t mem_ptr_t;
#define LWIP_CHKSUM_ALGORITHM 0

void* thumb2_memcpy(void* pDest, const void* pSource, size_t length);
u16_t thumb2_checksum(const void* pData, int length);
uint16_t thumb2_checksum(const void* pData, int length);
#else
/* Used with IP headers only */
#define LWIP_CHKSUM_ALGORITHM 1
Expand Down
7 changes: 6 additions & 1 deletion features/FEATURE_LWIP/lwip-interface/lwip/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/doc/doxygen/output
*.o
*.a
/doc/doxygen/output/html
/src/apps/snmp/LwipMibCompiler/CCodeGeneration/bin/
/src/apps/snmp/LwipMibCompiler/CCodeGeneration/obj/
/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/bin/
Expand All @@ -11,3 +13,6 @@
/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/obj/
/src/apps/snmp/LwipMibCompiler/LwipMibCompiler.userprefs
/src/apps/snmp/LwipMibCompiler/*.suo
/test/fuzz/output
/test/fuzz/lwip_fuzz
/test/fuzz/.depend
76 changes: 74 additions & 2 deletions features/FEATURE_LWIP/lwip-interface/lwip/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,77 @@ HISTORY
(git master)

* [Enter new changes just after this line - do not remove this line]

++ New features:

2016-12-31: Simon Goldschmidt
* tcp.h/.c: added function tcp_listen_with_backlog_and_err() to get the error
reason when listening fails (bug #49861)

2016-12-20: Erik Andersen
* Add MQTT client

2016-12-14: Jan Breuer:
* opt.h, ndc.h/.c: add support for RDNSS option (as per RFC 6106)

2016-12-14: David van Moolenbroek
* opt.h, nd6.c: Added LWIP_HOOK_ND6_GET_GW()

2016-12-09: Dirk Ziegelmeier
* ip6_frag.c: Implemented support for LWIP_NETIF_TX_SINGLE_PBUF

2016-12-09: Simon Goldschmidt
* dns.c: added one-shot multicast DNS queries

2016-11-24: Ambroz Bizjak, David van Moolenbroek
* tcp_out.c: Optimize passing contiguous nocopy buffers to tcp_write (bug #46290)

2016-11-16: Dirk Ziegelmeier
* sockets.c: added support for IPv6 mapped IPv4 addresses

++ Bugfixes:

2016-12-16: Thomas Mueller
* api_lib.c: fixed race condition in return value of netconn_gethostbyname()
(and thus also lwip_gethostbyname/_r() and lwip_getaddrinfo())

2016-12-15: David van Moolenbroek
* opt.h, tcp: added LWIP_HOOK_TCP_ISN() to implement less predictable initial
sequence numbers (see contrib/addons/tcp_isn for an example implementation)

2016-12-05: Dirk Ziegelmeier
* fixed compiling with IPv4 disabled (IPv6 only case)

2016-11-28: Simon Goldschmidt
* api_lib.c: fixed bug #49725 (send-timeout: netconn_write() can return
ERR_OK without all bytes being written)

2016-11-28: Ambroz Bizjak
* tcpi_in.c: fixed bug #49717 (window size in received SYN and SYN-ACK
assumed scaled)

2016-11-25: Simon Goldschmidt
* dhcp.c: fixed bug #49676 (Possible endless loop when parsing dhcp options)

2016-11-23: Dirk Ziegelmeier
* udp.c: fixed bug #49662: multicast traffic is now only received on a UDP PCB
(and therefore on a UDP socket/netconn) when the PCB is bound to IP_ADDR_ANY

2016-11-16: Dirk Ziegelmeier
* *: Fixed dual-stack behaviour, IPv6 mapped IPv4 support in socket API

2016-11-14: Joel Cunningham
* tcp_out.c: fixed bug #49533 (start persist timer when unsent seg can't fit
in window)

2016-11-16: Roberto Barbieri Carrera
* autoip.c: fixed bug #49610 (sometimes AutoIP fails to reuse the same address)

2016-11-11: Dirk Ziegelmeier
* sockets.c: fixed bug #49578 (dropping multicast membership does not work
with LWIP_SOCKET_OFFSET)

(STABLE-2.0.0)

++ New features:

Expand Down Expand Up @@ -328,8 +399,9 @@ HISTORY

++ Bugfixes:

2016-11-25: Simon Goldschmidt
* dhcp.c: fixed bug #49676 (Possible endless loop when parsing dhcp options)
2016-08-23: Simon Goldschmidt
* etharp: removed ETHARP_TRUST_IP_MAC since it is insecure and we don't need
it any more after implementing unicast ARP renewal towards arp entry timeout

2016-07-20: Simon Goldschmidt
* memp.h/.c: fixed bug #48442 (memp stats don't work for MEMP_MEM_MALLOC)
Expand Down
1 change: 1 addition & 0 deletions features/FEATURE_LWIP/lwip-interface/lwip/FILES
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
src/ - The source code for the lwIP TCP/IP stack.
doc/ - The documentation for lwIP.
test/ - Some code to test whether the sources do what they should.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oooh, does this bring any tests of the netif layer? or are these just unit tests of lwip's core?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just lwip's internal tests. The directory has been there all the time but was missing from list.


See also the FILES file in each subdirectory.
5 changes: 4 additions & 1 deletion features/FEATURE_LWIP/lwip-interface/lwip/README
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ APPLICATIONS
* HTTP server with SSI and CGI
* SNMPv2c agent with MIB compiler (Simple Network Management Protocol)
* SNTP (Simple network time protocol)
* NetBIOS name service responder
* MDNS (Multicast DNS) responder
* iPerf server implementation


LICENSE
Expand Down Expand Up @@ -77,7 +80,7 @@ Self documentation of the source code is regularly extracted from the current
Git sources and is available from this web page:
http://www.nongnu.org/lwip/

There is now a constantly growin wiki about lwIP at
There is now a constantly growing wiki about lwIP at
http://lwip.wikia.com/wiki/LwIP_Uncyclo

Also, there are mailing lists you can subscribe at
Expand Down
26 changes: 22 additions & 4 deletions features/FEATURE_LWIP/lwip-interface/lwip/UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ with newer versions.

* [Enter new changes just after this line - do not remove this line]

* TODO
(2.0.1)

++ Application changes:

* UDP does NOT receive multicast traffic from ALL netifs on an UDP PCB bound to a specific
netif any more. Users need to bind to IP_ADDR_ANY to receive multicast traffic and compare
ip_current_netif() to the desired netif for every packet.
See bug #49662 for an explanation.

(2.0.0)

Expand All @@ -20,7 +27,7 @@ with newer versions.
* Added IPv6 support (dual-stack or IPv4/IPv6 only)
* Changed ip_addr_t to be a union in dual-stack mode (use ip4_addr_t where referring to IPv4 only).
* Major rewrite of SNMP (added MIB parser that creates code stubs for custom MIBs);
supports SNMP2vc (experimental v3 support)
supports SNMPv2c (experimental v3 support)
* Moved some core applications from contrib repository to src/apps (and include/lwip/apps)

+++ Raw API:
Expand All @@ -34,7 +41,8 @@ with newer versions.
++ Port changes

+++ new files:
* MANY new and moved files!
* MANY new and moved files!
* Added src/Filelists.mk for use in Makefile projects
* Continued moving stack-internal parts from abc.h to abc_priv.h in sub-folder "priv"
to let abc.h only contain the actual application programmer's API

Expand All @@ -45,6 +53,13 @@ with newer versions.
* Added LWIP_NETCONN_SEM_PER_THREAD to use one "op_completed" semaphore per thread
instead of using one per netconn (these semaphores are used even with core locking
enabled as some longer lasting functions like big writes still need to delay)
* Added generalized abstraction for itoa(), strnicmp(), stricmp() and strnstr()
in def.h (to be overridden in cc.h) instead of config
options for netbiosns, httpd, dns, etc. ...
* New abstraction for hton* and ntoh* functions in def.h.
To override them, use the following in cc.h:
#define lwip_htons(x) <your_htons>
#define lwip_htonl(x) <your_htonl>

+++ new options:
* TODO
Expand All @@ -56,6 +71,8 @@ with newer versions.
* added hook LWIP_HOOK_MEMP_AVAILABLE() to get informed when a memp pool was empty and an item
is now available

* Signature of LWIP_HOOK_VLAN_SET macro was changed

* LWIP_DECLARE_MEMORY_ALIGNED() may be used to declare aligned memory buffers (mem/memp)
or to move buffers to dedicated memory using compiler attributes

Expand All @@ -68,6 +85,7 @@ with newer versions.

* Added IPv6 support (dual-stack or IPv4/IPv6 only)
* Major rewrite of PPP (incl. keep-up with apache pppd)
see doc/ppp.txt for an upgrading how-to
* Major rewrite of SNMP (incl. MIB parser)
* Fixed timing issues that might have lead to losing a DHCP lease
* Made rx processing path more robust against crafted errors
Expand All @@ -77,7 +95,7 @@ with newer versions.
* support PBUF_REF for RX packets
* LWIP_NETCONN_FULLDUPLEX allows netconn/sockets to be used for reading/writing from separate
threads each (needs LWIP_NETCONN_SEM_PER_THREAD)
* Moved and reorderd stats (mainly memp/mib2)
* Moved and reordered stats (mainly memp/mib2)

(1.4.0)

Expand Down
5 changes: 4 additions & 1 deletion features/FEATURE_LWIP/lwip-interface/lwip/doc/FILES
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
doxygen/ - Configuration files and scripts to create the lwIP doxygen source
documentation (found at http://www.nongnu.org/lwip/)

savannah.txt - How to obtain the current development source code.
contrib.txt - How to contribute to lwIP as a developer.
rawapi.txt - The documentation for the core API of lwIP.
Also provides an overview about the other APIs and multithreading.
snmp_agent.txt - The documentation for the lwIP SNMP agent.
sys_arch.txt - The documentation for a system abstraction layer of lwIP.
ppp.txt - Documentation of the PPP interface for lwIP.
Loading