2016-09-28 05:48:10 +00:00
|
|
|
PPP interface for lwIP
|
|
|
|
|
|
|
|
Author: Sylvain Rochet
|
|
|
|
|
|
|
|
Table of Contents:
|
|
|
|
|
|
|
|
1 - Supported PPP protocols and features
|
|
|
|
2 - Raw API PPP example for all protocols
|
|
|
|
3 - PPPoS input path (raw API, IRQ safe API, TCPIP API)
|
|
|
|
4 - Thread safe PPP API (PPPAPI)
|
|
|
|
5 - Notify phase callback (PPP_NOTIFY_PHASE)
|
|
|
|
6 - Upgrading from lwIP <= 1.4.x to lwIP >= 2.0.x
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 Supported PPP protocols and features
|
|
|
|
======================================
|
|
|
|
|
|
|
|
Supported Low level protocols:
|
|
|
|
* PPP over serial using HDLC-like framing, such as wired dialup modems
|
|
|
|
or mobile telecommunications GPRS/EDGE/UMTS/HSPA+/LTE modems
|
|
|
|
* PPP over Ethernet, such as xDSL modems
|
|
|
|
* PPP over L2TP (Layer 2 Tunneling Protocol) LAC (L2TP Access Concentrator),
|
|
|
|
IP tunnel over UDP, such as VPN access
|
|
|
|
|
|
|
|
Supported auth protocols:
|
|
|
|
* PAP, Password Authentication Protocol
|
|
|
|
* CHAP, Challenge-Handshake Authentication Protocol, also known as CHAP-MD5
|
|
|
|
* MSCHAPv1, Microsoft version of CHAP, version 1
|
|
|
|
* MSCHAPv2, Microsoft version of CHAP, version 2
|
|
|
|
* EAP, Extensible Authentication Protocol
|
|
|
|
|
|
|
|
Supported address protocols:
|
|
|
|
* IPCP, IP Control Protocol, IPv4 addresses negotiation
|
|
|
|
* IP6CP, IPv6 Control Protocol, IPv6 link-local addresses negotiation
|
|
|
|
|
|
|
|
Supported encryption protocols:
|
|
|
|
* MPPE, Microsoft Point-to-Point Encryption
|
|
|
|
|
|
|
|
Supported compression or miscellaneous protocols, for serial links only:
|
|
|
|
* PFC, Protocol Field Compression
|
|
|
|
* ACFC, Address-and-Control-Field-Compression
|
|
|
|
* ACCM, Asynchronous-Control-Character-Map
|
|
|
|
* VJ, Van Jacobson TCP/IP Header Compression
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 Raw API PPP example for all protocols
|
|
|
|
=======================================
|
|
|
|
|
|
|
|
As usual, raw API for lwIP means the lightweight API which *MUST* only be used
|
|
|
|
for NO_SYS=1 systems or called inside lwIP core thread for NO_SYS=0 systems.
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Globals
|
|
|
|
* =======
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* The PPP control block */
|
|
|
|
ppp_pcb *ppp;
|
|
|
|
|
|
|
|
/* The PPP IP interface */
|
|
|
|
struct netif ppp_netif;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* PPP status callback
|
|
|
|
* ===================
|
|
|
|
*
|
|
|
|
* PPP status callback is called on PPP status change (up, down, …) from lwIP
|
|
|
|
* core thread
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* PPP status callback example */
|
|
|
|
static void status_cb(ppp_pcb *pcb, int err_code, void *ctx) {
|
|
|
|
struct netif *pppif = ppp_netif(pcb);
|
|
|
|
LWIP_UNUSED_ARG(ctx);
|
|
|
|
|
|
|
|
switch(err_code) {
|
|
|
|
case PPPERR_NONE: {
|
|
|
|
#if LWIP_DNS
|
Squashed 'features/FEATURE_LWIP/lwip-interface/lwip/' changes from d7a6c6d..10f93f4
10f93f4 Renamed ethernet.h to lwip_ethernet.h
9cf30bb Renamed lwip source files
207d1a7 Merged branch 'mbed-os-lwip-stable-2_0_1' into prefixed branch.
e5071da Add MQTT to CHANGELOG (too late for 2.0.1 release...)
980b219 Put 2.0.1 version tag in UPGRADING document
76b4365 Remove duplicate netif_dhcp_data() macro
a5a4830 Set lwIP version to 2.0.1 RELEASE
1a2a9a4 Merge branch 'master' into STABLE-2_0_0
3a20ae3 Add missing #include in netdb.c for atoi()
0ffacca Add missing #include in httpd.c for atoi()
e94c9ff Fix warning about bad cast in pbuf_skip()
72316bd Move macros to access DHCP and AUTOIP data to headers, users may want to access the members
803a711 Fix warning that local variable may be used uninitialized in mem.c
8760fb6 fixed warnings in mdns unit tests
d2631e6 mqtt: Fix pedantic enum warning
4059748 I was not satisfied with the previous debugging options structure. Improve it again.
644a21b Improve debugging options documentation
a387631 Add debugging options to documentation
e3c2b8a Add note about high resource-consumption in LWIP_PLATFORM_DIAG and LWIP_PLATFORM_ASSERT default implementations
e12bb2a Fix comma at end of enum list in mqtt.h
2096f1a Fix C++ style comment in mqtt.c
1f3c18f tcp: Make tcp_listen_with_backlog_and_err return NULL if the address/port is already used
edfeab7 mqtt: Trivial coding style fix
b8bc7b7 arch.h: Add #includes necessary for default implentation of LWIP_PLATFORM_DIAG and LWIP_PLATFORM_ASSERT
f874d15 Add #include <string.h> in snmp_netconn.c because memset() is used
ee034bd Document PACK_STRUCT_USE_INCLUDES #define
a2a16d4 nd6 rdnss: fixed dual-stack compilation
98fc82f added function tcp_listen_with_backlog_and_err() to get the error reason when listening fails (bug #49861)
1884c7e Fix TCP unit tests after changes from "Add hook for TCP Initial Sequence Number generation" commit (pcb->lastack and friends are not initialized during allocation any more, but by connect() / bind() call)
1466b7a Several mqtt documentation fixes found by clang
748e2e9 Create documentation section "porting" and move it under lwIP section (instead of infrastructure)
1fd69dd Minor documentation update in def.c
3a8368e Provide struct packing macros on GCC/clang out of the box
c1258e5 Compile fix in lwip/arch.h "extra tokens at end of #ifndef directive"
211a71c Minor documentation update in lwip/arch.h
55199fc More documentation updates in lwip/arch.h
45ad6f2 Minor documentation updates in lwip/arch.h
df365ad Trivial typo fix in arch.h docs
7b40d1e doc: mqtt_client: Update example code after adding port parameter to mqtt_client_connect()
c1d16c6 Forgot documentation on MQTT port #define
83b1c39 Add #define with default MQTT port for convenience
bfa0358 mqtt: Allow setting server port to connect
2e4b368 Revert "Fix bug #49914: lwip_sendmsg uses PBUF_REF pbufs"
4e34851 Fix bug #49914: lwip_sendmsg uses PBUF_REF pbufs Use PBUF_RAM and create private copy of the data
3a557ba Move a few MQTT options from mqtt.c to mqtt_opts.h
6e219b6 Change signature of mqtt_client_connect() to take an IP addr instead of a string
ec1450b Add mqtt documentation from Erik Anderson, rev 4b84fff
5be91de mqtt: Trivial error message fix
24fa1c4 opt.h: provide some hints regarding MLD settings
71810d0 ipv6: adjust MLD membership on address state changes
d5bc856 mqtt: Check conn_state before create request for sub_unsub
8767205 Update .gitignore once more for fuzz test
dd96c71 Fix a few -Wconversion warnings (there are many more to do)
be57134 Fixed bug #49895: Incorrect configuration detection in lwip/dns.h
16b895b Undo removal of mqtt_publish() from documentation in Simon's last commit (guess it was by accident)
dcb7616 Minor documentation fix in MQTT
02f4610 mqtt: Use LWIP_ARRAYSIZE to replace hardcoded value
b6a131e mqtt: fix C usage (declaration after statement), fix casting to smaller type
12bc2c0 MQTT cleanups: - create mqtt_opts.h file and move options in there - documentation cleanups
14e3686 Some cleanups in MQTT client Integrate in documentation Compile fixes, mostly: Variables must be declared before any statement in a function
1e82465 task #14281: Add MQTT client Thanks to Erik Andersen Taken from https://github.com/erian747/, branch mqtt, rev 5d59470
fb07d47 more LWIP_NOASSERT fixes
c717332 Fix compiling with LWIP_NOASSERT (and debug/error disabled, too)
e0c0ba7 Fix compile with LWIP_NOASSERT Pointed out by Nirav Desai
7f319f5 Fix compile of test_tcp.c unit test after introduction of tcp_next_iss hook
c21763f Minor code cleanup api_lib.c
f488c5b igmp: Fix optimized code for igmp_remove_group
5c1dd6a Optimization in igmp_remove_group() pointed out by Axel Lin No need to handle special case "first in list" since this is always the allsystems group that shall not be removed
102a50f Fix bug #39145: IGMP membership report for 224.0.0.1 Ensure allsystems group is always first in linked list
bb8088d Minor cleanup of FUZZ test Makefile
11780f0 Fixup Makefile of FUZZ test after moving to main lwIP rep
cceea73 bug #49631: handle zero-window probe and refused_data
fcd2daf fixed race condition in return value of netconn_gethostbyname() (and thus also lwip_gethostbyname/_r() and lwip_getaddrinfo())
b5f51db ND6: Don't misuse ip6_current_dest_addr() to create an aligned copy of an IPv6 address We never know what side effect in application code this could trigger...
d9f461e Fixed #49848 (Non-blocking socket emit a sock error while read return EWOULDBLOCK) especially for EWOULDBLOCK (added task #14275 for the general problem)
c13a43e added note about afl-fuzz requiring linux
844c201 added fuzz tests (moved from contrib/ports/unix/fuzz to get them to a more prominent place, even if afl-fuzz still needs *nix to run)
62e3400 LWIP_HOOK_TCP_ISN: added CHANGELOG/fixed comment
a8b986b Add hook for TCP Initial Sequence Number generation
da15132 Make nd6_new_router() handle already existing routers (this is a special case for 2 netifs on the same subnet - e.g. wifi and cable) see bug #46506
e3925cc nd6: Fix build error if LWIP_ND6_RDNSS_MAX_DNS_SERVERS == 0
6b1950e nd6: add support for RDNSS option (as per RFC 6106)
4e3cf61 opt.h: added LWIP_DHCP_MAX_DNS_SERVERS to configure the maximum number of DNS servers configured from dhcp.c(v4) (if any; guarded with LWIP_DNS)
53b9f2a dhcp: covert DHCP_OPTION_IDX_* from defines to enum (mainly to ease offset calculation)
cd5dfa2 nd6: minor 'static' consistency fix
bd1defc added forgoten new file nd6_priv.h :-(
281ef5d minor: fixed errors in some defined __DOXYGEN__ guards
e8461f9 minor: corrected include guard name in tcp_priv.h
60cd25c Moved nd6 implementation details to new file nd6_priv.h (possible after David's cleanups)
4c16ea9 Minor: nd6_packet_send_check() -> nd6_get_next_hop_addr_or_queue() (too long, but a little more self-explaining); cosmetics...
69a7039 nd6: centralize link-local packet send decision
06ff89c nd6: use default_router_list internally only
cee59ba nd6: add nd6_clear_destination_cache() function
d4fad59 nd6_input(): allow using NA without lladdr_opt for DAD
1a53c10 CHANGELOG: added LWIP_HOOK_ND6_GET_GW()
7d119fd nd6: add LWIP_HOOK_ND6_GET_GW hook
74a5537 Revert "Added LWIP_HOOK_ETHIP6_GET_GW()"
afb2160 Add a check for correct implementation of LWIP_CONST_CAST() to lwip_init()
002e077 ethip6: forward correct error code
9d199a6 netif_create_ip6_linklocal_address(): use macros to assign address state to ensure callbacks are triggered; netif_add_ip6_address(): only overwrite invalid addresses, not tentative addresses
86b01e4 Added LWIP_HOOK_ETHIP6_GET_GW()
1c184da Update changelog for LWIP_NETIF_TX_SINGLE_PBUF
e5f9f18 Continue to fix incorrect casts via size_t for some platforms Now also for casts: - to remove alignment warnings - casts between pointers and ints
f2a5aa2 Fix bug #49827: wrong cast to size_t on 16-bit x86 architecture I hope I caught all of them. TODO: Same for casts to get rid of alignment warnings, these are also casts via size_t
7a1b38d Minor: Save an #ifdef in ip4_frag.c
26e02e8 Fix bug #48963: ip6_frag does not support LWIP_NETIF_TX_SINGLE_PBUF Implemented.
8347d3b Try to fix compile warning with GCC under Linux ("large integer implicitly truncated to unsigned type")
a83c4e0 PPP: fix build warning on wrong cast from void* to unsigned long
ac4d994 mdns.c: use group initializer constants from prot/dns.h
f308694 Revert "mdns.c: use constants from dns.h/.c"
0e883bb mdns.c: use constants from dns.h/.c
5774fdf dns: added one-shot multicast DNS queries
85817e7 Minor documentation update about IP_ADDR_ANY
a2ad9d3 Improve documentation: Refer to compiler/platform abstraction in NO_SYS mode description
33bdf9f Doxygen: Fix project description text
55fd567 Adapt doxygen docs version number
b359b8c Minor documentation improvement
bb6df52 Fix doxygen parsing in my last commit
8a9ab99 Improve documentation: add compiler abstraction macros to doxygen docs
a420d25 arch.h: Add hint for struct packing #defines on GCC/clang
89cb7b7 Try to remove #include <stdlib.h> from many files. Does not seem necessary any more and might cause problems when porting lwIP.
9c3bbcf removed old disabled code
f446194 pppos.c: Use arch.h to get size_t instead of including stddef.h
1dd563a arch.h: Implement possibility to provide own header for size_t, default is stddef.h
aae0fc4 Use new IPv6 init macro in netif.c
5bb8330 Add macro to init an IPv6 address with U32 in host byte order
0ca82df Cleanup byte order handling a bit. - Create LWIP_MAKEU32(a,b,c,d) to create an U32 value from bytes - Use PP_HTONL() in some macros to emphasize network byte order conversion
ff3656f Added improved macros for ip address initialization: IPADDR4_INIT_BYTES(), IPADDR6_INIT_HOST() and IP4_ADDR_MAKEU32()
b31b0c8 remove bogus LWIP_MAKE_U16() define and use PP_NTOHS() in ip4.c instead
c878554 DNS: added compile-time check for some defines to fit into an u8_t (bug #49658)
e00a131 Fix bug #49778: sntp_stop does not cancel all timers Patch by Ari Suutari
cb29a49 Update CHANGELOG
795acf0 lwiperf: Simplify #if LWIPERF_CHECK_RX_DATA guard
cc25c26 Cleanup: move struct ip6_addr_packed and ip6_addr_p_t type to prot/ip6.h - these types are used in prot/ip6.h and prot/mld6.h
1687721 Fix compile when IPv4 is disabled
a6bc422 Move declaration of struct ip4_addr_packed and ip4_addr_p_t to prot/ip4.h The types are used in structs declared in ip4.h.
92183bb icmp: Increment mib2.icmpintimeexcds counter if got ICMP_TE
bcaf2f0 PPP, PPPoS: fix memory leak when disconnecting if there are remaining input bytes
4bbed75 Minor code layout cleanup in err.c and errno.h
7d0aeaf Doc: correct minor mis-spelling in sys_arch.txt
f28e63b Add netifapi macros for set link up/down
7f48289 Increment ip.drop when dropping due to NULL netif
12e35c4 mdns: Fix assertion message in mdns_resp_add_service_txtitem()
182d7c1 Add #include <stddef.h> to a central place (arch.h) instead of #including it in several other files throughout lwip since size_t is needed in many places See http://lwip.100.n7.nabble.com/Issue-in-arch-h-for-lwIP-2-0-0-td27948.html
47fd67a Remove TODO comments and one check from sockets.c indicating IPV6_V6ONLY socket option handling does not work
b934c3f fixed bug #49726: setsockopt() set TCP_NODELAY TCP_KEEPALIVE ... with a listen state TCP will crash
2a882b6 minor: fixed indent
ca9342c fixed bug #49725 (send-timeout: netwonn_write() can return ERR_OK without all bytes being written)
6f1304e patch by Ambroz Bizjak: fixed bug #49717 (window size in received SYN and SYN-ACK assumed scaled)
cac3dc8 netif: Trivial indent fix
aea8724 Fix naming of some inet_addr_* macros in inet.h From inet4_addr_* to inet_addr_* - inet_addr is a "known word", don't change it
1d4cbe7 netif: Add proper lock protect for accessing netif->loop_first
0e07ed4 fixed bug #49676 (Possible endless loop when parsing dhcp options) & added unit test for that
2ed7557 doxygen/generate.sh: Add shebang line
f419231 fixed typo in CHANGELOG
8ba7363 Optimize passing contiguous nocopy buffers to tcp_write
4c8620e Added important post-2.0.0 changes to CHANGELOG to keep track of changes for future 2.0.1 release
eb1de78 prepare CHANGELOG for post-2.0.0
5030fa8 bug #49684, api_msg: treat non-blocking ERR_MEM as ERR_WOULDBLOCK
0f87cb9 Add note about UDP multicast behavior fix to UPGRADING document
0954783 Fix bug #49662: UDP layer should filter incoming multicast datagrams against the bound IP address Change lwIP UDP API to match socket behavior. 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.
8c3c96b PPP, L2TP: fix PPPOL2TP_AUTH_SUPPORT == 0 support
03a9aac dns_enqueue(): minor readability improvement: add local variable "age" to store result of subtraction
68ec20f ipv4/ipv6: restrict loopback-destined traffic
4076b12 Revert "Apply patch #9165: Allowing udp src port to be 0 in cases when we don't care about outgoing port"
0034abf Always check whether netif_default is NULL
31b0237 Apply patch #9165: Allowing udp src port to be 0 in cases when we don't care about outgoing port
9366c0e I decided to keep the "complexity" of handling IPv6 mapped IPv4 addresses out of netconn API. Only socket API understands this address type now.
5d5eeca Once more: Try fix compile with clang
4b7e0f5 Fix indent in api_lib.c
44e430e Fix compile with MSVC 2010 and remove handling for IP6_ADDR_ANY in netconn_connect() - IP6_ADDR_ANY does not make sense in connect()
180ba72 Dual-stack: Use IPv6 mapped IPv4 addresses in receive() and getaddr() only in socket API, not in netconn API. It is better to present correct IP types in netconn API. Netconn API now accepts IPv6 mapped IPv4 addresses as well as IPv6 and IPv4 in send(), bind() and connect(), but does NOT map IPv4 to IPv6 mapped IPv4 in getaddr() and receive() functions.
792224e Try to fix compile error with clang (found by Erik's Travis-CI)
e8e853f Move ICMP6 protocol constants to include/lwip/prot/icmp6
80a24c0 raw, udp, tcp connect() does NOT need to match exact IP type - when PCB is bound to IPADDR_ANY_TYPE, it is OK to connect to IPv4 or IPv6 This should finally implement task #14187: Dual Stack sendto with socket APIs
d026a39 Dual-stack fixes in raw/udp/tcp bind() may change IP type when previous type is IPADDR_TYPE_ANY connect() IP type must exactly match bind IP type Use correct IPADDRx_ANY type when calling ip_route()
1712b06 Work on dual-stack netconn IPv6 netconns are created as IPADDR_TYPE_ANY raw/udp/tcp PCBs internally bind, connect and sendto now accept IPv6 mapped IPv4 addresses or IPv4 addresses as argument getaddr and receive functions now return IPv6 mapped IPv4 addresses instead of IPv4 addresses This behavior is close to BSD socket API
010f355 Cleanup macro parameter names
b70ddf7 Cleanup unmap_ipv6_mapped_ipv4() macro
1dd97e7 sockets.c, lwip_sendto(): Remove check whether IP address matches socket type. Is checked in lower layers anyway.
2f37dc0 api_msg.c: Partly add support for IPv6 mapped IPv4 addresses - lwip_netconn_do_getaddr(): Convert IPv4 addresses to IPv6 mapped IPv4 addresses - lwip_netconn_do_send(): Support IPv6 mapped IPv4 addresses - Not done: connect(), bind()
c1eb6d8 Minor: Add macros to map/unmap IPv6 mapped IPv4 addresses
ad17f34 mdns: Use strlen to determine string length of strings contained in a struct - padding seems to be applied to these strings, and sizeof() returns the _padded_ size??? Found by compiling with CLANG with address sanitizer enabled
ee7a2f3 inet.h: Consistently name some inet <-> ipaddr conversion macros They operate on ip4_addr_t, not on ip_addr_t This should be clearly visible in their names
b99b757 memp.c: Only check for overflow/underflow if an element could be allocated In other words: Don't dereference NULL pointers
f79eabd bug #49533: start persist timer when unsent seg can't fit in window
81a32e9 Fixed bug #49610: Sometimes, autoIP fails to reuse the same address
6dc3a21 WND_SCALE: duplicate define check & doc cleanup
f965034 Fix inconsistent return value in udp_sendto_if() - ERR_RTE should always be returned when there is no available route
fdcd8f6 Fix bug #49578: lwip_socket_drop_registered_memberships API may not work with LWIP_SOCKET_OFFSET
b90682d Update email address
b9dc415 master: Set version to 2.0.1
216bf89 Set version to 2.0.0 release
a68eddb Merge branch 'master' into STABLE-2_0_0
d5dd524 dhcp: Use DHCP_MAX_MSG_LEN_MIN_REQUIRED instead of hard-coded value
c4eb52d PPP: set protocol_list[] const
1e6c4ac PPP, IPCP: check that the peer is allowed to use the IP address it wants
b978d17 PPP, IPCP: remove obvious FIXME
dde55c6 PPP, IPCP: fix reset state before reconnecting
5d22679 Use API function instead of accessing struct members directly
132dafa Correct macro parentheses in tcpip_priv.h
54d76ff Remove superfluous local variable in raw.c
b6f32ca Fix inet_addr_to_ipaddr_p() macro
1c9e603 netif: fix reset of IPv6 addresses in netif_add()
1a7ba24 memp: Fix memp_overflow_check_all failure
d4384cf Sockets: check external FD_SETSIZE against number of sockets
a82ec44 memp: Check for null in memp_free
7d8989e TCP documentation: fix tcp_pbuf_prealloc typo
5079e45 Document non-standard functions in sys abstraction layer
e040132 PPP, documentation: Fix example code
7602812 mld6: fix conditional checksumming
20fde0b ip4_frag: Use LWIP_MIN instead of open-coded
67895e7 Fixup new IPv4 fragmentation code - thanks to Zach Smith
801f26e Minor documentation update
4dffe52 api_msg.c: Trivial code cleanup
f5f8ab5 Fix bug #49328: Crash error in ip6_frag due to Assertion Fail
e3a9f01 Implement task #14180: IPv6 code should not reuse ip6_current_dest_addr() as temporary storage
37d5691 Fix bug #49321: error.h missing opening "#ifdef __cplusplus" Reported by Martin Kortmann
725feb0 mdns: Use netif_get/set_client_data helpers
6edde49 pbuf_copy: try to fix GCC const warning
d5bfec2 ip4_frag: restore "lwip_ntohs" after last change
576f49e Fixed bug #46467: ip_frag() shouldn't modify pbuf in case of a retransmission
697be5c Make some pbuf functions take const pbuf pointers
c9cfbe2 tcp_out: Remove misleading comment in tcp_pbuf_prealloc()
0a34394 Fix netconn/socket race condition when receiving RST while waiting on recvmbox
ed239c4 Apply patch #9139: Invalid format string in dhcp.c by Thomas Mueller
695c817 Minor: Fix comment in etharp.c
f6e2794 Make lwIP compile with clang -Wdocumentation -> several documentation fixes
9cd555c Minor: documentation typo fix
4e74ae4 Minor: documentation updates
5477aa5 Minor: Documentation update
70ccea9 Make sys_restart_timeouts public also for !NO_SYS targets
69be49f Try to fix !defined(LWIP_PROVIDE_ERRNO)
740182d err: Fixup error code range checking in err_to_errno
ad3530e One more compile fix in err.c
86a9254 Try to fix unix build after Simon's errno changes (need sys_arch.h)
2afc2a5 Fix comment on sys_mbox_new() (bug #49279)
a1c0a01 bug #48823: posix errors should be removed from arch.h (to new file 'lwip/errno.h')
0541991 def.h: Provide hton* / ntoh* functions to users by default for compatibility (can be turned off) Add note to UPGRADING document
13fb616 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>
0c06073 Avoid code duplication in def.c
50e09cc Add note about new abstactions for itoa(), strnicmp(), stricmp() and strnstr() to UPGRADING document
fa21109 Fix macro name clash with windows headers in TFTP server Reported by Gisle Vanem
87172d6 mdns: Use NETIF_TO_HOST at appropriate places
60a507f ETHARP_TABLE_MATCH_NETIF is also used in the etharp_output shortcut
0d7805a tcp: fix FIN ACK handling with unsent data
9ba9dee tcp: advance next seq nr for zero window probes
95754ba Another try to fix bug #49264: Crash Error when LWIP_SOCKET_OFFSET is in use
bef7873 ND6: Always set neighbor_cache.state together with counter value to avoid inconsistency
ec236da Add comment for my last changes
ee27daf Fix bug #48876: nd6: timers should be in ticks, not ms delay_time and stale_time are ticks now. reachable_time and invalidation_timer are untouched since they may originate from telegram values -> not converting them to ticks avoids an integer division
cdc97d2 Correctly fix bug #49209: netconn_drain() fails to handle 'netconn_aborted' pointer
d9c6bad Revert "Fixed bug #49209: netconn_drain() fails to handle 'netconn_aborted' pointer"
30251b1 Fix bug #49264: Crash Error when LWIP_SOCKET_OFFSET is in use Handle LWIP_SOCKET_OFFSET in lwip_socket_drop_registered_memberships, lwip_socket_unregister_membership and lwip_socket_register_membership.
d1ed89b Fix accidental TAB in tftp_server.h
8154957 Fix compile of TFTP with MSVC
f868349 TFTP: Add missing newline at end of file
1e5efee TFTP server depends on UDP
b040544 task #14150: Add TFTP server from Logan Gunthorpe Originally written by Logan Gunthorpe, modifications/fixes/IPv6 by Dirk Ziegelmeier
eb77c83 Minor: comment in pbuf.c
5e15125 igmp: Fix optimized code by always skipping the first entry in the linked groups list
8f8f569 Fix bug #47731: IGMP state transition missing Set state variable according to RFC 2236 on timeout in delaying member state
b33070e Add documentation for bug #49139: IGMP "All Systems" vs MLD "All Nodes" inconsistency
8c52afb igmp: Optimize code by always skipping the first entry in the linked groups list - it is always the "allsystems" entry
df5a799 Fix bug #48886: raw pcbs are not handled on netif address change
d7f8d33 Minor: update NO_SYS_SampleCode.c for IPv6
db9c866 Minor: Documentation update
149701b Fix bug #49218: pbuf_clen() overflow as a result of tcp_write concatenation Let pbuf_clen() return u16_t
682b82a Improve documentation: Some words about multiple execution contexts in lwIP
65796cd "Fix" bug #49078: lwip cannot establish ipv6 connection, because of failed to fill ipv6 source address in Neighbor Solicitation Message by adding a note to netif_add not to forget to create a link-local IPv6 address
4084626 Add comment about possible definitions for non-standard functions
af04864 Remove non-standard strnlen() call in snmp_msg.c
5ddd2ae Substitute custom itoa implementation mdns by lwip_itoa() and strlen() call
17e6c9d Add #include <string.h> in def.c since lwip_strnstr uses strlen and strcmp
0e7f48d Fix compile of new functions in def.c - I accidentally put them in a #ifdef section Thanks to Daniel Elstner
461b353 httpd.c: add missing default in case statement
4144d54 Fix implementation of lwip_itoa to take more parameters
837b7b3 Fix comment in my last commit
1f68b32 Cleanup handling of non-standard functions in lwIP - itoa - strnicmp, stricmp/strcasecmp - strnstr Related to patch #9115: httpd.c: strcasecmp for GCC and stricmp for Windows
f8d19e2 Minor: Documentation updates
f3cec74 mdns: Use macro to get mdns_host from netif v2
87e8150 mdns: Use macro to get mdns_host from netif
7849898 mdns: Update error message after argument type changed
633696c Implement consistent IPx_ADDR_ANYx macro naming between IPv4 and IPv6 - rename IP4_ADDR_ANY to IP4_ADDR_ANY4 - IP4_ADDR_ANY (= IP_ADDR_ANY) is now IPv4 any address in ip_addr_t format
0e2354e Fixed bug #49209: netconn_drain() fails to handle 'netconn_aborted' pointer
5d811d7 Minor: Documentation updates
6abcd00 Convert IP address type numbers to an enum to improve documentation
97b774c Minor: Documentation updates
2f085aa ND6: Join/leave groups directly on the netif
354e385 Fix infinite loop in new MLD6 code
c7c6b7c Rework IGMP and MLD6 code to store group info per-netif. Reasoning: - Makes code in single-netif case perform better and smaller - IGMP / MLD6 code is a little bit easier to read and understand - Easier to get multicast groups per netif when implementing drivers
c25de8f Update comment in MDNS and pbuf.c
c9bae5e Fix bug #49134: Do not announce invalid IPv4 address via mDNS
dbd847b Fix bugfix for bug #49136: No SNMPv2 SetRequest response when OID does not exist Last commit broke SNMPv1 answers
19e2780 Fix bug #49136: No SNMPv2 SetRequest response when OID does not exist
eb3a083 Improve my last docs
470dae6 Documentation: Add example for zero-copy RX using custom PBUF
22907c7 bug #74921: check prefix_length, not length
623f9ce Remove one debug message from Daniel's patch
4d4710d Bug #49125 addendum: Remove group from list before callback
2facd2d Apply modified patch from Daniel Elstner to fix bug #49124: mDNS should not use snprintf()
ee4cd45 Fix bug #49125: Need a way to iterate multicast groups for MAC filtering -> let list heads be a public symbol
58c8e0f Implement request by Marco Veeneman: Make snmp_send_trap() public
8dbd1ab Minor coding style fixes while reading SNMP code
ef0dc65 Fix GCC warning "invalid suffix on literal; C++11 requires a space between literal and string macro" in arch.h. Pointed out by Thomas Nittel.
8cd43a3 Documentation: Add one more note PCB is already freed in tcp_err callback.
4a73bcb mdns: Revert answer count patch
f38705c mdns: Update answers counter in mdns_add_answer rather than each caller
b7c2553 bug #48964: Make PBUF_POOL sanity checks contingent on PBUF_POOL_SIZE
f8a95aa dns: Drop unnecessary txid variable in dns_check_entry
d66442b Fix compile when TCP, UDP and RAW are disabled
aeae4e9 Fix compile when UDP is disabled
34682fa Remove ip4_frag IP_FRAG_USES_STATIC_BUF code: nearly the same as the other code, but IP_FRAG_USES_STATIC_BUF doesn't work when queuing pbufs
ac6b64c Implement a more readable fix for pbuf_memcmp than my last fix
b944ceb Fix compile when LWIP_NUM_NETIF_CLIENT_DATA == 0 and AUTOIP or DHCP are enabled
ab8a1a0 netbuf: Fixup a copule LWIP_ERROR messages
4325aca Fix pbuf_memcmp() implementation by using pbuf_try_get_at() instead of pbuf_get_at(). Payload out-of-bounds access was not handled correctly.
23147b0 added more out of range checks to dns_recv() (see bug #48924)
9078f31 Minor: memcpy -> MEMCPY / SMEMCPY
a08ed91 added pbuf_try_get_at() (much like pbuf_get_at() but can return out-of-pbuf error)
8d45162 Fix usage of uninitialized data in dhcp.c by checking pbuf_copy_partial() return value
f5135b0 Minor coding style fixes in mdns.c
2137f49 Fix usage of uninitialized data in nd6.c because of unchecked pbuf_copy_partial() return value
aef3d2c Minor coding style fix in pbuf.c
840d1e6 Fix bug #48924: Potential out of bound reads in DNS codes of lwip project by adding checks for pbuf_copy_partial() return values. Add some comments to clarify handling of untrusted network data handling.
198fa5d Remove duplicated include for lwip/inet_chksum.h
ef827e8 apps/mdns: Fixup LWIP_ERROR message in mdns_build_host_domain
e545262 Remove superfluous parameter from mdns_domain_debug_print()
fb62e93 Fix wrong sizeof() and remove superfluous NULL pointer check in MDNS
db6aa82 memp: Fix comment for memp_overflow_check_element_overflow/underflow
c9dff6b Correct TCP_OOSEQ_MAX_* opt.h documentation
4b45bae Add some dual-stack notes to documentation
05a6d82 Let comment in pbuf.h be consistent with provided example function
0d510dd Add API macros for netif client data handling and update documentation accordingly
537bd83 Minor: More documentation updates
57468b8 Minor: Several documentation updates
452f5d6 fix tcpip.c for LWIP_TIMERS==0
2980a12 Fix ntohs -> htons in ethernet.c
89aa4e7 fixed bug #47921: link-local prefix in router advertisement must not be processes for SLAAC (patch by abhishek ambure)
3e23eb7 fixed compiling TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS (local variable 'p' was hidden)
aeb3834 Add debug assert to my last commit and improve comment in opt.h
475d494 Fix handling of LWIP_HOOK_VLAN_SET(). Previous implementation supplied uninitialized arguments to the macro (struct eth_hdr). Change macro signature to be universal: netif, pbuf, src, dst, eth_type - whatever the user needs to decide about VLAN header. Return value <0 means "no VLAN header", 0 <= return_value <= 0xFFFF -> value is prio_vid of header. Clean up ethernet_output function to be more readable.
a2ca85a tcp: Make tcp_state_str/tcp_backoff/tcp_persist_backoff static
4c390ad update netif address change triggers to tpc & udp to work with IPv6, too
a1db05c Fix const argument warning in netif_ip6_addr_set
bf5866b tcp: Prevents a 0 sized (invalid) backlog
298ec34 set netif IPv6 address & state via function to implement change triggers (task #13517)
1ba0e17 ip6_addr: a valid address is either preferred or deprecated, no need to reserve 3 bits for that
43ddf6e Fix debug strings in ethernet_output
8426dfa Remove misleading comments from udp_send() and raw_send(). A pbuf may be added automatically in front of the chain to be able to send PBUF_REFs
6fc7f84 Minor: documentation updates
831b7fc Add note to pbuf_type about correct TX/RX type selection
d9b0236 Fix MDNS did not allocate TX packets from RAM but from POOL
e78bc41 Document ethernet level functions
c719c46 Remove SIZEOF_ETHARP_PACKET_TX #define, it is not needed any more after my last cleanups
3177819 Work on bug #48868: Cleanup etharp.c not to use struct eth_hdr: Cleanup etharp_input() to use ethernet_output()
6caa7b9 Cleanup etharp_arp_input() signature to match the sig of other input functions (pbuf, netif). Rename to etharp_input()
979bee3 Work on bug #48868: Cleanup etharp.c not to use struct eth_hdr: Cleanup etharp_raw() to use ethernet_output()
d2f52e1 Fix doxygen comment in ethernet.c
56dc574 Fix comment in pbuf layer description
e4c7410 fixed bug #47652: there is always a delay to send the first Neighbor Solicitation for the new add INCOMPLETE state neighbor entry
fd5b34a ip4_forward(): fixed compiling IP_FORWARD_ALLOW_TX_ON_RX_NETIF==1
306171c DHCP: fixed compiling LWIP_DHCP_BOOTP_FILE==1
d99d91d 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
fc54556 Code beautification in LWIP_HOOK_UNKNOWN_ETH_PROTOCOL usage
0d5eea2 Clarify LWIP_HOOK_UNKNOWN_ETH_PROTOCOL in opt.h
4456c7d Fix regression in etharp.c: Allocate correct pbuf layer
f170dde Work on bug #48824: ethernet.c extensions: Implement hook for unknown ethernet protocols
bae4d63 Fix some comments to reference ethernet_output now
18136c0 Work on bug #48824: ethernet.c extensions: Implement ethernet_output(); Fixes bug #48862: ethip6 does not support setting vlan
d9eaf6f docs: Remove link to example ports again, this should rather go to lwIP wiki...
42c1938 netbuf: Use memset to zero the allocated memory for netbuf_new
1c5c96a pbuf: Use SYS_ARCH_INC in pbuf_ref()
40f2bed mem: Simplify the code for try bigger pool in mem_malloc
21c99b6 Add documentation page about example lwIP ports. Start with FreeRTOS from Pavel Pisa.
a032cca mem: Fix trivial comment typo about using custom pools
4f4d162 minor: fixed typo
6b1e1af combine MAC filter actions for IGMP and MLD6 (IGMP has compatibility defines for old code, MLD6 filter functions must be adapted)
b3bae1b memp: Fix unused variable build error when MEMP_SANITY_REGION_BEFORE/AFTER is 0
730080f Fix doxygen comment in lwip/prot/igmp.h
a189941 make igmp/mld6 filter actions an enum and define them in netif.h where the callback function prototypes are defined
f93a6e3 Rename lwip/prot/arp.h to lwip/prot/etharp.h for consistence
5e36815 init.c: Implement check for correct implementation of struct packing in lwip port
01d8e50 Add missing include in prot/igmp.h
6688033 Move IGMP protocol struct to prot/igmp.h
ed566cc minor cleaup in (eth)arp
55d0509 simplify memp.c code a bit
0e9ef19 memp: Remove memp_overflow_init() function
fefb782 Apply fix by Marco Veeneman in SNMPv3: The outbound_padding is calculated wrong in snmp_complete_outbound_frame()
12609c9 Fix compile of SNMPv3 code with MSVC
64f79e7 PPP, PPPoE: Include netif/ethernet.h to fix build error
ebd1bf8 fixed typo :-(
4a7dafc fixed compiling mdns.c after moving things to mdns_priv.h
1e6f33d tcp: move tcp header flags definitions to 'prot'
96c3c48 mdns: moved private things into mdns_priv.h
14fb48c minor: whitespace cleanups
9725a49 moved 2 enums from 'prot' headers to where they belong (dns, dhcp)
967516a Add #include to netif/ethernet.h to netif/etharp.h to maintian compatibility
e844159 Fix warning in test_etharp.c
11386a2 Fix compile of DHCP unit test
8eb9db1 Reduce usage of netif/ethernet.h header, mostly lwip/prot/ethernet.h is sufficient
43d6812 IPv6 addr: clarify tentative count/LWIP_IPV6_DUP_DETECT_ATTEMPTS
7c0d952 Add explicit documentation page about reporting bugs
c4e3be8 Work on bug #48728: headers should cleanly separate API vs. implementation ARP
ad357a4 Work on bug #48728: headers should cleanly separate API vs. implementation ICMP
2d503f4 Work on bug #48728: headers should cleanly separate API vs. implementation ICMP6
5df8822 Fix compile of MDNS unit test with GCC
458211c Comment fixes in my last commits
84e139f Work on bug #48728: headers should cleanly separate API vs. implementation IP6
81c68f5 Work on bug #48728: headers should cleanly separate API vs. implementation MLD6
f299b4b Work on bug #48728: headers should cleanly separate API vs. implementation Ethernet
8d68400 Work on bug #48728: headers should cleanly separate API vs. implementation ND6
d89fa2d Work on bug #48728: headers should cleanly separate API vs. implementation UDP
1629312 Work on bug #48728: headers should cleanly separate API vs. implementation TCP
e24fde0 memp: Fix memp_overflow_check_element_overflow assertion
ef31afb memp: Fix build error when LWIP_HOOK_MEMP_AVAILABLE is defined
a8c8e08 Minor: cleanups in unit test code
97fae7e Code cleanup in autoip.c and dhcp.c
7f60cb3 Improve netif client data API for lwIP internal clients - these can use a compile-time constant to access their data now
ebf7959 Coding style fixes in netif.c
0c7a59b Minor: Documentation fixes
c9ad583 Minor documentation fixes
a262a2f MDNS: Add callback to be called manually when IP has changed to announce new IP
fa6a2d4 Fix DHCP unit test after my last changes
c62bfd8 Port AUTOIP to new netif client data API
1db9631 Port DHCP to new netif client data API
c8c8041 Fix possible NULL pointer dereference in mdns.c introduced in my last commit
ee815e4 Finish porting MDNS to new netif client data API
c28fb29 Introduce an API to store arbitrary data pointers in struct netif Let MDNS to use the new API TODO: AutoIP, DHCP
93b286e Also rename LWIP_MDNS to LWIP_MDNS_RESPONDER in unit tests...
2a90f33 MDNS responder: two functions can take struct mdns_host instead of netif as argument
efb7b3d Rename LWIP_MDNS to LWIP_MDNS_RESPONDER
02d51e3 Add missing file doxygen header in two mdns files
fec657b MDNS: Substitute a few strlens by sizeof()
858287f MDNS: Fix several MSVC warnings
af6b707 mdns_opts.h: Add missing include lwip/opt.h
ab72ed8 Fix options #include in mdns code
482a4d2 MDNS: Correct setting TTL when IGMP is not enabled
c61c8f3 Use udp_get_multicast_ttl/udp_set_multicast_ttl accessors where applicable
af48bec Update MDNS docs after porting to dual-stack API
39ac8e2 Remove some MDNS functions from documentation, they are only visible for unit tests
52449e1 Forgot to save before committing...
2335c1a Port MDNS to new dual-stack API
ebe0e6f Some documentation cosmetics in mdns.c
4d85def Update README applications sections
b472648 Fix wrong copyright header in mdns_opts.h
a2894ed MDNS: make a few arguments const where suitable
306113c Add MDNS to doxygen docs
4919932 Apply patch #8755: Multicast DNS responder support from Erik Ekman
4af297f PPP: fix don't print valid LCP echo request/reply packets if the link is up
4e1f8ef PPP: fix ppp_write internal documentation
5493220 Move DNS protocol structs to separate header. Needed for Erik Ekman's MDNS implementation.
ce6ea0d Convert SNMP snmp_vb_enumerator_err_t to a typedef and fix resulting compile error
6dcb2b2 Work on bug #48730: Enums should be used instead of multiple defines (where applicable)
36b9cae Fix compile of unit test
1325152 Strip path prefix in doxygen docs - no /home/dziegel/ in the future :-)
b34baff Convert state #defines in autoip.h and dhcp.h to enums. May be useful in *_state structs to simplify debugging in the future.
6f62fe5 ensure the 'prot' headers are as small & portable as possible
dc7340b started with bug #48728: move protocol definitions to 'include/prot/*.h' files (started with some IPv4 protocols)
d95ab51 netif:ppp: fix mempool build issues when PPP is enabled
bf3e8e6 minor coding style fixes in IPv6 code
3194c9c PPP: filter more packets in ppp_dump_packet
18fcc1d [PATCH] debug: Add braces around empty body in an 'if' statement
5c0944e Don't document tcp_send_empty_ack and tcp_keepalive - users should never need them
5a09fd3 Don't document ip4_route and ip6_route, users should use ip_route instead
0005b7c Revert my last change in sntp.c - allow usage of custom error values in err_t
6ba03d5 Activate TCP backlog in documentation
61dae47 Relete SNMP README and incorporate it's text in doxygen docs
85ab399 Fix a few incorrect uses of err_t. Found by converting lwip error codes to an enum, but I'm not sure wether I want to commit the actual enum conversion.
e5284ec Minor: documentation cosmetics
4b41ef5 Add note about Filelists.mk in UPGRADING document
a2fd680 minor: macros should not end with underscore(s)
1631307 tcp.c: Partly undo Simon's changes from today (repairs doxygen docs)
1033277 Remove tcp_accepted() from rawapi.txt. Thanks to Sergio Caprile for pointing this out!
fa568f7 Fix typos in docs
282b8a2 PPP: set disconnect state before closing link protocol in ppp_close
b1dfd00 Minor netif documentation update
eba6ae0 minor: add a comment about where to define LWIP_RAND()
219438f cleanup: move stdlib.h include to mem.c, where it belongs
e4c01a0 mem: Include stdlib.h to fix build warnings when MEM_LIBC_MALLOC is set
08378b7 Improve LWIP_EVENT_API compilation
fc66fb8 Fix compilation for LWIP_EVENT_API
fa8797b Fix PBUF_LINK_HLEN value in documentation
953dd5b PPP, PPPoE: remove useless checks
455a418 PPP, PPPoL2TP: cleanup connection state reset
1ea1026 PPP, PPPoE: cleanup connection state reset
09c22e1 PPP: close link protocol if LCP is not started in ppp_close
7c02a85 PPP, PPPoE: add support for disconnecting in link initiation state in disconnect callback
d15ebc6 PPP: don't restart LCP closing if termination is already in progress
f185104 PPP: revamp PPP state order
5811948 PPP: remove PPP_PHASE_MASTER conditions if multilink mode is disabled
dd0779c PPP, move VJ_SUPPORT disabling if LWIP_TCP is not enabled to PPP options
898e691 Minor: documentation fix
f55c0e7 Move rawapi.txt description to main page - this doc really should be found and read by users
3ca4eb5 Minor pbuf layer doc update
6af2137 Fix clang address sanitizer errors in unit tests (buffers too small)
0a7db8a PPP: remove double include for lwip/sys.h
0673fcd Fix mentioning functions that do not take pbufs as argument in pbuf layer docs
980a919 Don't document IP type specific output functions, users should use IP type independent ones
8d07629 Some documentation cleanups and include more comments that have been already in code into doxygen docs
cf66233 PBUF layer documentation clarification
b94c8ee Add some more functions and macros to documentation
73131b1 Fix doxygen warning in ip6.c
87855b0 Update doxgen docs: PBUF layers, IPv4 and IPv6 functions, add some missing tcp raw API functions
2acfa0e Update NO_SYS_SampleCode.c: Don't access heap in IRQ
a20cdc5 Fix comment in sample code
70ee63e Documentation: Add example code for NO_SYS use case
c2a5480 PPP: remove useless ppp_link_start function
01561b2 PPP: set phase to establish before starting LCP
9b47b63 PPP, PPPoE: remove useless PPPoE state conditions
e8d8c5d PPP, L2TP: remove useless L2TP state conditions
bae6791 PPP: fix dead phase set too early
5f77427 minor: tabs -> spaces
02221cf Rename IP_HDRINCL to LWIP_IP_HDRINCL
6383ef8 had a look through the docs...
dd11030 update some FILES list files
4c06a73 Add redirection page for HTML doxygen output so one does not have to search for index.html in the huge output/html directory
da83946 Add one more documentation sentence in tcp.c
3d379c9 IPv6 is NOT experimental any more :-)
git-subtree-dir: features/FEATURE_LWIP/lwip-interface/lwip
git-subtree-split: 10f93f4cf593f18932a7e575f7113a02a6b291e7
2017-02-21 12:26:01 +00:00
|
|
|
const ip_addr_t *ns;
|
2016-09-28 05:48:10 +00:00
|
|
|
#endif /* LWIP_DNS */
|
|
|
|
printf("status_cb: Connected\n");
|
|
|
|
#if PPP_IPV4_SUPPORT
|
|
|
|
printf(" our_ipaddr = %s\n", ipaddr_ntoa(&pppif->ip_addr));
|
|
|
|
printf(" his_ipaddr = %s\n", ipaddr_ntoa(&pppif->gw));
|
|
|
|
printf(" netmask = %s\n", ipaddr_ntoa(&pppif->netmask));
|
|
|
|
#if LWIP_DNS
|
|
|
|
ns = dns_getserver(0);
|
Squashed 'features/FEATURE_LWIP/lwip-interface/lwip/' changes from d7a6c6d..10f93f4
10f93f4 Renamed ethernet.h to lwip_ethernet.h
9cf30bb Renamed lwip source files
207d1a7 Merged branch 'mbed-os-lwip-stable-2_0_1' into prefixed branch.
e5071da Add MQTT to CHANGELOG (too late for 2.0.1 release...)
980b219 Put 2.0.1 version tag in UPGRADING document
76b4365 Remove duplicate netif_dhcp_data() macro
a5a4830 Set lwIP version to 2.0.1 RELEASE
1a2a9a4 Merge branch 'master' into STABLE-2_0_0
3a20ae3 Add missing #include in netdb.c for atoi()
0ffacca Add missing #include in httpd.c for atoi()
e94c9ff Fix warning about bad cast in pbuf_skip()
72316bd Move macros to access DHCP and AUTOIP data to headers, users may want to access the members
803a711 Fix warning that local variable may be used uninitialized in mem.c
8760fb6 fixed warnings in mdns unit tests
d2631e6 mqtt: Fix pedantic enum warning
4059748 I was not satisfied with the previous debugging options structure. Improve it again.
644a21b Improve debugging options documentation
a387631 Add debugging options to documentation
e3c2b8a Add note about high resource-consumption in LWIP_PLATFORM_DIAG and LWIP_PLATFORM_ASSERT default implementations
e12bb2a Fix comma at end of enum list in mqtt.h
2096f1a Fix C++ style comment in mqtt.c
1f3c18f tcp: Make tcp_listen_with_backlog_and_err return NULL if the address/port is already used
edfeab7 mqtt: Trivial coding style fix
b8bc7b7 arch.h: Add #includes necessary for default implentation of LWIP_PLATFORM_DIAG and LWIP_PLATFORM_ASSERT
f874d15 Add #include <string.h> in snmp_netconn.c because memset() is used
ee034bd Document PACK_STRUCT_USE_INCLUDES #define
a2a16d4 nd6 rdnss: fixed dual-stack compilation
98fc82f added function tcp_listen_with_backlog_and_err() to get the error reason when listening fails (bug #49861)
1884c7e Fix TCP unit tests after changes from "Add hook for TCP Initial Sequence Number generation" commit (pcb->lastack and friends are not initialized during allocation any more, but by connect() / bind() call)
1466b7a Several mqtt documentation fixes found by clang
748e2e9 Create documentation section "porting" and move it under lwIP section (instead of infrastructure)
1fd69dd Minor documentation update in def.c
3a8368e Provide struct packing macros on GCC/clang out of the box
c1258e5 Compile fix in lwip/arch.h "extra tokens at end of #ifndef directive"
211a71c Minor documentation update in lwip/arch.h
55199fc More documentation updates in lwip/arch.h
45ad6f2 Minor documentation updates in lwip/arch.h
df365ad Trivial typo fix in arch.h docs
7b40d1e doc: mqtt_client: Update example code after adding port parameter to mqtt_client_connect()
c1d16c6 Forgot documentation on MQTT port #define
83b1c39 Add #define with default MQTT port for convenience
bfa0358 mqtt: Allow setting server port to connect
2e4b368 Revert "Fix bug #49914: lwip_sendmsg uses PBUF_REF pbufs"
4e34851 Fix bug #49914: lwip_sendmsg uses PBUF_REF pbufs Use PBUF_RAM and create private copy of the data
3a557ba Move a few MQTT options from mqtt.c to mqtt_opts.h
6e219b6 Change signature of mqtt_client_connect() to take an IP addr instead of a string
ec1450b Add mqtt documentation from Erik Anderson, rev 4b84fff
5be91de mqtt: Trivial error message fix
24fa1c4 opt.h: provide some hints regarding MLD settings
71810d0 ipv6: adjust MLD membership on address state changes
d5bc856 mqtt: Check conn_state before create request for sub_unsub
8767205 Update .gitignore once more for fuzz test
dd96c71 Fix a few -Wconversion warnings (there are many more to do)
be57134 Fixed bug #49895: Incorrect configuration detection in lwip/dns.h
16b895b Undo removal of mqtt_publish() from documentation in Simon's last commit (guess it was by accident)
dcb7616 Minor documentation fix in MQTT
02f4610 mqtt: Use LWIP_ARRAYSIZE to replace hardcoded value
b6a131e mqtt: fix C usage (declaration after statement), fix casting to smaller type
12bc2c0 MQTT cleanups: - create mqtt_opts.h file and move options in there - documentation cleanups
14e3686 Some cleanups in MQTT client Integrate in documentation Compile fixes, mostly: Variables must be declared before any statement in a function
1e82465 task #14281: Add MQTT client Thanks to Erik Andersen Taken from https://github.com/erian747/, branch mqtt, rev 5d59470
fb07d47 more LWIP_NOASSERT fixes
c717332 Fix compiling with LWIP_NOASSERT (and debug/error disabled, too)
e0c0ba7 Fix compile with LWIP_NOASSERT Pointed out by Nirav Desai
7f319f5 Fix compile of test_tcp.c unit test after introduction of tcp_next_iss hook
c21763f Minor code cleanup api_lib.c
f488c5b igmp: Fix optimized code for igmp_remove_group
5c1dd6a Optimization in igmp_remove_group() pointed out by Axel Lin No need to handle special case "first in list" since this is always the allsystems group that shall not be removed
102a50f Fix bug #39145: IGMP membership report for 224.0.0.1 Ensure allsystems group is always first in linked list
bb8088d Minor cleanup of FUZZ test Makefile
11780f0 Fixup Makefile of FUZZ test after moving to main lwIP rep
cceea73 bug #49631: handle zero-window probe and refused_data
fcd2daf fixed race condition in return value of netconn_gethostbyname() (and thus also lwip_gethostbyname/_r() and lwip_getaddrinfo())
b5f51db ND6: Don't misuse ip6_current_dest_addr() to create an aligned copy of an IPv6 address We never know what side effect in application code this could trigger...
d9f461e Fixed #49848 (Non-blocking socket emit a sock error while read return EWOULDBLOCK) especially for EWOULDBLOCK (added task #14275 for the general problem)
c13a43e added note about afl-fuzz requiring linux
844c201 added fuzz tests (moved from contrib/ports/unix/fuzz to get them to a more prominent place, even if afl-fuzz still needs *nix to run)
62e3400 LWIP_HOOK_TCP_ISN: added CHANGELOG/fixed comment
a8b986b Add hook for TCP Initial Sequence Number generation
da15132 Make nd6_new_router() handle already existing routers (this is a special case for 2 netifs on the same subnet - e.g. wifi and cable) see bug #46506
e3925cc nd6: Fix build error if LWIP_ND6_RDNSS_MAX_DNS_SERVERS == 0
6b1950e nd6: add support for RDNSS option (as per RFC 6106)
4e3cf61 opt.h: added LWIP_DHCP_MAX_DNS_SERVERS to configure the maximum number of DNS servers configured from dhcp.c(v4) (if any; guarded with LWIP_DNS)
53b9f2a dhcp: covert DHCP_OPTION_IDX_* from defines to enum (mainly to ease offset calculation)
cd5dfa2 nd6: minor 'static' consistency fix
bd1defc added forgoten new file nd6_priv.h :-(
281ef5d minor: fixed errors in some defined __DOXYGEN__ guards
e8461f9 minor: corrected include guard name in tcp_priv.h
60cd25c Moved nd6 implementation details to new file nd6_priv.h (possible after David's cleanups)
4c16ea9 Minor: nd6_packet_send_check() -> nd6_get_next_hop_addr_or_queue() (too long, but a little more self-explaining); cosmetics...
69a7039 nd6: centralize link-local packet send decision
06ff89c nd6: use default_router_list internally only
cee59ba nd6: add nd6_clear_destination_cache() function
d4fad59 nd6_input(): allow using NA without lladdr_opt for DAD
1a53c10 CHANGELOG: added LWIP_HOOK_ND6_GET_GW()
7d119fd nd6: add LWIP_HOOK_ND6_GET_GW hook
74a5537 Revert "Added LWIP_HOOK_ETHIP6_GET_GW()"
afb2160 Add a check for correct implementation of LWIP_CONST_CAST() to lwip_init()
002e077 ethip6: forward correct error code
9d199a6 netif_create_ip6_linklocal_address(): use macros to assign address state to ensure callbacks are triggered; netif_add_ip6_address(): only overwrite invalid addresses, not tentative addresses
86b01e4 Added LWIP_HOOK_ETHIP6_GET_GW()
1c184da Update changelog for LWIP_NETIF_TX_SINGLE_PBUF
e5f9f18 Continue to fix incorrect casts via size_t for some platforms Now also for casts: - to remove alignment warnings - casts between pointers and ints
f2a5aa2 Fix bug #49827: wrong cast to size_t on 16-bit x86 architecture I hope I caught all of them. TODO: Same for casts to get rid of alignment warnings, these are also casts via size_t
7a1b38d Minor: Save an #ifdef in ip4_frag.c
26e02e8 Fix bug #48963: ip6_frag does not support LWIP_NETIF_TX_SINGLE_PBUF Implemented.
8347d3b Try to fix compile warning with GCC under Linux ("large integer implicitly truncated to unsigned type")
a83c4e0 PPP: fix build warning on wrong cast from void* to unsigned long
ac4d994 mdns.c: use group initializer constants from prot/dns.h
f308694 Revert "mdns.c: use constants from dns.h/.c"
0e883bb mdns.c: use constants from dns.h/.c
5774fdf dns: added one-shot multicast DNS queries
85817e7 Minor documentation update about IP_ADDR_ANY
a2ad9d3 Improve documentation: Refer to compiler/platform abstraction in NO_SYS mode description
33bdf9f Doxygen: Fix project description text
55fd567 Adapt doxygen docs version number
b359b8c Minor documentation improvement
bb6df52 Fix doxygen parsing in my last commit
8a9ab99 Improve documentation: add compiler abstraction macros to doxygen docs
a420d25 arch.h: Add hint for struct packing #defines on GCC/clang
89cb7b7 Try to remove #include <stdlib.h> from many files. Does not seem necessary any more and might cause problems when porting lwIP.
9c3bbcf removed old disabled code
f446194 pppos.c: Use arch.h to get size_t instead of including stddef.h
1dd563a arch.h: Implement possibility to provide own header for size_t, default is stddef.h
aae0fc4 Use new IPv6 init macro in netif.c
5bb8330 Add macro to init an IPv6 address with U32 in host byte order
0ca82df Cleanup byte order handling a bit. - Create LWIP_MAKEU32(a,b,c,d) to create an U32 value from bytes - Use PP_HTONL() in some macros to emphasize network byte order conversion
ff3656f Added improved macros for ip address initialization: IPADDR4_INIT_BYTES(), IPADDR6_INIT_HOST() and IP4_ADDR_MAKEU32()
b31b0c8 remove bogus LWIP_MAKE_U16() define and use PP_NTOHS() in ip4.c instead
c878554 DNS: added compile-time check for some defines to fit into an u8_t (bug #49658)
e00a131 Fix bug #49778: sntp_stop does not cancel all timers Patch by Ari Suutari
cb29a49 Update CHANGELOG
795acf0 lwiperf: Simplify #if LWIPERF_CHECK_RX_DATA guard
cc25c26 Cleanup: move struct ip6_addr_packed and ip6_addr_p_t type to prot/ip6.h - these types are used in prot/ip6.h and prot/mld6.h
1687721 Fix compile when IPv4 is disabled
a6bc422 Move declaration of struct ip4_addr_packed and ip4_addr_p_t to prot/ip4.h The types are used in structs declared in ip4.h.
92183bb icmp: Increment mib2.icmpintimeexcds counter if got ICMP_TE
bcaf2f0 PPP, PPPoS: fix memory leak when disconnecting if there are remaining input bytes
4bbed75 Minor code layout cleanup in err.c and errno.h
7d0aeaf Doc: correct minor mis-spelling in sys_arch.txt
f28e63b Add netifapi macros for set link up/down
7f48289 Increment ip.drop when dropping due to NULL netif
12e35c4 mdns: Fix assertion message in mdns_resp_add_service_txtitem()
182d7c1 Add #include <stddef.h> to a central place (arch.h) instead of #including it in several other files throughout lwip since size_t is needed in many places See http://lwip.100.n7.nabble.com/Issue-in-arch-h-for-lwIP-2-0-0-td27948.html
47fd67a Remove TODO comments and one check from sockets.c indicating IPV6_V6ONLY socket option handling does not work
b934c3f fixed bug #49726: setsockopt() set TCP_NODELAY TCP_KEEPALIVE ... with a listen state TCP will crash
2a882b6 minor: fixed indent
ca9342c fixed bug #49725 (send-timeout: netwonn_write() can return ERR_OK without all bytes being written)
6f1304e patch by Ambroz Bizjak: fixed bug #49717 (window size in received SYN and SYN-ACK assumed scaled)
cac3dc8 netif: Trivial indent fix
aea8724 Fix naming of some inet_addr_* macros in inet.h From inet4_addr_* to inet_addr_* - inet_addr is a "known word", don't change it
1d4cbe7 netif: Add proper lock protect for accessing netif->loop_first
0e07ed4 fixed bug #49676 (Possible endless loop when parsing dhcp options) & added unit test for that
2ed7557 doxygen/generate.sh: Add shebang line
f419231 fixed typo in CHANGELOG
8ba7363 Optimize passing contiguous nocopy buffers to tcp_write
4c8620e Added important post-2.0.0 changes to CHANGELOG to keep track of changes for future 2.0.1 release
eb1de78 prepare CHANGELOG for post-2.0.0
5030fa8 bug #49684, api_msg: treat non-blocking ERR_MEM as ERR_WOULDBLOCK
0f87cb9 Add note about UDP multicast behavior fix to UPGRADING document
0954783 Fix bug #49662: UDP layer should filter incoming multicast datagrams against the bound IP address Change lwIP UDP API to match socket behavior. 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.
8c3c96b PPP, L2TP: fix PPPOL2TP_AUTH_SUPPORT == 0 support
03a9aac dns_enqueue(): minor readability improvement: add local variable "age" to store result of subtraction
68ec20f ipv4/ipv6: restrict loopback-destined traffic
4076b12 Revert "Apply patch #9165: Allowing udp src port to be 0 in cases when we don't care about outgoing port"
0034abf Always check whether netif_default is NULL
31b0237 Apply patch #9165: Allowing udp src port to be 0 in cases when we don't care about outgoing port
9366c0e I decided to keep the "complexity" of handling IPv6 mapped IPv4 addresses out of netconn API. Only socket API understands this address type now.
5d5eeca Once more: Try fix compile with clang
4b7e0f5 Fix indent in api_lib.c
44e430e Fix compile with MSVC 2010 and remove handling for IP6_ADDR_ANY in netconn_connect() - IP6_ADDR_ANY does not make sense in connect()
180ba72 Dual-stack: Use IPv6 mapped IPv4 addresses in receive() and getaddr() only in socket API, not in netconn API. It is better to present correct IP types in netconn API. Netconn API now accepts IPv6 mapped IPv4 addresses as well as IPv6 and IPv4 in send(), bind() and connect(), but does NOT map IPv4 to IPv6 mapped IPv4 in getaddr() and receive() functions.
792224e Try to fix compile error with clang (found by Erik's Travis-CI)
e8e853f Move ICMP6 protocol constants to include/lwip/prot/icmp6
80a24c0 raw, udp, tcp connect() does NOT need to match exact IP type - when PCB is bound to IPADDR_ANY_TYPE, it is OK to connect to IPv4 or IPv6 This should finally implement task #14187: Dual Stack sendto with socket APIs
d026a39 Dual-stack fixes in raw/udp/tcp bind() may change IP type when previous type is IPADDR_TYPE_ANY connect() IP type must exactly match bind IP type Use correct IPADDRx_ANY type when calling ip_route()
1712b06 Work on dual-stack netconn IPv6 netconns are created as IPADDR_TYPE_ANY raw/udp/tcp PCBs internally bind, connect and sendto now accept IPv6 mapped IPv4 addresses or IPv4 addresses as argument getaddr and receive functions now return IPv6 mapped IPv4 addresses instead of IPv4 addresses This behavior is close to BSD socket API
010f355 Cleanup macro parameter names
b70ddf7 Cleanup unmap_ipv6_mapped_ipv4() macro
1dd97e7 sockets.c, lwip_sendto(): Remove check whether IP address matches socket type. Is checked in lower layers anyway.
2f37dc0 api_msg.c: Partly add support for IPv6 mapped IPv4 addresses - lwip_netconn_do_getaddr(): Convert IPv4 addresses to IPv6 mapped IPv4 addresses - lwip_netconn_do_send(): Support IPv6 mapped IPv4 addresses - Not done: connect(), bind()
c1eb6d8 Minor: Add macros to map/unmap IPv6 mapped IPv4 addresses
ad17f34 mdns: Use strlen to determine string length of strings contained in a struct - padding seems to be applied to these strings, and sizeof() returns the _padded_ size??? Found by compiling with CLANG with address sanitizer enabled
ee7a2f3 inet.h: Consistently name some inet <-> ipaddr conversion macros They operate on ip4_addr_t, not on ip_addr_t This should be clearly visible in their names
b99b757 memp.c: Only check for overflow/underflow if an element could be allocated In other words: Don't dereference NULL pointers
f79eabd bug #49533: start persist timer when unsent seg can't fit in window
81a32e9 Fixed bug #49610: Sometimes, autoIP fails to reuse the same address
6dc3a21 WND_SCALE: duplicate define check & doc cleanup
f965034 Fix inconsistent return value in udp_sendto_if() - ERR_RTE should always be returned when there is no available route
fdcd8f6 Fix bug #49578: lwip_socket_drop_registered_memberships API may not work with LWIP_SOCKET_OFFSET
b90682d Update email address
b9dc415 master: Set version to 2.0.1
216bf89 Set version to 2.0.0 release
a68eddb Merge branch 'master' into STABLE-2_0_0
d5dd524 dhcp: Use DHCP_MAX_MSG_LEN_MIN_REQUIRED instead of hard-coded value
c4eb52d PPP: set protocol_list[] const
1e6c4ac PPP, IPCP: check that the peer is allowed to use the IP address it wants
b978d17 PPP, IPCP: remove obvious FIXME
dde55c6 PPP, IPCP: fix reset state before reconnecting
5d22679 Use API function instead of accessing struct members directly
132dafa Correct macro parentheses in tcpip_priv.h
54d76ff Remove superfluous local variable in raw.c
b6f32ca Fix inet_addr_to_ipaddr_p() macro
1c9e603 netif: fix reset of IPv6 addresses in netif_add()
1a7ba24 memp: Fix memp_overflow_check_all failure
d4384cf Sockets: check external FD_SETSIZE against number of sockets
a82ec44 memp: Check for null in memp_free
7d8989e TCP documentation: fix tcp_pbuf_prealloc typo
5079e45 Document non-standard functions in sys abstraction layer
e040132 PPP, documentation: Fix example code
7602812 mld6: fix conditional checksumming
20fde0b ip4_frag: Use LWIP_MIN instead of open-coded
67895e7 Fixup new IPv4 fragmentation code - thanks to Zach Smith
801f26e Minor documentation update
4dffe52 api_msg.c: Trivial code cleanup
f5f8ab5 Fix bug #49328: Crash error in ip6_frag due to Assertion Fail
e3a9f01 Implement task #14180: IPv6 code should not reuse ip6_current_dest_addr() as temporary storage
37d5691 Fix bug #49321: error.h missing opening "#ifdef __cplusplus" Reported by Martin Kortmann
725feb0 mdns: Use netif_get/set_client_data helpers
6edde49 pbuf_copy: try to fix GCC const warning
d5bfec2 ip4_frag: restore "lwip_ntohs" after last change
576f49e Fixed bug #46467: ip_frag() shouldn't modify pbuf in case of a retransmission
697be5c Make some pbuf functions take const pbuf pointers
c9cfbe2 tcp_out: Remove misleading comment in tcp_pbuf_prealloc()
0a34394 Fix netconn/socket race condition when receiving RST while waiting on recvmbox
ed239c4 Apply patch #9139: Invalid format string in dhcp.c by Thomas Mueller
695c817 Minor: Fix comment in etharp.c
f6e2794 Make lwIP compile with clang -Wdocumentation -> several documentation fixes
9cd555c Minor: documentation typo fix
4e74ae4 Minor: documentation updates
5477aa5 Minor: Documentation update
70ccea9 Make sys_restart_timeouts public also for !NO_SYS targets
69be49f Try to fix !defined(LWIP_PROVIDE_ERRNO)
740182d err: Fixup error code range checking in err_to_errno
ad3530e One more compile fix in err.c
86a9254 Try to fix unix build after Simon's errno changes (need sys_arch.h)
2afc2a5 Fix comment on sys_mbox_new() (bug #49279)
a1c0a01 bug #48823: posix errors should be removed from arch.h (to new file 'lwip/errno.h')
0541991 def.h: Provide hton* / ntoh* functions to users by default for compatibility (can be turned off) Add note to UPGRADING document
13fb616 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>
0c06073 Avoid code duplication in def.c
50e09cc Add note about new abstactions for itoa(), strnicmp(), stricmp() and strnstr() to UPGRADING document
fa21109 Fix macro name clash with windows headers in TFTP server Reported by Gisle Vanem
87172d6 mdns: Use NETIF_TO_HOST at appropriate places
60a507f ETHARP_TABLE_MATCH_NETIF is also used in the etharp_output shortcut
0d7805a tcp: fix FIN ACK handling with unsent data
9ba9dee tcp: advance next seq nr for zero window probes
95754ba Another try to fix bug #49264: Crash Error when LWIP_SOCKET_OFFSET is in use
bef7873 ND6: Always set neighbor_cache.state together with counter value to avoid inconsistency
ec236da Add comment for my last changes
ee27daf Fix bug #48876: nd6: timers should be in ticks, not ms delay_time and stale_time are ticks now. reachable_time and invalidation_timer are untouched since they may originate from telegram values -> not converting them to ticks avoids an integer division
cdc97d2 Correctly fix bug #49209: netconn_drain() fails to handle 'netconn_aborted' pointer
d9c6bad Revert "Fixed bug #49209: netconn_drain() fails to handle 'netconn_aborted' pointer"
30251b1 Fix bug #49264: Crash Error when LWIP_SOCKET_OFFSET is in use Handle LWIP_SOCKET_OFFSET in lwip_socket_drop_registered_memberships, lwip_socket_unregister_membership and lwip_socket_register_membership.
d1ed89b Fix accidental TAB in tftp_server.h
8154957 Fix compile of TFTP with MSVC
f868349 TFTP: Add missing newline at end of file
1e5efee TFTP server depends on UDP
b040544 task #14150: Add TFTP server from Logan Gunthorpe Originally written by Logan Gunthorpe, modifications/fixes/IPv6 by Dirk Ziegelmeier
eb77c83 Minor: comment in pbuf.c
5e15125 igmp: Fix optimized code by always skipping the first entry in the linked groups list
8f8f569 Fix bug #47731: IGMP state transition missing Set state variable according to RFC 2236 on timeout in delaying member state
b33070e Add documentation for bug #49139: IGMP "All Systems" vs MLD "All Nodes" inconsistency
8c52afb igmp: Optimize code by always skipping the first entry in the linked groups list - it is always the "allsystems" entry
df5a799 Fix bug #48886: raw pcbs are not handled on netif address change
d7f8d33 Minor: update NO_SYS_SampleCode.c for IPv6
db9c866 Minor: Documentation update
149701b Fix bug #49218: pbuf_clen() overflow as a result of tcp_write concatenation Let pbuf_clen() return u16_t
682b82a Improve documentation: Some words about multiple execution contexts in lwIP
65796cd "Fix" bug #49078: lwip cannot establish ipv6 connection, because of failed to fill ipv6 source address in Neighbor Solicitation Message by adding a note to netif_add not to forget to create a link-local IPv6 address
4084626 Add comment about possible definitions for non-standard functions
af04864 Remove non-standard strnlen() call in snmp_msg.c
5ddd2ae Substitute custom itoa implementation mdns by lwip_itoa() and strlen() call
17e6c9d Add #include <string.h> in def.c since lwip_strnstr uses strlen and strcmp
0e7f48d Fix compile of new functions in def.c - I accidentally put them in a #ifdef section Thanks to Daniel Elstner
461b353 httpd.c: add missing default in case statement
4144d54 Fix implementation of lwip_itoa to take more parameters
837b7b3 Fix comment in my last commit
1f68b32 Cleanup handling of non-standard functions in lwIP - itoa - strnicmp, stricmp/strcasecmp - strnstr Related to patch #9115: httpd.c: strcasecmp for GCC and stricmp for Windows
f8d19e2 Minor: Documentation updates
f3cec74 mdns: Use macro to get mdns_host from netif v2
87e8150 mdns: Use macro to get mdns_host from netif
7849898 mdns: Update error message after argument type changed
633696c Implement consistent IPx_ADDR_ANYx macro naming between IPv4 and IPv6 - rename IP4_ADDR_ANY to IP4_ADDR_ANY4 - IP4_ADDR_ANY (= IP_ADDR_ANY) is now IPv4 any address in ip_addr_t format
0e2354e Fixed bug #49209: netconn_drain() fails to handle 'netconn_aborted' pointer
5d811d7 Minor: Documentation updates
6abcd00 Convert IP address type numbers to an enum to improve documentation
97b774c Minor: Documentation updates
2f085aa ND6: Join/leave groups directly on the netif
354e385 Fix infinite loop in new MLD6 code
c7c6b7c Rework IGMP and MLD6 code to store group info per-netif. Reasoning: - Makes code in single-netif case perform better and smaller - IGMP / MLD6 code is a little bit easier to read and understand - Easier to get multicast groups per netif when implementing drivers
c25de8f Update comment in MDNS and pbuf.c
c9bae5e Fix bug #49134: Do not announce invalid IPv4 address via mDNS
dbd847b Fix bugfix for bug #49136: No SNMPv2 SetRequest response when OID does not exist Last commit broke SNMPv1 answers
19e2780 Fix bug #49136: No SNMPv2 SetRequest response when OID does not exist
eb3a083 Improve my last docs
470dae6 Documentation: Add example for zero-copy RX using custom PBUF
22907c7 bug #74921: check prefix_length, not length
623f9ce Remove one debug message from Daniel's patch
4d4710d Bug #49125 addendum: Remove group from list before callback
2facd2d Apply modified patch from Daniel Elstner to fix bug #49124: mDNS should not use snprintf()
ee4cd45 Fix bug #49125: Need a way to iterate multicast groups for MAC filtering -> let list heads be a public symbol
58c8e0f Implement request by Marco Veeneman: Make snmp_send_trap() public
8dbd1ab Minor coding style fixes while reading SNMP code
ef0dc65 Fix GCC warning "invalid suffix on literal; C++11 requires a space between literal and string macro" in arch.h. Pointed out by Thomas Nittel.
8cd43a3 Documentation: Add one more note PCB is already freed in tcp_err callback.
4a73bcb mdns: Revert answer count patch
f38705c mdns: Update answers counter in mdns_add_answer rather than each caller
b7c2553 bug #48964: Make PBUF_POOL sanity checks contingent on PBUF_POOL_SIZE
f8a95aa dns: Drop unnecessary txid variable in dns_check_entry
d66442b Fix compile when TCP, UDP and RAW are disabled
aeae4e9 Fix compile when UDP is disabled
34682fa Remove ip4_frag IP_FRAG_USES_STATIC_BUF code: nearly the same as the other code, but IP_FRAG_USES_STATIC_BUF doesn't work when queuing pbufs
ac6b64c Implement a more readable fix for pbuf_memcmp than my last fix
b944ceb Fix compile when LWIP_NUM_NETIF_CLIENT_DATA == 0 and AUTOIP or DHCP are enabled
ab8a1a0 netbuf: Fixup a copule LWIP_ERROR messages
4325aca Fix pbuf_memcmp() implementation by using pbuf_try_get_at() instead of pbuf_get_at(). Payload out-of-bounds access was not handled correctly.
23147b0 added more out of range checks to dns_recv() (see bug #48924)
9078f31 Minor: memcpy -> MEMCPY / SMEMCPY
a08ed91 added pbuf_try_get_at() (much like pbuf_get_at() but can return out-of-pbuf error)
8d45162 Fix usage of uninitialized data in dhcp.c by checking pbuf_copy_partial() return value
f5135b0 Minor coding style fixes in mdns.c
2137f49 Fix usage of uninitialized data in nd6.c because of unchecked pbuf_copy_partial() return value
aef3d2c Minor coding style fix in pbuf.c
840d1e6 Fix bug #48924: Potential out of bound reads in DNS codes of lwip project by adding checks for pbuf_copy_partial() return values. Add some comments to clarify handling of untrusted network data handling.
198fa5d Remove duplicated include for lwip/inet_chksum.h
ef827e8 apps/mdns: Fixup LWIP_ERROR message in mdns_build_host_domain
e545262 Remove superfluous parameter from mdns_domain_debug_print()
fb62e93 Fix wrong sizeof() and remove superfluous NULL pointer check in MDNS
db6aa82 memp: Fix comment for memp_overflow_check_element_overflow/underflow
c9dff6b Correct TCP_OOSEQ_MAX_* opt.h documentation
4b45bae Add some dual-stack notes to documentation
05a6d82 Let comment in pbuf.h be consistent with provided example function
0d510dd Add API macros for netif client data handling and update documentation accordingly
537bd83 Minor: More documentation updates
57468b8 Minor: Several documentation updates
452f5d6 fix tcpip.c for LWIP_TIMERS==0
2980a12 Fix ntohs -> htons in ethernet.c
89aa4e7 fixed bug #47921: link-local prefix in router advertisement must not be processes for SLAAC (patch by abhishek ambure)
3e23eb7 fixed compiling TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS (local variable 'p' was hidden)
aeb3834 Add debug assert to my last commit and improve comment in opt.h
475d494 Fix handling of LWIP_HOOK_VLAN_SET(). Previous implementation supplied uninitialized arguments to the macro (struct eth_hdr). Change macro signature to be universal: netif, pbuf, src, dst, eth_type - whatever the user needs to decide about VLAN header. Return value <0 means "no VLAN header", 0 <= return_value <= 0xFFFF -> value is prio_vid of header. Clean up ethernet_output function to be more readable.
a2ca85a tcp: Make tcp_state_str/tcp_backoff/tcp_persist_backoff static
4c390ad update netif address change triggers to tpc & udp to work with IPv6, too
a1db05c Fix const argument warning in netif_ip6_addr_set
bf5866b tcp: Prevents a 0 sized (invalid) backlog
298ec34 set netif IPv6 address & state via function to implement change triggers (task #13517)
1ba0e17 ip6_addr: a valid address is either preferred or deprecated, no need to reserve 3 bits for that
43ddf6e Fix debug strings in ethernet_output
8426dfa Remove misleading comments from udp_send() and raw_send(). A pbuf may be added automatically in front of the chain to be able to send PBUF_REFs
6fc7f84 Minor: documentation updates
831b7fc Add note to pbuf_type about correct TX/RX type selection
d9b0236 Fix MDNS did not allocate TX packets from RAM but from POOL
e78bc41 Document ethernet level functions
c719c46 Remove SIZEOF_ETHARP_PACKET_TX #define, it is not needed any more after my last cleanups
3177819 Work on bug #48868: Cleanup etharp.c not to use struct eth_hdr: Cleanup etharp_input() to use ethernet_output()
6caa7b9 Cleanup etharp_arp_input() signature to match the sig of other input functions (pbuf, netif). Rename to etharp_input()
979bee3 Work on bug #48868: Cleanup etharp.c not to use struct eth_hdr: Cleanup etharp_raw() to use ethernet_output()
d2f52e1 Fix doxygen comment in ethernet.c
56dc574 Fix comment in pbuf layer description
e4c7410 fixed bug #47652: there is always a delay to send the first Neighbor Solicitation for the new add INCOMPLETE state neighbor entry
fd5b34a ip4_forward(): fixed compiling IP_FORWARD_ALLOW_TX_ON_RX_NETIF==1
306171c DHCP: fixed compiling LWIP_DHCP_BOOTP_FILE==1
d99d91d 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
fc54556 Code beautification in LWIP_HOOK_UNKNOWN_ETH_PROTOCOL usage
0d5eea2 Clarify LWIP_HOOK_UNKNOWN_ETH_PROTOCOL in opt.h
4456c7d Fix regression in etharp.c: Allocate correct pbuf layer
f170dde Work on bug #48824: ethernet.c extensions: Implement hook for unknown ethernet protocols
bae4d63 Fix some comments to reference ethernet_output now
18136c0 Work on bug #48824: ethernet.c extensions: Implement ethernet_output(); Fixes bug #48862: ethip6 does not support setting vlan
d9eaf6f docs: Remove link to example ports again, this should rather go to lwIP wiki...
42c1938 netbuf: Use memset to zero the allocated memory for netbuf_new
1c5c96a pbuf: Use SYS_ARCH_INC in pbuf_ref()
40f2bed mem: Simplify the code for try bigger pool in mem_malloc
21c99b6 Add documentation page about example lwIP ports. Start with FreeRTOS from Pavel Pisa.
a032cca mem: Fix trivial comment typo about using custom pools
4f4d162 minor: fixed typo
6b1e1af combine MAC filter actions for IGMP and MLD6 (IGMP has compatibility defines for old code, MLD6 filter functions must be adapted)
b3bae1b memp: Fix unused variable build error when MEMP_SANITY_REGION_BEFORE/AFTER is 0
730080f Fix doxygen comment in lwip/prot/igmp.h
a189941 make igmp/mld6 filter actions an enum and define them in netif.h where the callback function prototypes are defined
f93a6e3 Rename lwip/prot/arp.h to lwip/prot/etharp.h for consistence
5e36815 init.c: Implement check for correct implementation of struct packing in lwip port
01d8e50 Add missing include in prot/igmp.h
6688033 Move IGMP protocol struct to prot/igmp.h
ed566cc minor cleaup in (eth)arp
55d0509 simplify memp.c code a bit
0e9ef19 memp: Remove memp_overflow_init() function
fefb782 Apply fix by Marco Veeneman in SNMPv3: The outbound_padding is calculated wrong in snmp_complete_outbound_frame()
12609c9 Fix compile of SNMPv3 code with MSVC
64f79e7 PPP, PPPoE: Include netif/ethernet.h to fix build error
ebd1bf8 fixed typo :-(
4a7dafc fixed compiling mdns.c after moving things to mdns_priv.h
1e6f33d tcp: move tcp header flags definitions to 'prot'
96c3c48 mdns: moved private things into mdns_priv.h
14fb48c minor: whitespace cleanups
9725a49 moved 2 enums from 'prot' headers to where they belong (dns, dhcp)
967516a Add #include to netif/ethernet.h to netif/etharp.h to maintian compatibility
e844159 Fix warning in test_etharp.c
11386a2 Fix compile of DHCP unit test
8eb9db1 Reduce usage of netif/ethernet.h header, mostly lwip/prot/ethernet.h is sufficient
43d6812 IPv6 addr: clarify tentative count/LWIP_IPV6_DUP_DETECT_ATTEMPTS
7c0d952 Add explicit documentation page about reporting bugs
c4e3be8 Work on bug #48728: headers should cleanly separate API vs. implementation ARP
ad357a4 Work on bug #48728: headers should cleanly separate API vs. implementation ICMP
2d503f4 Work on bug #48728: headers should cleanly separate API vs. implementation ICMP6
5df8822 Fix compile of MDNS unit test with GCC
458211c Comment fixes in my last commits
84e139f Work on bug #48728: headers should cleanly separate API vs. implementation IP6
81c68f5 Work on bug #48728: headers should cleanly separate API vs. implementation MLD6
f299b4b Work on bug #48728: headers should cleanly separate API vs. implementation Ethernet
8d68400 Work on bug #48728: headers should cleanly separate API vs. implementation ND6
d89fa2d Work on bug #48728: headers should cleanly separate API vs. implementation UDP
1629312 Work on bug #48728: headers should cleanly separate API vs. implementation TCP
e24fde0 memp: Fix memp_overflow_check_element_overflow assertion
ef31afb memp: Fix build error when LWIP_HOOK_MEMP_AVAILABLE is defined
a8c8e08 Minor: cleanups in unit test code
97fae7e Code cleanup in autoip.c and dhcp.c
7f60cb3 Improve netif client data API for lwIP internal clients - these can use a compile-time constant to access their data now
ebf7959 Coding style fixes in netif.c
0c7a59b Minor: Documentation fixes
c9ad583 Minor documentation fixes
a262a2f MDNS: Add callback to be called manually when IP has changed to announce new IP
fa6a2d4 Fix DHCP unit test after my last changes
c62bfd8 Port AUTOIP to new netif client data API
1db9631 Port DHCP to new netif client data API
c8c8041 Fix possible NULL pointer dereference in mdns.c introduced in my last commit
ee815e4 Finish porting MDNS to new netif client data API
c28fb29 Introduce an API to store arbitrary data pointers in struct netif Let MDNS to use the new API TODO: AutoIP, DHCP
93b286e Also rename LWIP_MDNS to LWIP_MDNS_RESPONDER in unit tests...
2a90f33 MDNS responder: two functions can take struct mdns_host instead of netif as argument
efb7b3d Rename LWIP_MDNS to LWIP_MDNS_RESPONDER
02d51e3 Add missing file doxygen header in two mdns files
fec657b MDNS: Substitute a few strlens by sizeof()
858287f MDNS: Fix several MSVC warnings
af6b707 mdns_opts.h: Add missing include lwip/opt.h
ab72ed8 Fix options #include in mdns code
482a4d2 MDNS: Correct setting TTL when IGMP is not enabled
c61c8f3 Use udp_get_multicast_ttl/udp_set_multicast_ttl accessors where applicable
af48bec Update MDNS docs after porting to dual-stack API
39ac8e2 Remove some MDNS functions from documentation, they are only visible for unit tests
52449e1 Forgot to save before committing...
2335c1a Port MDNS to new dual-stack API
ebe0e6f Some documentation cosmetics in mdns.c
4d85def Update README applications sections
b472648 Fix wrong copyright header in mdns_opts.h
a2894ed MDNS: make a few arguments const where suitable
306113c Add MDNS to doxygen docs
4919932 Apply patch #8755: Multicast DNS responder support from Erik Ekman
4af297f PPP: fix don't print valid LCP echo request/reply packets if the link is up
4e1f8ef PPP: fix ppp_write internal documentation
5493220 Move DNS protocol structs to separate header. Needed for Erik Ekman's MDNS implementation.
ce6ea0d Convert SNMP snmp_vb_enumerator_err_t to a typedef and fix resulting compile error
6dcb2b2 Work on bug #48730: Enums should be used instead of multiple defines (where applicable)
36b9cae Fix compile of unit test
1325152 Strip path prefix in doxygen docs - no /home/dziegel/ in the future :-)
b34baff Convert state #defines in autoip.h and dhcp.h to enums. May be useful in *_state structs to simplify debugging in the future.
6f62fe5 ensure the 'prot' headers are as small & portable as possible
dc7340b started with bug #48728: move protocol definitions to 'include/prot/*.h' files (started with some IPv4 protocols)
d95ab51 netif:ppp: fix mempool build issues when PPP is enabled
bf3e8e6 minor coding style fixes in IPv6 code
3194c9c PPP: filter more packets in ppp_dump_packet
18fcc1d [PATCH] debug: Add braces around empty body in an 'if' statement
5c0944e Don't document tcp_send_empty_ack and tcp_keepalive - users should never need them
5a09fd3 Don't document ip4_route and ip6_route, users should use ip_route instead
0005b7c Revert my last change in sntp.c - allow usage of custom error values in err_t
6ba03d5 Activate TCP backlog in documentation
61dae47 Relete SNMP README and incorporate it's text in doxygen docs
85ab399 Fix a few incorrect uses of err_t. Found by converting lwip error codes to an enum, but I'm not sure wether I want to commit the actual enum conversion.
e5284ec Minor: documentation cosmetics
4b41ef5 Add note about Filelists.mk in UPGRADING document
a2fd680 minor: macros should not end with underscore(s)
1631307 tcp.c: Partly undo Simon's changes from today (repairs doxygen docs)
1033277 Remove tcp_accepted() from rawapi.txt. Thanks to Sergio Caprile for pointing this out!
fa568f7 Fix typos in docs
282b8a2 PPP: set disconnect state before closing link protocol in ppp_close
b1dfd00 Minor netif documentation update
eba6ae0 minor: add a comment about where to define LWIP_RAND()
219438f cleanup: move stdlib.h include to mem.c, where it belongs
e4c01a0 mem: Include stdlib.h to fix build warnings when MEM_LIBC_MALLOC is set
08378b7 Improve LWIP_EVENT_API compilation
fc66fb8 Fix compilation for LWIP_EVENT_API
fa8797b Fix PBUF_LINK_HLEN value in documentation
953dd5b PPP, PPPoE: remove useless checks
455a418 PPP, PPPoL2TP: cleanup connection state reset
1ea1026 PPP, PPPoE: cleanup connection state reset
09c22e1 PPP: close link protocol if LCP is not started in ppp_close
7c02a85 PPP, PPPoE: add support for disconnecting in link initiation state in disconnect callback
d15ebc6 PPP: don't restart LCP closing if termination is already in progress
f185104 PPP: revamp PPP state order
5811948 PPP: remove PPP_PHASE_MASTER conditions if multilink mode is disabled
dd0779c PPP, move VJ_SUPPORT disabling if LWIP_TCP is not enabled to PPP options
898e691 Minor: documentation fix
f55c0e7 Move rawapi.txt description to main page - this doc really should be found and read by users
3ca4eb5 Minor pbuf layer doc update
6af2137 Fix clang address sanitizer errors in unit tests (buffers too small)
0a7db8a PPP: remove double include for lwip/sys.h
0673fcd Fix mentioning functions that do not take pbufs as argument in pbuf layer docs
980a919 Don't document IP type specific output functions, users should use IP type independent ones
8d07629 Some documentation cleanups and include more comments that have been already in code into doxygen docs
cf66233 PBUF layer documentation clarification
b94c8ee Add some more functions and macros to documentation
73131b1 Fix doxygen warning in ip6.c
87855b0 Update doxgen docs: PBUF layers, IPv4 and IPv6 functions, add some missing tcp raw API functions
2acfa0e Update NO_SYS_SampleCode.c: Don't access heap in IRQ
a20cdc5 Fix comment in sample code
70ee63e Documentation: Add example code for NO_SYS use case
c2a5480 PPP: remove useless ppp_link_start function
01561b2 PPP: set phase to establish before starting LCP
9b47b63 PPP, PPPoE: remove useless PPPoE state conditions
e8d8c5d PPP, L2TP: remove useless L2TP state conditions
bae6791 PPP: fix dead phase set too early
5f77427 minor: tabs -> spaces
02221cf Rename IP_HDRINCL to LWIP_IP_HDRINCL
6383ef8 had a look through the docs...
dd11030 update some FILES list files
4c06a73 Add redirection page for HTML doxygen output so one does not have to search for index.html in the huge output/html directory
da83946 Add one more documentation sentence in tcp.c
3d379c9 IPv6 is NOT experimental any more :-)
git-subtree-dir: features/FEATURE_LWIP/lwip-interface/lwip
git-subtree-split: 10f93f4cf593f18932a7e575f7113a02a6b291e7
2017-02-21 12:26:01 +00:00
|
|
|
printf(" dns1 = %s\n", ipaddr_ntoa(ns));
|
2016-09-28 05:48:10 +00:00
|
|
|
ns = dns_getserver(1);
|
Squashed 'features/FEATURE_LWIP/lwip-interface/lwip/' changes from d7a6c6d..10f93f4
10f93f4 Renamed ethernet.h to lwip_ethernet.h
9cf30bb Renamed lwip source files
207d1a7 Merged branch 'mbed-os-lwip-stable-2_0_1' into prefixed branch.
e5071da Add MQTT to CHANGELOG (too late for 2.0.1 release...)
980b219 Put 2.0.1 version tag in UPGRADING document
76b4365 Remove duplicate netif_dhcp_data() macro
a5a4830 Set lwIP version to 2.0.1 RELEASE
1a2a9a4 Merge branch 'master' into STABLE-2_0_0
3a20ae3 Add missing #include in netdb.c for atoi()
0ffacca Add missing #include in httpd.c for atoi()
e94c9ff Fix warning about bad cast in pbuf_skip()
72316bd Move macros to access DHCP and AUTOIP data to headers, users may want to access the members
803a711 Fix warning that local variable may be used uninitialized in mem.c
8760fb6 fixed warnings in mdns unit tests
d2631e6 mqtt: Fix pedantic enum warning
4059748 I was not satisfied with the previous debugging options structure. Improve it again.
644a21b Improve debugging options documentation
a387631 Add debugging options to documentation
e3c2b8a Add note about high resource-consumption in LWIP_PLATFORM_DIAG and LWIP_PLATFORM_ASSERT default implementations
e12bb2a Fix comma at end of enum list in mqtt.h
2096f1a Fix C++ style comment in mqtt.c
1f3c18f tcp: Make tcp_listen_with_backlog_and_err return NULL if the address/port is already used
edfeab7 mqtt: Trivial coding style fix
b8bc7b7 arch.h: Add #includes necessary for default implentation of LWIP_PLATFORM_DIAG and LWIP_PLATFORM_ASSERT
f874d15 Add #include <string.h> in snmp_netconn.c because memset() is used
ee034bd Document PACK_STRUCT_USE_INCLUDES #define
a2a16d4 nd6 rdnss: fixed dual-stack compilation
98fc82f added function tcp_listen_with_backlog_and_err() to get the error reason when listening fails (bug #49861)
1884c7e Fix TCP unit tests after changes from "Add hook for TCP Initial Sequence Number generation" commit (pcb->lastack and friends are not initialized during allocation any more, but by connect() / bind() call)
1466b7a Several mqtt documentation fixes found by clang
748e2e9 Create documentation section "porting" and move it under lwIP section (instead of infrastructure)
1fd69dd Minor documentation update in def.c
3a8368e Provide struct packing macros on GCC/clang out of the box
c1258e5 Compile fix in lwip/arch.h "extra tokens at end of #ifndef directive"
211a71c Minor documentation update in lwip/arch.h
55199fc More documentation updates in lwip/arch.h
45ad6f2 Minor documentation updates in lwip/arch.h
df365ad Trivial typo fix in arch.h docs
7b40d1e doc: mqtt_client: Update example code after adding port parameter to mqtt_client_connect()
c1d16c6 Forgot documentation on MQTT port #define
83b1c39 Add #define with default MQTT port for convenience
bfa0358 mqtt: Allow setting server port to connect
2e4b368 Revert "Fix bug #49914: lwip_sendmsg uses PBUF_REF pbufs"
4e34851 Fix bug #49914: lwip_sendmsg uses PBUF_REF pbufs Use PBUF_RAM and create private copy of the data
3a557ba Move a few MQTT options from mqtt.c to mqtt_opts.h
6e219b6 Change signature of mqtt_client_connect() to take an IP addr instead of a string
ec1450b Add mqtt documentation from Erik Anderson, rev 4b84fff
5be91de mqtt: Trivial error message fix
24fa1c4 opt.h: provide some hints regarding MLD settings
71810d0 ipv6: adjust MLD membership on address state changes
d5bc856 mqtt: Check conn_state before create request for sub_unsub
8767205 Update .gitignore once more for fuzz test
dd96c71 Fix a few -Wconversion warnings (there are many more to do)
be57134 Fixed bug #49895: Incorrect configuration detection in lwip/dns.h
16b895b Undo removal of mqtt_publish() from documentation in Simon's last commit (guess it was by accident)
dcb7616 Minor documentation fix in MQTT
02f4610 mqtt: Use LWIP_ARRAYSIZE to replace hardcoded value
b6a131e mqtt: fix C usage (declaration after statement), fix casting to smaller type
12bc2c0 MQTT cleanups: - create mqtt_opts.h file and move options in there - documentation cleanups
14e3686 Some cleanups in MQTT client Integrate in documentation Compile fixes, mostly: Variables must be declared before any statement in a function
1e82465 task #14281: Add MQTT client Thanks to Erik Andersen Taken from https://github.com/erian747/, branch mqtt, rev 5d59470
fb07d47 more LWIP_NOASSERT fixes
c717332 Fix compiling with LWIP_NOASSERT (and debug/error disabled, too)
e0c0ba7 Fix compile with LWIP_NOASSERT Pointed out by Nirav Desai
7f319f5 Fix compile of test_tcp.c unit test after introduction of tcp_next_iss hook
c21763f Minor code cleanup api_lib.c
f488c5b igmp: Fix optimized code for igmp_remove_group
5c1dd6a Optimization in igmp_remove_group() pointed out by Axel Lin No need to handle special case "first in list" since this is always the allsystems group that shall not be removed
102a50f Fix bug #39145: IGMP membership report for 224.0.0.1 Ensure allsystems group is always first in linked list
bb8088d Minor cleanup of FUZZ test Makefile
11780f0 Fixup Makefile of FUZZ test after moving to main lwIP rep
cceea73 bug #49631: handle zero-window probe and refused_data
fcd2daf fixed race condition in return value of netconn_gethostbyname() (and thus also lwip_gethostbyname/_r() and lwip_getaddrinfo())
b5f51db ND6: Don't misuse ip6_current_dest_addr() to create an aligned copy of an IPv6 address We never know what side effect in application code this could trigger...
d9f461e Fixed #49848 (Non-blocking socket emit a sock error while read return EWOULDBLOCK) especially for EWOULDBLOCK (added task #14275 for the general problem)
c13a43e added note about afl-fuzz requiring linux
844c201 added fuzz tests (moved from contrib/ports/unix/fuzz to get them to a more prominent place, even if afl-fuzz still needs *nix to run)
62e3400 LWIP_HOOK_TCP_ISN: added CHANGELOG/fixed comment
a8b986b Add hook for TCP Initial Sequence Number generation
da15132 Make nd6_new_router() handle already existing routers (this is a special case for 2 netifs on the same subnet - e.g. wifi and cable) see bug #46506
e3925cc nd6: Fix build error if LWIP_ND6_RDNSS_MAX_DNS_SERVERS == 0
6b1950e nd6: add support for RDNSS option (as per RFC 6106)
4e3cf61 opt.h: added LWIP_DHCP_MAX_DNS_SERVERS to configure the maximum number of DNS servers configured from dhcp.c(v4) (if any; guarded with LWIP_DNS)
53b9f2a dhcp: covert DHCP_OPTION_IDX_* from defines to enum (mainly to ease offset calculation)
cd5dfa2 nd6: minor 'static' consistency fix
bd1defc added forgoten new file nd6_priv.h :-(
281ef5d minor: fixed errors in some defined __DOXYGEN__ guards
e8461f9 minor: corrected include guard name in tcp_priv.h
60cd25c Moved nd6 implementation details to new file nd6_priv.h (possible after David's cleanups)
4c16ea9 Minor: nd6_packet_send_check() -> nd6_get_next_hop_addr_or_queue() (too long, but a little more self-explaining); cosmetics...
69a7039 nd6: centralize link-local packet send decision
06ff89c nd6: use default_router_list internally only
cee59ba nd6: add nd6_clear_destination_cache() function
d4fad59 nd6_input(): allow using NA without lladdr_opt for DAD
1a53c10 CHANGELOG: added LWIP_HOOK_ND6_GET_GW()
7d119fd nd6: add LWIP_HOOK_ND6_GET_GW hook
74a5537 Revert "Added LWIP_HOOK_ETHIP6_GET_GW()"
afb2160 Add a check for correct implementation of LWIP_CONST_CAST() to lwip_init()
002e077 ethip6: forward correct error code
9d199a6 netif_create_ip6_linklocal_address(): use macros to assign address state to ensure callbacks are triggered; netif_add_ip6_address(): only overwrite invalid addresses, not tentative addresses
86b01e4 Added LWIP_HOOK_ETHIP6_GET_GW()
1c184da Update changelog for LWIP_NETIF_TX_SINGLE_PBUF
e5f9f18 Continue to fix incorrect casts via size_t for some platforms Now also for casts: - to remove alignment warnings - casts between pointers and ints
f2a5aa2 Fix bug #49827: wrong cast to size_t on 16-bit x86 architecture I hope I caught all of them. TODO: Same for casts to get rid of alignment warnings, these are also casts via size_t
7a1b38d Minor: Save an #ifdef in ip4_frag.c
26e02e8 Fix bug #48963: ip6_frag does not support LWIP_NETIF_TX_SINGLE_PBUF Implemented.
8347d3b Try to fix compile warning with GCC under Linux ("large integer implicitly truncated to unsigned type")
a83c4e0 PPP: fix build warning on wrong cast from void* to unsigned long
ac4d994 mdns.c: use group initializer constants from prot/dns.h
f308694 Revert "mdns.c: use constants from dns.h/.c"
0e883bb mdns.c: use constants from dns.h/.c
5774fdf dns: added one-shot multicast DNS queries
85817e7 Minor documentation update about IP_ADDR_ANY
a2ad9d3 Improve documentation: Refer to compiler/platform abstraction in NO_SYS mode description
33bdf9f Doxygen: Fix project description text
55fd567 Adapt doxygen docs version number
b359b8c Minor documentation improvement
bb6df52 Fix doxygen parsing in my last commit
8a9ab99 Improve documentation: add compiler abstraction macros to doxygen docs
a420d25 arch.h: Add hint for struct packing #defines on GCC/clang
89cb7b7 Try to remove #include <stdlib.h> from many files. Does not seem necessary any more and might cause problems when porting lwIP.
9c3bbcf removed old disabled code
f446194 pppos.c: Use arch.h to get size_t instead of including stddef.h
1dd563a arch.h: Implement possibility to provide own header for size_t, default is stddef.h
aae0fc4 Use new IPv6 init macro in netif.c
5bb8330 Add macro to init an IPv6 address with U32 in host byte order
0ca82df Cleanup byte order handling a bit. - Create LWIP_MAKEU32(a,b,c,d) to create an U32 value from bytes - Use PP_HTONL() in some macros to emphasize network byte order conversion
ff3656f Added improved macros for ip address initialization: IPADDR4_INIT_BYTES(), IPADDR6_INIT_HOST() and IP4_ADDR_MAKEU32()
b31b0c8 remove bogus LWIP_MAKE_U16() define and use PP_NTOHS() in ip4.c instead
c878554 DNS: added compile-time check for some defines to fit into an u8_t (bug #49658)
e00a131 Fix bug #49778: sntp_stop does not cancel all timers Patch by Ari Suutari
cb29a49 Update CHANGELOG
795acf0 lwiperf: Simplify #if LWIPERF_CHECK_RX_DATA guard
cc25c26 Cleanup: move struct ip6_addr_packed and ip6_addr_p_t type to prot/ip6.h - these types are used in prot/ip6.h and prot/mld6.h
1687721 Fix compile when IPv4 is disabled
a6bc422 Move declaration of struct ip4_addr_packed and ip4_addr_p_t to prot/ip4.h The types are used in structs declared in ip4.h.
92183bb icmp: Increment mib2.icmpintimeexcds counter if got ICMP_TE
bcaf2f0 PPP, PPPoS: fix memory leak when disconnecting if there are remaining input bytes
4bbed75 Minor code layout cleanup in err.c and errno.h
7d0aeaf Doc: correct minor mis-spelling in sys_arch.txt
f28e63b Add netifapi macros for set link up/down
7f48289 Increment ip.drop when dropping due to NULL netif
12e35c4 mdns: Fix assertion message in mdns_resp_add_service_txtitem()
182d7c1 Add #include <stddef.h> to a central place (arch.h) instead of #including it in several other files throughout lwip since size_t is needed in many places See http://lwip.100.n7.nabble.com/Issue-in-arch-h-for-lwIP-2-0-0-td27948.html
47fd67a Remove TODO comments and one check from sockets.c indicating IPV6_V6ONLY socket option handling does not work
b934c3f fixed bug #49726: setsockopt() set TCP_NODELAY TCP_KEEPALIVE ... with a listen state TCP will crash
2a882b6 minor: fixed indent
ca9342c fixed bug #49725 (send-timeout: netwonn_write() can return ERR_OK without all bytes being written)
6f1304e patch by Ambroz Bizjak: fixed bug #49717 (window size in received SYN and SYN-ACK assumed scaled)
cac3dc8 netif: Trivial indent fix
aea8724 Fix naming of some inet_addr_* macros in inet.h From inet4_addr_* to inet_addr_* - inet_addr is a "known word", don't change it
1d4cbe7 netif: Add proper lock protect for accessing netif->loop_first
0e07ed4 fixed bug #49676 (Possible endless loop when parsing dhcp options) & added unit test for that
2ed7557 doxygen/generate.sh: Add shebang line
f419231 fixed typo in CHANGELOG
8ba7363 Optimize passing contiguous nocopy buffers to tcp_write
4c8620e Added important post-2.0.0 changes to CHANGELOG to keep track of changes for future 2.0.1 release
eb1de78 prepare CHANGELOG for post-2.0.0
5030fa8 bug #49684, api_msg: treat non-blocking ERR_MEM as ERR_WOULDBLOCK
0f87cb9 Add note about UDP multicast behavior fix to UPGRADING document
0954783 Fix bug #49662: UDP layer should filter incoming multicast datagrams against the bound IP address Change lwIP UDP API to match socket behavior. 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.
8c3c96b PPP, L2TP: fix PPPOL2TP_AUTH_SUPPORT == 0 support
03a9aac dns_enqueue(): minor readability improvement: add local variable "age" to store result of subtraction
68ec20f ipv4/ipv6: restrict loopback-destined traffic
4076b12 Revert "Apply patch #9165: Allowing udp src port to be 0 in cases when we don't care about outgoing port"
0034abf Always check whether netif_default is NULL
31b0237 Apply patch #9165: Allowing udp src port to be 0 in cases when we don't care about outgoing port
9366c0e I decided to keep the "complexity" of handling IPv6 mapped IPv4 addresses out of netconn API. Only socket API understands this address type now.
5d5eeca Once more: Try fix compile with clang
4b7e0f5 Fix indent in api_lib.c
44e430e Fix compile with MSVC 2010 and remove handling for IP6_ADDR_ANY in netconn_connect() - IP6_ADDR_ANY does not make sense in connect()
180ba72 Dual-stack: Use IPv6 mapped IPv4 addresses in receive() and getaddr() only in socket API, not in netconn API. It is better to present correct IP types in netconn API. Netconn API now accepts IPv6 mapped IPv4 addresses as well as IPv6 and IPv4 in send(), bind() and connect(), but does NOT map IPv4 to IPv6 mapped IPv4 in getaddr() and receive() functions.
792224e Try to fix compile error with clang (found by Erik's Travis-CI)
e8e853f Move ICMP6 protocol constants to include/lwip/prot/icmp6
80a24c0 raw, udp, tcp connect() does NOT need to match exact IP type - when PCB is bound to IPADDR_ANY_TYPE, it is OK to connect to IPv4 or IPv6 This should finally implement task #14187: Dual Stack sendto with socket APIs
d026a39 Dual-stack fixes in raw/udp/tcp bind() may change IP type when previous type is IPADDR_TYPE_ANY connect() IP type must exactly match bind IP type Use correct IPADDRx_ANY type when calling ip_route()
1712b06 Work on dual-stack netconn IPv6 netconns are created as IPADDR_TYPE_ANY raw/udp/tcp PCBs internally bind, connect and sendto now accept IPv6 mapped IPv4 addresses or IPv4 addresses as argument getaddr and receive functions now return IPv6 mapped IPv4 addresses instead of IPv4 addresses This behavior is close to BSD socket API
010f355 Cleanup macro parameter names
b70ddf7 Cleanup unmap_ipv6_mapped_ipv4() macro
1dd97e7 sockets.c, lwip_sendto(): Remove check whether IP address matches socket type. Is checked in lower layers anyway.
2f37dc0 api_msg.c: Partly add support for IPv6 mapped IPv4 addresses - lwip_netconn_do_getaddr(): Convert IPv4 addresses to IPv6 mapped IPv4 addresses - lwip_netconn_do_send(): Support IPv6 mapped IPv4 addresses - Not done: connect(), bind()
c1eb6d8 Minor: Add macros to map/unmap IPv6 mapped IPv4 addresses
ad17f34 mdns: Use strlen to determine string length of strings contained in a struct - padding seems to be applied to these strings, and sizeof() returns the _padded_ size??? Found by compiling with CLANG with address sanitizer enabled
ee7a2f3 inet.h: Consistently name some inet <-> ipaddr conversion macros They operate on ip4_addr_t, not on ip_addr_t This should be clearly visible in their names
b99b757 memp.c: Only check for overflow/underflow if an element could be allocated In other words: Don't dereference NULL pointers
f79eabd bug #49533: start persist timer when unsent seg can't fit in window
81a32e9 Fixed bug #49610: Sometimes, autoIP fails to reuse the same address
6dc3a21 WND_SCALE: duplicate define check & doc cleanup
f965034 Fix inconsistent return value in udp_sendto_if() - ERR_RTE should always be returned when there is no available route
fdcd8f6 Fix bug #49578: lwip_socket_drop_registered_memberships API may not work with LWIP_SOCKET_OFFSET
b90682d Update email address
b9dc415 master: Set version to 2.0.1
216bf89 Set version to 2.0.0 release
a68eddb Merge branch 'master' into STABLE-2_0_0
d5dd524 dhcp: Use DHCP_MAX_MSG_LEN_MIN_REQUIRED instead of hard-coded value
c4eb52d PPP: set protocol_list[] const
1e6c4ac PPP, IPCP: check that the peer is allowed to use the IP address it wants
b978d17 PPP, IPCP: remove obvious FIXME
dde55c6 PPP, IPCP: fix reset state before reconnecting
5d22679 Use API function instead of accessing struct members directly
132dafa Correct macro parentheses in tcpip_priv.h
54d76ff Remove superfluous local variable in raw.c
b6f32ca Fix inet_addr_to_ipaddr_p() macro
1c9e603 netif: fix reset of IPv6 addresses in netif_add()
1a7ba24 memp: Fix memp_overflow_check_all failure
d4384cf Sockets: check external FD_SETSIZE against number of sockets
a82ec44 memp: Check for null in memp_free
7d8989e TCP documentation: fix tcp_pbuf_prealloc typo
5079e45 Document non-standard functions in sys abstraction layer
e040132 PPP, documentation: Fix example code
7602812 mld6: fix conditional checksumming
20fde0b ip4_frag: Use LWIP_MIN instead of open-coded
67895e7 Fixup new IPv4 fragmentation code - thanks to Zach Smith
801f26e Minor documentation update
4dffe52 api_msg.c: Trivial code cleanup
f5f8ab5 Fix bug #49328: Crash error in ip6_frag due to Assertion Fail
e3a9f01 Implement task #14180: IPv6 code should not reuse ip6_current_dest_addr() as temporary storage
37d5691 Fix bug #49321: error.h missing opening "#ifdef __cplusplus" Reported by Martin Kortmann
725feb0 mdns: Use netif_get/set_client_data helpers
6edde49 pbuf_copy: try to fix GCC const warning
d5bfec2 ip4_frag: restore "lwip_ntohs" after last change
576f49e Fixed bug #46467: ip_frag() shouldn't modify pbuf in case of a retransmission
697be5c Make some pbuf functions take const pbuf pointers
c9cfbe2 tcp_out: Remove misleading comment in tcp_pbuf_prealloc()
0a34394 Fix netconn/socket race condition when receiving RST while waiting on recvmbox
ed239c4 Apply patch #9139: Invalid format string in dhcp.c by Thomas Mueller
695c817 Minor: Fix comment in etharp.c
f6e2794 Make lwIP compile with clang -Wdocumentation -> several documentation fixes
9cd555c Minor: documentation typo fix
4e74ae4 Minor: documentation updates
5477aa5 Minor: Documentation update
70ccea9 Make sys_restart_timeouts public also for !NO_SYS targets
69be49f Try to fix !defined(LWIP_PROVIDE_ERRNO)
740182d err: Fixup error code range checking in err_to_errno
ad3530e One more compile fix in err.c
86a9254 Try to fix unix build after Simon's errno changes (need sys_arch.h)
2afc2a5 Fix comment on sys_mbox_new() (bug #49279)
a1c0a01 bug #48823: posix errors should be removed from arch.h (to new file 'lwip/errno.h')
0541991 def.h: Provide hton* / ntoh* functions to users by default for compatibility (can be turned off) Add note to UPGRADING document
13fb616 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>
0c06073 Avoid code duplication in def.c
50e09cc Add note about new abstactions for itoa(), strnicmp(), stricmp() and strnstr() to UPGRADING document
fa21109 Fix macro name clash with windows headers in TFTP server Reported by Gisle Vanem
87172d6 mdns: Use NETIF_TO_HOST at appropriate places
60a507f ETHARP_TABLE_MATCH_NETIF is also used in the etharp_output shortcut
0d7805a tcp: fix FIN ACK handling with unsent data
9ba9dee tcp: advance next seq nr for zero window probes
95754ba Another try to fix bug #49264: Crash Error when LWIP_SOCKET_OFFSET is in use
bef7873 ND6: Always set neighbor_cache.state together with counter value to avoid inconsistency
ec236da Add comment for my last changes
ee27daf Fix bug #48876: nd6: timers should be in ticks, not ms delay_time and stale_time are ticks now. reachable_time and invalidation_timer are untouched since they may originate from telegram values -> not converting them to ticks avoids an integer division
cdc97d2 Correctly fix bug #49209: netconn_drain() fails to handle 'netconn_aborted' pointer
d9c6bad Revert "Fixed bug #49209: netconn_drain() fails to handle 'netconn_aborted' pointer"
30251b1 Fix bug #49264: Crash Error when LWIP_SOCKET_OFFSET is in use Handle LWIP_SOCKET_OFFSET in lwip_socket_drop_registered_memberships, lwip_socket_unregister_membership and lwip_socket_register_membership.
d1ed89b Fix accidental TAB in tftp_server.h
8154957 Fix compile of TFTP with MSVC
f868349 TFTP: Add missing newline at end of file
1e5efee TFTP server depends on UDP
b040544 task #14150: Add TFTP server from Logan Gunthorpe Originally written by Logan Gunthorpe, modifications/fixes/IPv6 by Dirk Ziegelmeier
eb77c83 Minor: comment in pbuf.c
5e15125 igmp: Fix optimized code by always skipping the first entry in the linked groups list
8f8f569 Fix bug #47731: IGMP state transition missing Set state variable according to RFC 2236 on timeout in delaying member state
b33070e Add documentation for bug #49139: IGMP "All Systems" vs MLD "All Nodes" inconsistency
8c52afb igmp: Optimize code by always skipping the first entry in the linked groups list - it is always the "allsystems" entry
df5a799 Fix bug #48886: raw pcbs are not handled on netif address change
d7f8d33 Minor: update NO_SYS_SampleCode.c for IPv6
db9c866 Minor: Documentation update
149701b Fix bug #49218: pbuf_clen() overflow as a result of tcp_write concatenation Let pbuf_clen() return u16_t
682b82a Improve documentation: Some words about multiple execution contexts in lwIP
65796cd "Fix" bug #49078: lwip cannot establish ipv6 connection, because of failed to fill ipv6 source address in Neighbor Solicitation Message by adding a note to netif_add not to forget to create a link-local IPv6 address
4084626 Add comment about possible definitions for non-standard functions
af04864 Remove non-standard strnlen() call in snmp_msg.c
5ddd2ae Substitute custom itoa implementation mdns by lwip_itoa() and strlen() call
17e6c9d Add #include <string.h> in def.c since lwip_strnstr uses strlen and strcmp
0e7f48d Fix compile of new functions in def.c - I accidentally put them in a #ifdef section Thanks to Daniel Elstner
461b353 httpd.c: add missing default in case statement
4144d54 Fix implementation of lwip_itoa to take more parameters
837b7b3 Fix comment in my last commit
1f68b32 Cleanup handling of non-standard functions in lwIP - itoa - strnicmp, stricmp/strcasecmp - strnstr Related to patch #9115: httpd.c: strcasecmp for GCC and stricmp for Windows
f8d19e2 Minor: Documentation updates
f3cec74 mdns: Use macro to get mdns_host from netif v2
87e8150 mdns: Use macro to get mdns_host from netif
7849898 mdns: Update error message after argument type changed
633696c Implement consistent IPx_ADDR_ANYx macro naming between IPv4 and IPv6 - rename IP4_ADDR_ANY to IP4_ADDR_ANY4 - IP4_ADDR_ANY (= IP_ADDR_ANY) is now IPv4 any address in ip_addr_t format
0e2354e Fixed bug #49209: netconn_drain() fails to handle 'netconn_aborted' pointer
5d811d7 Minor: Documentation updates
6abcd00 Convert IP address type numbers to an enum to improve documentation
97b774c Minor: Documentation updates
2f085aa ND6: Join/leave groups directly on the netif
354e385 Fix infinite loop in new MLD6 code
c7c6b7c Rework IGMP and MLD6 code to store group info per-netif. Reasoning: - Makes code in single-netif case perform better and smaller - IGMP / MLD6 code is a little bit easier to read and understand - Easier to get multicast groups per netif when implementing drivers
c25de8f Update comment in MDNS and pbuf.c
c9bae5e Fix bug #49134: Do not announce invalid IPv4 address via mDNS
dbd847b Fix bugfix for bug #49136: No SNMPv2 SetRequest response when OID does not exist Last commit broke SNMPv1 answers
19e2780 Fix bug #49136: No SNMPv2 SetRequest response when OID does not exist
eb3a083 Improve my last docs
470dae6 Documentation: Add example for zero-copy RX using custom PBUF
22907c7 bug #74921: check prefix_length, not length
623f9ce Remove one debug message from Daniel's patch
4d4710d Bug #49125 addendum: Remove group from list before callback
2facd2d Apply modified patch from Daniel Elstner to fix bug #49124: mDNS should not use snprintf()
ee4cd45 Fix bug #49125: Need a way to iterate multicast groups for MAC filtering -> let list heads be a public symbol
58c8e0f Implement request by Marco Veeneman: Make snmp_send_trap() public
8dbd1ab Minor coding style fixes while reading SNMP code
ef0dc65 Fix GCC warning "invalid suffix on literal; C++11 requires a space between literal and string macro" in arch.h. Pointed out by Thomas Nittel.
8cd43a3 Documentation: Add one more note PCB is already freed in tcp_err callback.
4a73bcb mdns: Revert answer count patch
f38705c mdns: Update answers counter in mdns_add_answer rather than each caller
b7c2553 bug #48964: Make PBUF_POOL sanity checks contingent on PBUF_POOL_SIZE
f8a95aa dns: Drop unnecessary txid variable in dns_check_entry
d66442b Fix compile when TCP, UDP and RAW are disabled
aeae4e9 Fix compile when UDP is disabled
34682fa Remove ip4_frag IP_FRAG_USES_STATIC_BUF code: nearly the same as the other code, but IP_FRAG_USES_STATIC_BUF doesn't work when queuing pbufs
ac6b64c Implement a more readable fix for pbuf_memcmp than my last fix
b944ceb Fix compile when LWIP_NUM_NETIF_CLIENT_DATA == 0 and AUTOIP or DHCP are enabled
ab8a1a0 netbuf: Fixup a copule LWIP_ERROR messages
4325aca Fix pbuf_memcmp() implementation by using pbuf_try_get_at() instead of pbuf_get_at(). Payload out-of-bounds access was not handled correctly.
23147b0 added more out of range checks to dns_recv() (see bug #48924)
9078f31 Minor: memcpy -> MEMCPY / SMEMCPY
a08ed91 added pbuf_try_get_at() (much like pbuf_get_at() but can return out-of-pbuf error)
8d45162 Fix usage of uninitialized data in dhcp.c by checking pbuf_copy_partial() return value
f5135b0 Minor coding style fixes in mdns.c
2137f49 Fix usage of uninitialized data in nd6.c because of unchecked pbuf_copy_partial() return value
aef3d2c Minor coding style fix in pbuf.c
840d1e6 Fix bug #48924: Potential out of bound reads in DNS codes of lwip project by adding checks for pbuf_copy_partial() return values. Add some comments to clarify handling of untrusted network data handling.
198fa5d Remove duplicated include for lwip/inet_chksum.h
ef827e8 apps/mdns: Fixup LWIP_ERROR message in mdns_build_host_domain
e545262 Remove superfluous parameter from mdns_domain_debug_print()
fb62e93 Fix wrong sizeof() and remove superfluous NULL pointer check in MDNS
db6aa82 memp: Fix comment for memp_overflow_check_element_overflow/underflow
c9dff6b Correct TCP_OOSEQ_MAX_* opt.h documentation
4b45bae Add some dual-stack notes to documentation
05a6d82 Let comment in pbuf.h be consistent with provided example function
0d510dd Add API macros for netif client data handling and update documentation accordingly
537bd83 Minor: More documentation updates
57468b8 Minor: Several documentation updates
452f5d6 fix tcpip.c for LWIP_TIMERS==0
2980a12 Fix ntohs -> htons in ethernet.c
89aa4e7 fixed bug #47921: link-local prefix in router advertisement must not be processes for SLAAC (patch by abhishek ambure)
3e23eb7 fixed compiling TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS (local variable 'p' was hidden)
aeb3834 Add debug assert to my last commit and improve comment in opt.h
475d494 Fix handling of LWIP_HOOK_VLAN_SET(). Previous implementation supplied uninitialized arguments to the macro (struct eth_hdr). Change macro signature to be universal: netif, pbuf, src, dst, eth_type - whatever the user needs to decide about VLAN header. Return value <0 means "no VLAN header", 0 <= return_value <= 0xFFFF -> value is prio_vid of header. Clean up ethernet_output function to be more readable.
a2ca85a tcp: Make tcp_state_str/tcp_backoff/tcp_persist_backoff static
4c390ad update netif address change triggers to tpc & udp to work with IPv6, too
a1db05c Fix const argument warning in netif_ip6_addr_set
bf5866b tcp: Prevents a 0 sized (invalid) backlog
298ec34 set netif IPv6 address & state via function to implement change triggers (task #13517)
1ba0e17 ip6_addr: a valid address is either preferred or deprecated, no need to reserve 3 bits for that
43ddf6e Fix debug strings in ethernet_output
8426dfa Remove misleading comments from udp_send() and raw_send(). A pbuf may be added automatically in front of the chain to be able to send PBUF_REFs
6fc7f84 Minor: documentation updates
831b7fc Add note to pbuf_type about correct TX/RX type selection
d9b0236 Fix MDNS did not allocate TX packets from RAM but from POOL
e78bc41 Document ethernet level functions
c719c46 Remove SIZEOF_ETHARP_PACKET_TX #define, it is not needed any more after my last cleanups
3177819 Work on bug #48868: Cleanup etharp.c not to use struct eth_hdr: Cleanup etharp_input() to use ethernet_output()
6caa7b9 Cleanup etharp_arp_input() signature to match the sig of other input functions (pbuf, netif). Rename to etharp_input()
979bee3 Work on bug #48868: Cleanup etharp.c not to use struct eth_hdr: Cleanup etharp_raw() to use ethernet_output()
d2f52e1 Fix doxygen comment in ethernet.c
56dc574 Fix comment in pbuf layer description
e4c7410 fixed bug #47652: there is always a delay to send the first Neighbor Solicitation for the new add INCOMPLETE state neighbor entry
fd5b34a ip4_forward(): fixed compiling IP_FORWARD_ALLOW_TX_ON_RX_NETIF==1
306171c DHCP: fixed compiling LWIP_DHCP_BOOTP_FILE==1
d99d91d 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
fc54556 Code beautification in LWIP_HOOK_UNKNOWN_ETH_PROTOCOL usage
0d5eea2 Clarify LWIP_HOOK_UNKNOWN_ETH_PROTOCOL in opt.h
4456c7d Fix regression in etharp.c: Allocate correct pbuf layer
f170dde Work on bug #48824: ethernet.c extensions: Implement hook for unknown ethernet protocols
bae4d63 Fix some comments to reference ethernet_output now
18136c0 Work on bug #48824: ethernet.c extensions: Implement ethernet_output(); Fixes bug #48862: ethip6 does not support setting vlan
d9eaf6f docs: Remove link to example ports again, this should rather go to lwIP wiki...
42c1938 netbuf: Use memset to zero the allocated memory for netbuf_new
1c5c96a pbuf: Use SYS_ARCH_INC in pbuf_ref()
40f2bed mem: Simplify the code for try bigger pool in mem_malloc
21c99b6 Add documentation page about example lwIP ports. Start with FreeRTOS from Pavel Pisa.
a032cca mem: Fix trivial comment typo about using custom pools
4f4d162 minor: fixed typo
6b1e1af combine MAC filter actions for IGMP and MLD6 (IGMP has compatibility defines for old code, MLD6 filter functions must be adapted)
b3bae1b memp: Fix unused variable build error when MEMP_SANITY_REGION_BEFORE/AFTER is 0
730080f Fix doxygen comment in lwip/prot/igmp.h
a189941 make igmp/mld6 filter actions an enum and define them in netif.h where the callback function prototypes are defined
f93a6e3 Rename lwip/prot/arp.h to lwip/prot/etharp.h for consistence
5e36815 init.c: Implement check for correct implementation of struct packing in lwip port
01d8e50 Add missing include in prot/igmp.h
6688033 Move IGMP protocol struct to prot/igmp.h
ed566cc minor cleaup in (eth)arp
55d0509 simplify memp.c code a bit
0e9ef19 memp: Remove memp_overflow_init() function
fefb782 Apply fix by Marco Veeneman in SNMPv3: The outbound_padding is calculated wrong in snmp_complete_outbound_frame()
12609c9 Fix compile of SNMPv3 code with MSVC
64f79e7 PPP, PPPoE: Include netif/ethernet.h to fix build error
ebd1bf8 fixed typo :-(
4a7dafc fixed compiling mdns.c after moving things to mdns_priv.h
1e6f33d tcp: move tcp header flags definitions to 'prot'
96c3c48 mdns: moved private things into mdns_priv.h
14fb48c minor: whitespace cleanups
9725a49 moved 2 enums from 'prot' headers to where they belong (dns, dhcp)
967516a Add #include to netif/ethernet.h to netif/etharp.h to maintian compatibility
e844159 Fix warning in test_etharp.c
11386a2 Fix compile of DHCP unit test
8eb9db1 Reduce usage of netif/ethernet.h header, mostly lwip/prot/ethernet.h is sufficient
43d6812 IPv6 addr: clarify tentative count/LWIP_IPV6_DUP_DETECT_ATTEMPTS
7c0d952 Add explicit documentation page about reporting bugs
c4e3be8 Work on bug #48728: headers should cleanly separate API vs. implementation ARP
ad357a4 Work on bug #48728: headers should cleanly separate API vs. implementation ICMP
2d503f4 Work on bug #48728: headers should cleanly separate API vs. implementation ICMP6
5df8822 Fix compile of MDNS unit test with GCC
458211c Comment fixes in my last commits
84e139f Work on bug #48728: headers should cleanly separate API vs. implementation IP6
81c68f5 Work on bug #48728: headers should cleanly separate API vs. implementation MLD6
f299b4b Work on bug #48728: headers should cleanly separate API vs. implementation Ethernet
8d68400 Work on bug #48728: headers should cleanly separate API vs. implementation ND6
d89fa2d Work on bug #48728: headers should cleanly separate API vs. implementation UDP
1629312 Work on bug #48728: headers should cleanly separate API vs. implementation TCP
e24fde0 memp: Fix memp_overflow_check_element_overflow assertion
ef31afb memp: Fix build error when LWIP_HOOK_MEMP_AVAILABLE is defined
a8c8e08 Minor: cleanups in unit test code
97fae7e Code cleanup in autoip.c and dhcp.c
7f60cb3 Improve netif client data API for lwIP internal clients - these can use a compile-time constant to access their data now
ebf7959 Coding style fixes in netif.c
0c7a59b Minor: Documentation fixes
c9ad583 Minor documentation fixes
a262a2f MDNS: Add callback to be called manually when IP has changed to announce new IP
fa6a2d4 Fix DHCP unit test after my last changes
c62bfd8 Port AUTOIP to new netif client data API
1db9631 Port DHCP to new netif client data API
c8c8041 Fix possible NULL pointer dereference in mdns.c introduced in my last commit
ee815e4 Finish porting MDNS to new netif client data API
c28fb29 Introduce an API to store arbitrary data pointers in struct netif Let MDNS to use the new API TODO: AutoIP, DHCP
93b286e Also rename LWIP_MDNS to LWIP_MDNS_RESPONDER in unit tests...
2a90f33 MDNS responder: two functions can take struct mdns_host instead of netif as argument
efb7b3d Rename LWIP_MDNS to LWIP_MDNS_RESPONDER
02d51e3 Add missing file doxygen header in two mdns files
fec657b MDNS: Substitute a few strlens by sizeof()
858287f MDNS: Fix several MSVC warnings
af6b707 mdns_opts.h: Add missing include lwip/opt.h
ab72ed8 Fix options #include in mdns code
482a4d2 MDNS: Correct setting TTL when IGMP is not enabled
c61c8f3 Use udp_get_multicast_ttl/udp_set_multicast_ttl accessors where applicable
af48bec Update MDNS docs after porting to dual-stack API
39ac8e2 Remove some MDNS functions from documentation, they are only visible for unit tests
52449e1 Forgot to save before committing...
2335c1a Port MDNS to new dual-stack API
ebe0e6f Some documentation cosmetics in mdns.c
4d85def Update README applications sections
b472648 Fix wrong copyright header in mdns_opts.h
a2894ed MDNS: make a few arguments const where suitable
306113c Add MDNS to doxygen docs
4919932 Apply patch #8755: Multicast DNS responder support from Erik Ekman
4af297f PPP: fix don't print valid LCP echo request/reply packets if the link is up
4e1f8ef PPP: fix ppp_write internal documentation
5493220 Move DNS protocol structs to separate header. Needed for Erik Ekman's MDNS implementation.
ce6ea0d Convert SNMP snmp_vb_enumerator_err_t to a typedef and fix resulting compile error
6dcb2b2 Work on bug #48730: Enums should be used instead of multiple defines (where applicable)
36b9cae Fix compile of unit test
1325152 Strip path prefix in doxygen docs - no /home/dziegel/ in the future :-)
b34baff Convert state #defines in autoip.h and dhcp.h to enums. May be useful in *_state structs to simplify debugging in the future.
6f62fe5 ensure the 'prot' headers are as small & portable as possible
dc7340b started with bug #48728: move protocol definitions to 'include/prot/*.h' files (started with some IPv4 protocols)
d95ab51 netif:ppp: fix mempool build issues when PPP is enabled
bf3e8e6 minor coding style fixes in IPv6 code
3194c9c PPP: filter more packets in ppp_dump_packet
18fcc1d [PATCH] debug: Add braces around empty body in an 'if' statement
5c0944e Don't document tcp_send_empty_ack and tcp_keepalive - users should never need them
5a09fd3 Don't document ip4_route and ip6_route, users should use ip_route instead
0005b7c Revert my last change in sntp.c - allow usage of custom error values in err_t
6ba03d5 Activate TCP backlog in documentation
61dae47 Relete SNMP README and incorporate it's text in doxygen docs
85ab399 Fix a few incorrect uses of err_t. Found by converting lwip error codes to an enum, but I'm not sure wether I want to commit the actual enum conversion.
e5284ec Minor: documentation cosmetics
4b41ef5 Add note about Filelists.mk in UPGRADING document
a2fd680 minor: macros should not end with underscore(s)
1631307 tcp.c: Partly undo Simon's changes from today (repairs doxygen docs)
1033277 Remove tcp_accepted() from rawapi.txt. Thanks to Sergio Caprile for pointing this out!
fa568f7 Fix typos in docs
282b8a2 PPP: set disconnect state before closing link protocol in ppp_close
b1dfd00 Minor netif documentation update
eba6ae0 minor: add a comment about where to define LWIP_RAND()
219438f cleanup: move stdlib.h include to mem.c, where it belongs
e4c01a0 mem: Include stdlib.h to fix build warnings when MEM_LIBC_MALLOC is set
08378b7 Improve LWIP_EVENT_API compilation
fc66fb8 Fix compilation for LWIP_EVENT_API
fa8797b Fix PBUF_LINK_HLEN value in documentation
953dd5b PPP, PPPoE: remove useless checks
455a418 PPP, PPPoL2TP: cleanup connection state reset
1ea1026 PPP, PPPoE: cleanup connection state reset
09c22e1 PPP: close link protocol if LCP is not started in ppp_close
7c02a85 PPP, PPPoE: add support for disconnecting in link initiation state in disconnect callback
d15ebc6 PPP: don't restart LCP closing if termination is already in progress
f185104 PPP: revamp PPP state order
5811948 PPP: remove PPP_PHASE_MASTER conditions if multilink mode is disabled
dd0779c PPP, move VJ_SUPPORT disabling if LWIP_TCP is not enabled to PPP options
898e691 Minor: documentation fix
f55c0e7 Move rawapi.txt description to main page - this doc really should be found and read by users
3ca4eb5 Minor pbuf layer doc update
6af2137 Fix clang address sanitizer errors in unit tests (buffers too small)
0a7db8a PPP: remove double include for lwip/sys.h
0673fcd Fix mentioning functions that do not take pbufs as argument in pbuf layer docs
980a919 Don't document IP type specific output functions, users should use IP type independent ones
8d07629 Some documentation cleanups and include more comments that have been already in code into doxygen docs
cf66233 PBUF layer documentation clarification
b94c8ee Add some more functions and macros to documentation
73131b1 Fix doxygen warning in ip6.c
87855b0 Update doxgen docs: PBUF layers, IPv4 and IPv6 functions, add some missing tcp raw API functions
2acfa0e Update NO_SYS_SampleCode.c: Don't access heap in IRQ
a20cdc5 Fix comment in sample code
70ee63e Documentation: Add example code for NO_SYS use case
c2a5480 PPP: remove useless ppp_link_start function
01561b2 PPP: set phase to establish before starting LCP
9b47b63 PPP, PPPoE: remove useless PPPoE state conditions
e8d8c5d PPP, L2TP: remove useless L2TP state conditions
bae6791 PPP: fix dead phase set too early
5f77427 minor: tabs -> spaces
02221cf Rename IP_HDRINCL to LWIP_IP_HDRINCL
6383ef8 had a look through the docs...
dd11030 update some FILES list files
4c06a73 Add redirection page for HTML doxygen output so one does not have to search for index.html in the huge output/html directory
da83946 Add one more documentation sentence in tcp.c
3d379c9 IPv6 is NOT experimental any more :-)
git-subtree-dir: features/FEATURE_LWIP/lwip-interface/lwip
git-subtree-split: 10f93f4cf593f18932a7e575f7113a02a6b291e7
2017-02-21 12:26:01 +00:00
|
|
|
printf(" dns2 = %s\n", ipaddr_ntoa(ns));
|
2016-09-28 05:48:10 +00:00
|
|
|
#endif /* LWIP_DNS */
|
|
|
|
#endif /* PPP_IPV4_SUPPORT */
|
|
|
|
#if PPP_IPV6_SUPPORT
|
|
|
|
printf(" our6_ipaddr = %s\n", ip6addr_ntoa(netif_ip6_addr(pppif, 0)));
|
|
|
|
#endif /* PPP_IPV6_SUPPORT */
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case PPPERR_PARAM: {
|
|
|
|
printf("status_cb: Invalid parameter\n");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case PPPERR_OPEN: {
|
|
|
|
printf("status_cb: Unable to open PPP session\n");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case PPPERR_DEVICE: {
|
|
|
|
printf("status_cb: Invalid I/O device for PPP\n");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case PPPERR_ALLOC: {
|
|
|
|
printf("status_cb: Unable to allocate resources\n");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case PPPERR_USER: {
|
|
|
|
printf("status_cb: User interrupt\n");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case PPPERR_CONNECT: {
|
|
|
|
printf("status_cb: Connection lost\n");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case PPPERR_AUTHFAIL: {
|
|
|
|
printf("status_cb: Failed authentication challenge\n");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case PPPERR_PROTOCOL: {
|
|
|
|
printf("status_cb: Failed to meet protocol\n");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case PPPERR_PEERDEAD: {
|
|
|
|
printf("status_cb: Connection timeout\n");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case PPPERR_IDLETIMEOUT: {
|
|
|
|
printf("status_cb: Idle Timeout\n");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case PPPERR_CONNECTTIME: {
|
|
|
|
printf("status_cb: Max connect time reached\n");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case PPPERR_LOOPBACK: {
|
|
|
|
printf("status_cb: Loopback detected\n");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
default: {
|
|
|
|
printf("status_cb: Unknown error code %d\n", err_code);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This should be in the switch case, this is put outside of the switch
|
|
|
|
* case for example readability.
|
|
|
|
*/
|
|
|
|
|
|
|
|
if (err_code == PPPERR_NONE) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ppp_close() was previously called, don't reconnect */
|
|
|
|
if (err_code == PPPERR_USER) {
|
|
|
|
/* ppp_free(); -- can be called here */
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Try to reconnect in 30 seconds, if you need a modem chatscript you have
|
|
|
|
* to do a much better signaling here ;-)
|
|
|
|
*/
|
|
|
|
ppp_connect(pcb, 30);
|
|
|
|
/* OR ppp_listen(pcb); */
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Creating a new PPPoS session
|
|
|
|
* ============================
|
|
|
|
*
|
|
|
|
* In lwIP, PPPoS is not PPPoSONET, in lwIP PPPoS is PPPoSerial.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "netif/ppp/pppos.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* PPPoS serial output callback
|
|
|
|
*
|
|
|
|
* ppp_pcb, PPP control block
|
|
|
|
* data, buffer to write to serial port
|
|
|
|
* len, length of the data buffer
|
|
|
|
* ctx, optional user-provided callback context pointer
|
|
|
|
*
|
|
|
|
* Return value: len if write succeed
|
|
|
|
*/
|
|
|
|
static u32_t output_cb(ppp_pcb *pcb, u8_t *data, u32_t len, void *ctx) {
|
|
|
|
return uart_write(UART, data, len);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Create a new PPPoS interface
|
|
|
|
*
|
|
|
|
* ppp_netif, netif to use for this PPP link, i.e. PPP IP interface
|
|
|
|
* output_cb, PPPoS serial output callback
|
|
|
|
* status_cb, PPP status callback, called on PPP status change (up, down, …)
|
|
|
|
* ctx_cb, optional user-provided callback context pointer
|
|
|
|
*/
|
|
|
|
ppp = pppos_create(&ppp_netif,
|
|
|
|
output_cb, status_cb, ctx_cb);
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Creating a new PPPoE session
|
|
|
|
* ============================
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "netif/ppp/pppoe.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Create a new PPPoE interface
|
|
|
|
*
|
|
|
|
* ppp_netif, netif to use for this PPP link, i.e. PPP IP interface
|
|
|
|
* ethif, already existing and setup Ethernet interface to use
|
|
|
|
* service_name, PPPoE service name discriminator (not supported yet)
|
|
|
|
* concentrator_name, PPPoE concentrator name discriminator (not supported yet)
|
|
|
|
* status_cb, PPP status callback, called on PPP status change (up, down, …)
|
|
|
|
* ctx_cb, optional user-provided callback context pointer
|
|
|
|
*/
|
|
|
|
ppp = pppoe_create(&ppp_netif,
|
|
|
|
ðif,
|
|
|
|
service_name, concentrator_name,
|
|
|
|
status_cb, ctx_cb);
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Creating a new PPPoL2TP session
|
|
|
|
* ===============================
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "netif/ppp/pppol2tp.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Create a new PPPoL2TP interface
|
|
|
|
*
|
|
|
|
* ppp_netif, netif to use for this PPP link, i.e. PPP IP interface
|
|
|
|
* netif, optional already existing and setup output netif, necessary if you
|
|
|
|
* want to set this interface as default route to settle the chicken
|
|
|
|
* and egg problem with VPN links
|
|
|
|
* ipaddr, IP to connect to
|
|
|
|
* port, UDP port to connect to (usually 1701)
|
|
|
|
* secret, L2TP secret to use
|
|
|
|
* secret_len, size in bytes of the L2TP secret
|
|
|
|
* status_cb, PPP status callback, called on PPP status change (up, down, …)
|
|
|
|
* ctx_cb, optional user-provided callback context pointer
|
|
|
|
*/
|
|
|
|
ppp = pppol2tp_create(&ppp_netif,
|
|
|
|
struct netif *netif, ip_addr_t *ipaddr, u16_t port,
|
|
|
|
u8_t *secret, u8_t secret_len,
|
|
|
|
ppp_link_status_cb_fn link_status_cb, void *ctx_cb);
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Initiate PPP client connection
|
|
|
|
* ==============================
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Set this interface as default route */
|
|
|
|
ppp_set_default(ppp);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Basic PPP client configuration. Can only be set if PPP session is in the
|
|
|
|
* dead state (i.e. disconnected). We don't need to provide thread-safe
|
|
|
|
* equivalents through PPPAPI because those helpers are only changing
|
|
|
|
* structure members while session is inactive for lwIP core. Configuration
|
|
|
|
* only need to be done once.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Ask the peer for up to 2 DNS server addresses. */
|
|
|
|
ppp_set_usepeerdns(ppp, 1);
|
|
|
|
|
|
|
|
/* Auth configuration, this is pretty self-explanatory */
|
|
|
|
ppp_set_auth(ppp, PPPAUTHTYPE_ANY, "login", "password");
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Initiate PPP negotiation, without waiting (holdoff=0), can only be called
|
|
|
|
* if PPP session is in the dead state (i.e. disconnected).
|
|
|
|
*/
|
|
|
|
u16_t holdoff = 0;
|
|
|
|
ppp_connect(ppp, holdoff);
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Initiate PPP server listener
|
|
|
|
* ============================
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Basic PPP server configuration. Can only be set if PPP session is in the
|
|
|
|
* dead state (i.e. disconnected). We don't need to provide thread-safe
|
|
|
|
* equivalents through PPPAPI because those helpers are only changing
|
|
|
|
* structure members while session is inactive for lwIP core. Configuration
|
|
|
|
* only need to be done once.
|
|
|
|
*/
|
|
|
|
ip4_addr_t addr;
|
|
|
|
|
|
|
|
/* Set our address */
|
|
|
|
IP4_ADDR(&addr, 192,168,0,1);
|
|
|
|
ppp_set_ipcp_ouraddr(ppp, &addr);
|
|
|
|
|
|
|
|
/* Set peer(his) address */
|
|
|
|
IP4_ADDR(&addr, 192,168,0,2);
|
|
|
|
ppp_set_ipcp_hisaddr(ppp, &addr);
|
|
|
|
|
|
|
|
/* Set primary DNS server */
|
|
|
|
IP4_ADDR(&addr, 192,168,10,20);
|
|
|
|
ppp_set_ipcp_dnsaddr(ppp, 0, &addr);
|
|
|
|
|
|
|
|
/* Set secondary DNS server */
|
|
|
|
IP4_ADDR(&addr, 192,168,10,21);
|
|
|
|
ppp_set_ipcp_dnsaddr(ppp, 1, &addr);
|
|
|
|
|
|
|
|
/* Auth configuration, this is pretty self-explanatory */
|
|
|
|
ppp_set_auth(ppp, PPPAUTHTYPE_ANY, "login", "password");
|
|
|
|
|
|
|
|
/* Require peer to authenticate */
|
|
|
|
ppp_set_auth_required(ppp, 1);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Only for PPPoS, the PPP session should be up and waiting for input.
|
|
|
|
*
|
|
|
|
* Note: for PPPoS, ppp_connect() and ppp_listen() are actually the same thing.
|
|
|
|
* The listen call is meant for future support of PPPoE and PPPoL2TP server
|
|
|
|
* mode, where we will need to negotiate the incoming PPPoE session or L2TP
|
|
|
|
* session before initiating PPP itself. We need this call because there is
|
|
|
|
* two passive modes for PPPoS, ppp_set_passive and ppp_set_silent.
|
|
|
|
*/
|
|
|
|
ppp_set_silent(pppos, 1);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Initiate PPP listener (i.e. wait for an incoming connection), can only
|
|
|
|
* be called if PPP session is in the dead state (i.e. disconnected).
|
|
|
|
*/
|
|
|
|
ppp_listen(ppp);
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Closing PPP connection
|
|
|
|
* ======================
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Initiate the end of the PPP session, without carrier lost signal
|
|
|
|
* (nocarrier=0), meaning a clean shutdown of PPP protocols.
|
|
|
|
* You can call this function at anytime.
|
|
|
|
*/
|
|
|
|
u8_t nocarrier = 0;
|
|
|
|
ppp_close(ppp, nocarrier);
|
|
|
|
/*
|
|
|
|
* Then you must wait your status_cb() to be called, it may takes from a few
|
|
|
|
* seconds to several tens of seconds depending on the current PPP state.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Freeing a PPP connection
|
|
|
|
* ========================
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Free the PPP control block, can only be called if PPP session is in the
|
|
|
|
* dead state (i.e. disconnected). You need to call ppp_close() before.
|
|
|
|
*/
|
|
|
|
ppp_free(ppp);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 PPPoS input path (raw API, IRQ safe API, TCPIP API)
|
|
|
|
=====================================================
|
|
|
|
|
|
|
|
Received data on serial port should be sent to lwIP using the pppos_input()
|
|
|
|
function or the pppos_input_tcpip() function.
|
|
|
|
|
|
|
|
If NO_SYS is 1 and if PPP_INPROC_IRQ_SAFE is 0 (the default), pppos_input()
|
|
|
|
is not IRQ safe and then *MUST* only be called inside your main loop.
|
|
|
|
|
|
|
|
Whatever the NO_SYS value, if PPP_INPROC_IRQ_SAFE is 1, pppos_input() is IRQ
|
|
|
|
safe and can be safely called from an interrupt context, using that is going
|
|
|
|
to reduce your need of buffer if pppos_input() is called byte after byte in
|
|
|
|
your rx serial interrupt.
|
|
|
|
|
|
|
|
if NO_SYS is 0, the thread safe way outside an interrupt context is to use
|
|
|
|
the pppos_input_tcpip() function to pass input data to the lwIP core thread
|
|
|
|
using the TCPIP API. This is thread safe in all cases but you should avoid
|
|
|
|
passing data byte after byte because it uses heavy locking (mailbox) and it
|
|
|
|
allocates pbuf, better fill them !
|
|
|
|
|
|
|
|
if NO_SYS is 0 and if PPP_INPROC_IRQ_SAFE is 1, you may also use pppos_input()
|
|
|
|
from an RX thread, however pppos_input() is not thread safe by itself. You can
|
|
|
|
do that *BUT* you should NEVER call pppos_connect(), pppos_listen() and
|
|
|
|
ppp_free() if pppos_input() can still be running, doing this is NOT thread safe
|
|
|
|
at all. Using PPP_INPROC_IRQ_SAFE from an RX thread is discouraged unless you
|
|
|
|
really know what you are doing, your move ;-)
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Fonction to call for received data
|
|
|
|
*
|
|
|
|
* ppp, PPP control block
|
|
|
|
* buffer, input buffer
|
|
|
|
* buffer_len, buffer length in bytes
|
|
|
|
*/
|
|
|
|
void pppos_input(ppp, buffer, buffer_len);
|
|
|
|
|
|
|
|
or
|
|
|
|
|
|
|
|
void pppos_input_tcpip(ppp, buffer, buffer_len);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 Thread safe PPP API (PPPAPI)
|
|
|
|
==============================
|
|
|
|
|
|
|
|
There is a thread safe API for all corresponding ppp_* functions, you have to
|
|
|
|
enable LWIP_PPP_API in your lwipopts.h file, then see
|
|
|
|
include/netif/ppp/pppapi.h, this is actually pretty obvious.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 Notify phase callback (PPP_NOTIFY_PHASE)
|
|
|
|
==========================================
|
|
|
|
|
|
|
|
Notify phase callback, enabled using the PPP_NOTIFY_PHASE config option, let
|
|
|
|
you configure a callback that is called on each PPP internal state change.
|
|
|
|
This is different from the status callback which only warns you about
|
|
|
|
up(running) and down(dead) events.
|
|
|
|
|
|
|
|
Notify phase callback can be used, for example, to set a LED pattern depending
|
|
|
|
on the current phase of the PPP session. Here is a callback example which
|
|
|
|
tries to mimic what we usually see on xDSL modems while they are negotiating
|
|
|
|
the link, which should be self-explanatory:
|
|
|
|
|
|
|
|
static void ppp_notify_phase_cb(ppp_pcb *pcb, u8_t phase, void *ctx) {
|
|
|
|
switch (phase) {
|
|
|
|
|
|
|
|
/* Session is down (either permanently or briefly) */
|
|
|
|
case PPP_PHASE_DEAD:
|
|
|
|
led_set(PPP_LED, LED_OFF);
|
|
|
|
break;
|
|
|
|
|
|
|
|
/* We are between two sessions */
|
|
|
|
case PPP_PHASE_HOLDOFF:
|
|
|
|
led_set(PPP_LED, LED_SLOW_BLINK);
|
|
|
|
break;
|
|
|
|
|
|
|
|
/* Session just started */
|
|
|
|
case PPP_PHASE_INITIALIZE:
|
|
|
|
led_set(PPP_LED, LED_FAST_BLINK);
|
|
|
|
break;
|
|
|
|
|
|
|
|
/* Session is running */
|
|
|
|
case PPP_PHASE_RUNNING:
|
|
|
|
led_set(PPP_LED, LED_ON);
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 Upgrading from lwIP <= 1.4.x to lwIP >= 2.0.x
|
|
|
|
===============================================
|
|
|
|
|
|
|
|
PPP API was fully reworked between 1.4.x and 2.0.x releases. However porting
|
|
|
|
from previous lwIP version is pretty easy:
|
|
|
|
|
|
|
|
* Previous PPP API used an integer to identify PPP sessions, we are now
|
|
|
|
using ppp_pcb* control block, therefore all functions changed from "int ppp"
|
|
|
|
to "ppp_pcb *ppp"
|
|
|
|
|
|
|
|
* struct netif was moved outside the PPP structure, you have to provide a netif
|
|
|
|
for PPP interface in pppoX_create() functions
|
|
|
|
|
|
|
|
* PPP session are not started automatically after you created them anymore,
|
|
|
|
you have to call ppp_connect(), this way you can configure the session before
|
|
|
|
starting it.
|
|
|
|
|
|
|
|
* Previous PPP API used CamelCase, we are now using snake_case.
|
|
|
|
|
|
|
|
* Previous PPP API mixed PPPoS and PPPoE calls, this isn't the case anymore,
|
|
|
|
PPPoS functions are now prefixed pppos_ and PPPoE functions are now prefixed
|
|
|
|
pppoe_, common functions are now prefixed ppp_.
|
|
|
|
|
|
|
|
* New PPPERR_ error codes added, check you have all of them in your status
|
|
|
|
callback function
|
|
|
|
|
|
|
|
* Only the following include files should now be used in user application:
|
|
|
|
#include "netif/ppp/pppapi.h"
|
|
|
|
#include "netif/ppp/pppos.h"
|
|
|
|
#include "netif/ppp/pppoe.h"
|
|
|
|
#include "netif/ppp/pppol2tp.h"
|
|
|
|
|
|
|
|
Functions from ppp.h can be used, but you don't need to include this header
|
|
|
|
file as it is already included by above header files.
|
|
|
|
|
|
|
|
* PPP_INPROC_OWNTHREAD was broken by design and was removed, you have to create
|
|
|
|
your own serial rx thread
|
|
|
|
|
|
|
|
* PPP_INPROC_MULTITHREADED option was misnamed and confusing and was renamed
|
|
|
|
PPP_INPROC_IRQ_SAFE, please read the "PPPoS input path" documentation above
|
|
|
|
because you might have been fooled by that
|
|
|
|
|
|
|
|
* If you used tcpip_callback_with_block() on ppp_ functions you may wish to use
|
|
|
|
the PPPAPI API instead.
|
|
|
|
|
|
|
|
* ppp_sighup and ppp_close functions were merged using an optional argument
|
|
|
|
"nocarrier" on ppp_close.
|
|
|
|
|
|
|
|
* DNS servers are now only remotely asked if LWIP_DNS is set and if
|
|
|
|
ppp_set_usepeerdns() is set to true, they are now automatically registered
|
|
|
|
using the dns_setserver() function so you don't need to do that in the PPP
|
|
|
|
callback anymore.
|
|
|
|
|
|
|
|
* PPPoS does not use the SIO API anymore, as such it now requires a serial
|
|
|
|
output callback in place of sio_write
|
|
|
|
|
|
|
|
* PPP_MAXIDLEFLAG is now in ms instead of jiffies
|