Commit Graph

4265 Commits

Author SHA1 Message Date
Dirk Ziegelmeier
f170dde1c6 Work on bug #48824: ethernet.c extensions: Implement hook for unknown ethernet protocols 2016-08-23 10:48:38 +02:00
Dirk Ziegelmeier
bae4d6398c Fix some comments to reference ethernet_output now 2016-08-23 10:23:59 +02:00
Dirk Ziegelmeier
18136c047b Work on bug #48824: ethernet.c extensions: Implement ethernet_output();
Fixes bug #48862: ethip6 does not support setting vlan
2016-08-23 10:15:03 +02:00
Axel Lin
42c193821c netbuf: Use memset to zero the allocated memory for netbuf_new
Use memset to zero the allocated memory rather than explicitly init each field.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2016-08-23 08:59:11 +02:00
Axel Lin
1c5c96a50a pbuf: Use SYS_ARCH_INC in pbuf_ref()
Use SYS_ARCH_INC to simplify the code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2016-08-23 08:59:10 +02:00
Axel Lin
40f2bed5c4 mem: Simplify the code for try bigger pool in mem_malloc
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: sg <goldsimon@gmx.de>
2016-08-20 11:29:57 +02:00
Axel Lin
a032ccafe7 mem: Fix trivial comment typo about using custom pools
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-08-20 09:17:37 +02:00
goldsimon
4f4d16260f minor: fixed typo 2016-08-19 15:40:36 +02:00
goldsimon
6b1e1af3d1 combine MAC filter actions for IGMP and MLD6 (IGMP has compatibility defines for old code, MLD6 filter functions must be adapted) 2016-08-19 13:54:14 +02:00
Axel Lin
b3bae1b44c memp: Fix unused variable build error when MEMP_SANITY_REGION_BEFORE/AFTER is 0
MEMP_SANITY_REGION_BEFORE and MEMP_SANITY_REGION_AFTER can be overridden in
lwipopts.h, if one of it is set to 0 we got build error due to unused variable.

Fix unused variable build error when MEMP_OVERFLOW_CHECK >= 1 &&
(MEMP_SANITY_REGION_BEFORE == 0 || MEMP_SANITY_REGION_AFTER == 0).

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2016-08-19 13:47:37 +02:00
Dirk Ziegelmeier
730080f20e Fix doxygen comment in lwip/prot/igmp.h 2016-08-19 13:15:23 +02:00
goldsimon
a189941da6 make igmp/mld6 filter actions an enum and define them in netif.h where the callback function prototypes are defined 2016-08-19 13:10:57 +02:00
Dirk Ziegelmeier
f93a6e3310 Rename lwip/prot/arp.h to lwip/prot/etharp.h for consistence 2016-08-19 13:09:58 +02:00
Dirk Ziegelmeier
5e36815867 init.c: Implement check for correct implementation of struct packing in lwip port 2016-08-19 13:05:51 +02:00
Dirk Ziegelmeier
01d8e5013f Add missing include in prot/igmp.h 2016-08-19 13:02:17 +02:00
Dirk Ziegelmeier
6688033bc4 Move IGMP protocol struct to prot/igmp.h 2016-08-19 12:50:41 +02:00
goldsimon
ed566cceaa minor cleaup in (eth)arp 2016-08-19 12:49:02 +02:00
goldsimon
55d05092ef simplify memp.c code a bit 2016-08-19 12:25:48 +02:00
Axel Lin
0e9ef19cfb memp: Remove memp_overflow_init() function
There is only one caller using memp_overflow_init(), and at that context
calling memp_overflow_init_element() actually simplifes the code.
Thus remove memp_overflow_init() function.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2016-08-19 12:25:47 +02:00
Dirk Ziegelmeier
fefb782bfe Apply fix by Marco Veeneman in SNMPv3: The outbound_padding is calculated wrong in snmp_complete_outbound_frame() 2016-08-19 12:22:59 +02:00
Dirk Ziegelmeier
12609c951c Fix compile of SNMPv3 code with MSVC 2016-08-19 12:22:58 +02:00
Axel Lin
64f79e7ffc PPP, PPPoE: Include netif/ethernet.h to fix build error
Fix below build errors:
In file included from ../../../../../lwip/src/include/netif/ppp/ppp_opts.h:31:0,
                 from ../../../../../lwip/src/netif/ppp/pppoe.c:71:
../../../../../lwip/src/netif/ppp/pppoe.c: In function ‘pppoe_timeout’:
../../../../../lwip/src/netif/ppp/pppoe.c:861:30: error: ‘ethbroadcast’ undeclared (first use in this function)
         MEMCPY(&sc->sc_dest, ethbroadcast.addr, sizeof(sc->sc_dest));
                              ^
../../../../../lwip/src/include/lwip/opt.h:137:52: note: in definition of macro ‘MEMCPY’
 #define MEMCPY(dst,src,len)             memcpy(dst,src,len)
                                                    ^
../../../../../lwip/src/netif/ppp/pppoe.c:861:30: note: each undeclared identifier is reported only once for each function it appears in
         MEMCPY(&sc->sc_dest, ethbroadcast.addr, sizeof(sc->sc_dest));
                              ^
../../../../../lwip/src/include/lwip/opt.h:137:52: note: in definition of macro ‘MEMCPY’
 #define MEMCPY(dst,src,len)             memcpy(dst,src,len)
                                                    ^
../../../../../lwip/src/netif/ppp/pppoe.c: In function ‘pppoe_connect’:
../../../../../lwip/src/netif/ppp/pppoe.c:899:24: error: ‘ethbroadcast’ undeclared (first use in this function)
   MEMCPY(&sc->sc_dest, ethbroadcast.addr, sizeof(sc->sc_dest));
                        ^
../../../../../lwip/src/include/lwip/opt.h:137:52: note: in definition of macro ‘MEMCPY’
 #define MEMCPY(dst,src,len)             memcpy(dst,src,len)
                                                    ^
../../Common.mk:94: recipe for target 'pppoe.o' failed
make: *** [pppoe.o] Error 1

Fixes: 8eb9db18a2 ("Reduce usage of netif/ethernet.h header, mostly lwip/prot/ethernet.h is sufficient")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2016-08-19 12:12:57 +02:00
goldsimon
ebd1bf8a49 fixed typo :-( 2016-08-19 11:03:09 +02:00
goldsimon
4a7dafc6a6 fixed compiling mdns.c after moving things to mdns_priv.h 2016-08-19 11:02:37 +02:00
goldsimon
1e6f33d44b tcp: move tcp header flags definitions to 'prot' 2016-08-19 10:41:01 +02:00
goldsimon
96c3c48ba7 mdns: moved private things into mdns_priv.h 2016-08-19 09:52:30 +02:00
goldsimon
14fb48cd7a minor: whitespace cleanups 2016-08-19 09:41:34 +02:00
goldsimon
9725a496b5 moved 2 enums from 'prot' headers to where they belong (dns, dhcp) 2016-08-19 09:41:33 +02:00
Dirk Ziegelmeier
967516aa40 Add #include to netif/ethernet.h to netif/etharp.h to maintian compatibility 2016-08-19 09:15:35 +02:00
Dirk Ziegelmeier
8eb9db18a2 Reduce usage of netif/ethernet.h header, mostly lwip/prot/ethernet.h is sufficient 2016-08-19 08:36:00 +02:00
sg
43d6812b3e IPv6 addr: clarify tentative count/LWIP_IPV6_DUP_DETECT_ATTEMPTS 2016-08-18 22:02:57 +02:00
Dirk Ziegelmeier
c4e3be814f Work on bug #48728: headers should cleanly separate API vs. implementation
ARP
2016-08-18 20:58:51 +02:00
Dirk Ziegelmeier
ad357a4c89 Work on bug #48728: headers should cleanly separate API vs. implementation
ICMP
2016-08-18 20:55:09 +02:00
Dirk Ziegelmeier
2d503f4433 Work on bug #48728: headers should cleanly separate API vs. implementation
ICMP6
2016-08-18 20:52:00 +02:00
Dirk Ziegelmeier
458211c2af Comment fixes in my last commits 2016-08-18 20:41:39 +02:00
Dirk Ziegelmeier
84e139f20c Work on bug #48728: headers should cleanly separate API vs. implementation
IP6
2016-08-18 20:40:15 +02:00
Dirk Ziegelmeier
81c68f529b Work on bug #48728: headers should cleanly separate API vs. implementation
MLD6
2016-08-18 20:36:44 +02:00
Dirk Ziegelmeier
f299b4b7cf Work on bug #48728: headers should cleanly separate API vs. implementation
Ethernet
2016-08-18 20:33:38 +02:00
Dirk Ziegelmeier
8d68400387 Work on bug #48728: headers should cleanly separate API vs. implementation
ND6
2016-08-18 20:28:03 +02:00
Dirk Ziegelmeier
d89fa2dcbc Work on bug #48728: headers should cleanly separate API vs. implementation
UDP
2016-08-18 20:22:35 +02:00
Dirk Ziegelmeier
16293125a6 Work on bug #48728: headers should cleanly separate API vs. implementation
TCP
2016-08-18 20:22:14 +02:00
Axel Lin
e24fde05db memp: Fix memp_overflow_check_element_overflow assertion
Use LWIP_MEM_ALIGN() in memp_overflow_init() to get alignment address for memp.
This fixes assertion in memp_overflow_check_element_overflow when
MEMP_OVERFLOW_CHECK is set.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-08-18 19:24:34 +02:00
Axel Lin
ef31afb921 memp: Fix build error when LWIP_HOOK_MEMP_AVAILABLE is defined
Fix below build error.

../../../../../lwip/src/core/memp.c: In function ‘memp_free’:
../../../../../lwip/src/core/memp.c:490:31: error: request for member ‘tab’ in something not a structure or union
   old_first = memp_pools[type].tab;
                               ^
../../Common.mk:94: recipe for target 'memp.o' failed
make: *** [memp.o] Error 1

Fixes: de9054cb7a ("memp: cleaned up MEMP_MEM_MALLOC")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-08-18 19:20:26 +02:00
Dirk Ziegelmeier
97fae7e41b Code cleanup in autoip.c and dhcp.c 2016-08-18 12:49:59 +02:00
Dirk Ziegelmeier
7f60cb3889 Improve netif client data API for lwIP internal clients - these can use a compile-time constant to access their data now 2016-08-18 12:37:21 +02:00
Dirk Ziegelmeier
ebf7959880 Coding style fixes in netif.c 2016-08-18 11:44:19 +02:00
Dirk Ziegelmeier
0c7a59b5db Minor: Documentation fixes 2016-08-18 11:06:50 +02:00
Dirk Ziegelmeier
c9ad58308a Minor documentation fixes 2016-08-18 10:59:18 +02:00
Dirk Ziegelmeier
a262a2f252 MDNS: Add callback to be called manually when IP has changed to announce new IP 2016-08-18 10:59:08 +02:00
Dirk Ziegelmeier
fa6a2d48cc Fix DHCP unit test after my last changes 2016-08-18 06:09:02 +02:00
Dirk Ziegelmeier
c62bfd8146 Port AUTOIP to new netif client data API 2016-08-17 21:26:08 +02:00
Dirk Ziegelmeier
1db9631e7d Port DHCP to new netif client data API 2016-08-17 21:04:44 +02:00
Dirk Ziegelmeier
c8c804140d Fix possible NULL pointer dereference in mdns.c introduced in my last commit 2016-08-17 21:00:59 +02:00
Dirk Ziegelmeier
ee815e4e7a Finish porting MDNS to new netif client data API 2016-08-17 20:09:28 +02:00
Dirk Ziegelmeier
c28fb298b7 Introduce an API to store arbitrary data pointers in struct netif
Let MDNS to use the new API
TODO: AutoIP, DHCP
2016-08-17 16:37:15 +02:00
Dirk Ziegelmeier
2a90f33757 MDNS responder: two functions can take struct mdns_host instead of netif as argument 2016-08-17 12:32:33 +02:00
Dirk Ziegelmeier
efb7b3d5f8 Rename LWIP_MDNS to LWIP_MDNS_RESPONDER 2016-08-17 12:07:38 +02:00
Dirk Ziegelmeier
02d51e3ac5 Add missing file doxygen header in two mdns files 2016-08-16 09:46:19 +02:00
Dirk Ziegelmeier
fec657bb38 MDNS: Substitute a few strlens by sizeof() 2016-08-16 09:33:53 +02:00
Dirk Ziegelmeier
858287fc3a MDNS: Fix several MSVC warnings 2016-08-16 08:33:16 +02:00
Dirk Ziegelmeier
af6b707e9a mdns_opts.h: Add missing include lwip/opt.h 2016-08-16 08:28:59 +02:00
Dirk Ziegelmeier
ab72ed8517 Fix options #include in mdns code 2016-08-16 08:22:41 +02:00
Dirk Ziegelmeier
482a4d2ce9 MDNS: Correct setting TTL when IGMP is not enabled 2016-08-16 08:09:19 +02:00
Dirk Ziegelmeier
c61c8f3766 Use udp_get_multicast_ttl/udp_set_multicast_ttl accessors where applicable 2016-08-16 08:08:06 +02:00
Dirk Ziegelmeier
39ac8e2c57 Remove some MDNS functions from documentation, they are only visible for unit tests 2016-08-14 17:08:39 +02:00
Dirk Ziegelmeier
52449e12c0 Forgot to save before committing... 2016-08-14 16:56:34 +02:00
Dirk Ziegelmeier
2335c1a73c Port MDNS to new dual-stack API 2016-08-14 16:47:45 +02:00
Dirk Ziegelmeier
ebe0e6f98d Some documentation cosmetics in mdns.c 2016-08-14 15:42:22 +02:00
Dirk Ziegelmeier
b472648e40 Fix wrong copyright header in mdns_opts.h 2016-08-14 15:36:41 +02:00
Dirk Ziegelmeier
a2894ede1c MDNS: make a few arguments const where suitable 2016-08-14 15:31:49 +02:00
Dirk Ziegelmeier
306113c8c3 Add MDNS to doxygen docs 2016-08-14 15:22:05 +02:00
Erik Ekman
4919932c49 Apply patch #8755: Multicast DNS responder support from Erik Ekman 2016-08-14 15:07:45 +02:00
Sylvain Rochet
4af297fc20 PPP: fix don't print valid LCP echo request/reply packets if the link is up
The check for link up was missing, meaning valid LCP echo request/reply
packets are filtered whatever the PPP state is, despite what the comment
says.

Fix it by checking the PPP state as we would like to have done when it
was written.
2016-08-13 16:02:38 +02:00
Sylvain Rochet
4e1f8effaf PPP: fix ppp_write internal documentation
This function returns an err_t, not a number of characters written.
2016-08-13 16:02:38 +02:00
Dirk Ziegelmeier
5493220c93 Move DNS protocol structs to separate header. Needed for Erik Ekman's MDNS implementation. 2016-08-13 09:05:28 +02:00
Dirk Ziegelmeier
ce6ea0df15 Convert SNMP snmp_vb_enumerator_err_t to a typedef and fix resulting compile error 2016-08-12 22:59:21 +02:00
Dirk Ziegelmeier
6dcb2b2415 Work on bug #48730: Enums should be used instead of multiple defines (where applicable) 2016-08-12 22:51:43 +02:00
Dirk Ziegelmeier
b34baff546 Convert state #defines in autoip.h and dhcp.h to enums. May be useful in *_state structs to simplify debugging in the future. 2016-08-11 21:04:39 +02:00
goldsimon
6f62fe5998 ensure the 'prot' headers are as small & portable as possible 2016-08-11 15:11:34 +02:00
goldsimon
dc7340bbd5 started with bug #48728: move protocol definitions to 'include/prot/*.h' files (started with some IPv4 protocols) 2016-08-11 14:36:09 +02:00
Ajay Bhargav
d95ab511d0 netif:ppp: fix mempool build issues when PPP is enabled
During documentation updated LWIP_MEMPOOL_PROTOTYPE was moved inside
"#if MEMP_MEM_MALLOC" which cause ppp build to break. This patch fix that
issue.

ref commit-id: 2f950a7dcc

Signed-off-by: Ajay Bhargav <contact@rickeyworld.info>
2016-08-11 12:54:55 +02:00
goldsimon
bf3e8e6a48 minor coding style fixes in IPv6 code 2016-08-11 09:23:43 +02:00
Sylvain Rochet
3194c9c4cf PPP: filter more packets in ppp_dump_packet
VJ packets, Compressed packets, IPv4 and IPv6 packets are useless in
the PPP packet dump. We properly filtered IPv4 and IPv6 packets but
we forgot filtering VJ and Compressed packets.

Improve the filtering rule to filter packets which are not auth
protocol (< 0xC000) and which are not control protocol (0x8000 bit
not set).
2016-08-10 23:39:28 +02:00
Axel Lin
18fcc1d504 [PATCH] debug: Add braces around empty body in an 'if' statement
I have below code in my cc.h:

 #ifdef MYSDK_LWIP_DEBUG
 #define LWIP_PLATFORM_ASSERT(x) MYSDK_ASSERTION_FAIL_ACTION()
 #else
 #define LWIP_PLATFORM_ASSERT(x)
 #endif /* ifdef MYSDK_LWIP_DEBUG */

I got below error when in non-debug build:
src/include/lwip/debug.h:76:32: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
   LWIP_PLATFORM_ASSERT(message); } while(0)
                                ^
Fix the build error by adding braces around empty body in an 'if' statement.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: sg <goldsimon@gmx.de>
2016-08-09 21:52:13 +02:00
Dirk Ziegelmeier
5c0944e01a Don't document tcp_send_empty_ack and tcp_keepalive - users should never need them 2016-08-09 10:17:16 +02:00
Dirk Ziegelmeier
5a09fd3e35 Don't document ip4_route and ip6_route, users should use ip_route instead 2016-08-09 10:16:40 +02:00
Dirk Ziegelmeier
0005b7c2d0 Revert my last change in sntp.c - allow usage of custom error values in err_t 2016-08-09 08:20:28 +02:00
Dirk Ziegelmeier
61dae47a71 Relete SNMP README and incorporate it's text in doxygen docs 2016-08-08 22:40:57 +02:00
Dirk Ziegelmeier
85ab39985a 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. 2016-08-08 22:15:01 +02:00
Dirk Ziegelmeier
e5284ec616 Minor: documentation cosmetics 2016-08-08 22:01:38 +02:00
sg
a2fd68098e minor: macros should not end with underscore(s) 2016-08-08 21:47:53 +02:00
Dirk Ziegelmeier
1631307bb3 tcp.c: Partly undo Simon's changes from today (repairs doxygen docs) 2016-08-08 21:42:27 +02:00
Sylvain Rochet
282b8a2b6c PPP: set disconnect state before closing link protocol in ppp_close
If LCP is not started yet, we are only closing the link protocol, in
this case we have to set the disconnect state ourself because PPP
is not actually started yet.
2016-08-08 11:55:31 +02:00
Dirk Ziegelmeier
b1dfd00f92 Minor netif documentation update 2016-08-08 09:16:15 +02:00
goldsimon
eba6ae0122 minor: add a comment about where to define LWIP_RAND() 2016-08-08 09:14:50 +02:00
goldsimon
219438fb24 cleanup: move stdlib.h include to mem.c, where it belongs 2016-08-08 09:11:24 +02:00
Axel Lin
e4c01a064e mem: Include stdlib.h to fix build warnings when MEM_LIBC_MALLOC is set
Include stdlib.h to fix below build warnings when MEM_LIBC_MALLOC is set:
src/core/mem.c:119:3: warning: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
   void* ret = mem_clib_malloc(size + MEM_LIBC_STATSHELPER_SIZE);
   ^
src/core/mem.c:96:25: warning: incompatible implicit declaration of built-in function 'malloc'
 #define mem_clib_malloc malloc
                         ^
src/core/mem.c:119:15: note: in expansion of macro 'mem_clib_malloc'
   void* ret = mem_clib_malloc(size + MEM_LIBC_STATSHELPER_SIZE);
               ^
src/core/mem.c: In function 'mem_free':
src/core/mem.c:146:3: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration]
   mem_clib_free(rmem);
   ^
src/core/mem.c:93:23: warning: incompatible implicit declaration of built-in function 'free'
 #define mem_clib_free free
                       ^
src/core/mem.c:146:3: note: in expansion of macro 'mem_clib_free'
   mem_clib_free(rmem);
   ^

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-08-08 09:05:55 +02:00
goldsimon
08378b7d4b Improve LWIP_EVENT_API compilation 2016-08-08 08:49:14 +02:00
David van Moolenbroek
fc66fb830c Fix compilation for LWIP_EVENT_API
Without LWIP_CALLBACK_API, is no error callback function pointer in
the TCP PCB, nor is it needed, so do not attempt to access it.
2016-08-08 08:48:28 +02:00
Dirk Ziegelmeier
fa8797b86d Fix PBUF_LINK_HLEN value in documentation 2016-08-08 08:20:42 +02:00
Sylvain Rochet
953dd5b628 PPP, PPPoE: remove useless checks
pppoe_softc_list is always not null when pppoe_find_softc_by_session is
called, furthermore pppoe_softc_list being null here does not hurt.

session is still checked whatsoever in pppoe_find_softc_by_session,
prechecking the session value for a value which can't really happen
except for forged frames does not add any value.
2016-08-08 00:14:45 +02:00
Sylvain Rochet
455a41822e PPP, PPPoL2TP: cleanup connection state reset
Remove unnecessary cleanup at the end of session, cleanup as much as
possible in the connect callback instead. It follows what PPPoE is
currently doing and it makes everything simpler to read.
2016-08-07 23:25:48 +02:00
Sylvain Rochet
1ea1026961 PPP, PPPoE: cleanup connection state reset
Instead of relying on cleanup at the end of session, cleanup as much as
possible in the connect callback. It removes duplicated code and make
everything simpler to read.

While we are at it, remove useless initialization code from create
and connect functions.
2016-08-07 23:25:48 +02:00
Sylvain Rochet
09c22e13fe PPP: close link protocol if LCP is not started in ppp_close
ppp_close might try to close LCP even if LCP is not started, it happens
because because the PPP session might be waiting for the link protocol
to come up and we do not check that.

We say in the PPP documentation that ppp_close() can be called anytime,
so, if link protocol is currently trying to connect, we must cancel
the link connection.

Fix it by calling the link protocol disconnect callback if LCP is not
started yet.
2016-08-07 23:25:48 +02:00
Sylvain Rochet
7c02a85424 PPP, PPPoE: add support for disconnecting in link initiation state in disconnect callback
Disconnect callback does not currently support a disconnect event while
initiation is in progress. Retry timer is not stopped and PADT frame is
sent whatever the current state is. PADT frame can only be sent if we
received a PADS frame, otherwise sc_session is 0 and sending a PADT
frame is meaningless.

Fix both issues to allow calling the disconnect callback whatever the
PPPoE state is.
2016-08-07 23:25:48 +02:00
Sylvain Rochet
d15ebc6a4c PPP: don't restart LCP closing if termination is already in progress
We say in the PPP documentation that ppp_close() can be called anytime,
as of today, this is not entirely true, there are still conditions that
are not handled properly.

If PPP is already disconnecting, ppp_close() must do nothing and returns
ERR_INPROGRESS instead of messing up the PPP disconnection state.
2016-08-07 23:25:48 +02:00
Sylvain Rochet
f185104ac6 PPP: revamp PPP state order
Master state is almost exactly the same thing as dead state, move it
next to dead state. Holdoff state is actually the state just before
initialize, move it before initialize.

The goal is to be able to use > running or => terminate condition to
check a currently running disconnection phase, which is not possible
today without excluding master and holdoff states.
2016-08-07 23:25:48 +02:00
Sylvain Rochet
5811948b0a PPP: remove PPP_PHASE_MASTER conditions if multilink mode is disabled
PPP_PHASE_MASTER state is only used if multilink mode is enabled. Since
we don't support multilink mode checking for this state only add some
code for no value added at all.

Build-out PPP_PHASE_MASTER state check if multilink mode is disabled.
2016-08-07 23:25:48 +02:00
Sylvain Rochet
dd0779c204 PPP, move VJ_SUPPORT disabling if LWIP_TCP is not enabled to PPP options
Van Jacobson TCP header compression only apply if TCP is enabled,
therefore we need to disable VJ compression if TCP is disabled.

We already have conditions to enforce VJ disabling if IPv4 is disabled
or if PPPoS is disabled, add TCP to those conditions and remove
unecessary VJ_SUPPORT && LWIP_TCP conditions.
2016-08-07 23:25:48 +02:00
Dirk Ziegelmeier
f55c0e7864 Move rawapi.txt description to main page - this doc really should be found and read by users 2016-08-07 20:21:27 +02:00
Dirk Ziegelmeier
3ca4eb5cd8 Minor pbuf layer doc update 2016-08-07 20:21:27 +02:00
Axel Lin
0a7db8a9a5 PPP: remove double include for lwip/sys.h
Including it once is enough.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
2016-08-07 12:35:50 +02:00
Dirk Ziegelmeier
0673fcdb44 Fix mentioning functions that do not take pbufs as argument in pbuf layer docs 2016-08-07 10:16:18 +02:00
Dirk Ziegelmeier
980a919c9a Don't document IP type specific output functions, users should use IP type independent ones 2016-08-07 10:13:50 +02:00
Dirk Ziegelmeier
8d07629b71 Some documentation cleanups and include more comments that have been already in code into doxygen docs 2016-08-07 10:05:34 +02:00
Dirk Ziegelmeier
cf66233873 PBUF layer documentation clarification 2016-08-06 22:28:12 +02:00
Dirk Ziegelmeier
b94c8ee76f Add some more functions and macros to documentation 2016-08-06 22:16:49 +02:00
Dirk Ziegelmeier
73131b1677 Fix doxygen warning in ip6.c 2016-08-06 20:29:35 +02:00
Dirk Ziegelmeier
87855b0e0e Update doxgen docs: PBUF layers, IPv4 and IPv6 functions, add some missing tcp raw API functions 2016-08-06 20:28:49 +02:00
Dirk Ziegelmeier
70ee63ef3d Documentation: Add example code for NO_SYS use case 2016-08-05 09:53:50 +02:00
Sylvain Rochet
c2a5480ac7 PPP: remove useless ppp_link_start function
This function only set PPP to initialize phase, and it is only called at
the very beginning of functions where it is called. It means we could
as well set the initialize phase before calling those functions in the
PPP core.
2016-08-04 23:52:54 +02:00
Sylvain Rochet
01561b26ef PPP: set phase to establish before starting LCP
PPP is currently in initialize phase until authentication is started
or until we start IPCP negotiation.

It works, because PPP states are mostly used for user information, most
state are actually useless for PPP itself. Being in initialize state
while PPP is started is not very consistent, switch to establish phase
before starting LCP.
2016-08-04 23:43:46 +02:00
Sylvain Rochet
9b47b6393b PPP, PPPoE: remove useless PPPoE state conditions
sc->sc_ethif can't be NULL, it is set definitively in pppoe_create.

PPPoE can't by anything else than PADI sent in pppoe_send_padi, it
is only called when this is true.

PPPoE state can't be anything else than initial state in
pppoe_connect, this function is called from PPP core only when PPP
is in the dead phase, if PPP is in the dead phase it means the link
protocol is dead as well.

PPPoE can't be anything else than data phase in pppoe_disconnect
this function is only called by PPP core only when PPP session is up,
if PPP session is UP it means the link protocol is UP as well.

PPPoE can't by anything else than PADR sent in pppoe_send_padr, it
is only called when this is true.

PPPoE can't by anything else than PADO sent in pppoe_send_pado, it
is only called when this is true.

PPPoE can't by anything else than PADO sent in pppoe_send_pads, it
is only called when this is true.

PPPoE can't be anything else than session phase in pppoe_xmit,
function is only called by pppoe_write and pppoe_netif_output
which are both called by PPP core only when PPP session is up, if
PPP session is UP it means the link protocol is UP as well.
2016-08-04 23:06:30 +02:00
Sylvain Rochet
e8d8c5dcc9 PPP, L2TP: remove useless L2TP state conditions
L2TP state can't be anything else than initial state in
pppol2tp_connect, this function is called from PPP core only when PPP
is in the dead phase, if PPP is in the dead phase it means the link
protocol is dead as well.

L2TP can't be anything else than data phase in pppol2tp_xmit, this
function is only called by pppol2tp_write and pppol2tp_netif_output
which are both called by PPP core only when PPP session is up, if
PPP session is UP it means the link protocol is UP as well.

L2TP can't be anything else than data phase in pppol2tp_disconnect,
this function is only called by PPP core only when PPP session is up,
if PPP session is UP it means the link protocol is UP as well.
2016-08-04 23:03:03 +02:00
Sylvain Rochet
bae67915ab PPP: fix dead phase set too early
When we are disconnecting, we should switch to PPP dead phase at the
very end, because this is our final disconnection phase allowing
reconnect, therefore we should switch to dead phase after the link
protocol finished disconnecting.

We are currently switching to dead phase when LCP detected that the link
is down, this is obviously wrong. Fix this flaw by continuing in
disconnect phase until ppp_link_end is called from link protocol.
2016-08-04 22:06:45 +02:00
sg
5f774270b6 minor: tabs -> spaces 2016-08-03 21:25:32 +02:00
David van Moolenbroek
02221cf5dc Rename IP_HDRINCL to LWIP_IP_HDRINCL
In the BSD socket API world, IP_HDRINCL is a socket option for "raw"
sockets that indicates whether sent packets already include an IP
header.  Within lwIP, "IP_HDRINCL" is redefined as a special value
that indicates to lwIP-internal functions that an IP header is already
included.  While somewhat related, the two meanings are different and,
on platforms that define the IP_HDRINCL socket option, this results in
a conflict.  This patch renames the lwIP one to "LWIP_IP_HDRINCL",
thus resolving the conflict.
2016-08-03 20:51:21 +02:00
sg
dd110309e5 update some FILES list files 2016-08-03 20:21:54 +02:00
Dirk Ziegelmeier
da83946e75 Add one more documentation sentence in tcp.c 2016-08-03 12:34:16 +02:00
goldsimon
3d379c97ec IPv6 is NOT experimental any more :-) 2016-08-03 12:28:56 +02:00
goldsimon
018294d287 remove doubled include (tcpip.h) 2016-08-01 09:44:18 +02:00
goldsimon
247d2e97a0 minor: removed trailing spaces 2016-08-01 09:36:15 +02:00
goldsimon
92f385aaed fixed compiling lowpan6 for NO_SYS==1 2016-08-01 09:35:59 +02:00
Dirk Ziegelmeier
2f7e6d0661 Remove hard reference from netif.c to tcpip.c - avoids pulling in unnecessary code 2016-08-01 09:32:54 +02:00
Dirk Ziegelmeier
501cfbe02b Document netconn API some more 2016-07-31 16:59:12 +02:00
Dirk Ziegelmeier
a7979d7d24 Document lwIP error codes 2016-07-31 16:08:17 +02:00
Dirk Ziegelmeier
52d6d696ae Document lwIP version #defines 2016-07-31 16:05:42 +02:00
Dirk Ziegelmeier
e76b8b2551 Document SNMP MIB2 netif stats counters 2016-07-31 16:02:22 +02:00
Dirk Ziegelmeier
d00609257b Fix doxygen warning in netif.h (forgotten title) 2016-07-31 15:49:32 +02:00
Dirk Ziegelmeier
2c2d11fa4d Update documentation of netif_input function 2016-07-30 10:40:36 +02:00
Dirk Ziegelmeier
4cb7e31d2d Add missing #include in netif.c 2016-07-30 10:36:11 +02:00
Dirk Ziegelmeier
0c7d015ec4 Further improvement to netif input function autoselection: Select between netif_input() and tcpip_input() depending on NO_SYS setting 2016-07-30 10:29:14 +02:00
Dirk Ziegelmeier
4b67c582f6 Create netif_input function that decides according to netif flags where to pass an incoming packet.
Allow to pass a NULL pointer to netif_add() input function - if so, use the function mentioned above as input function.
2016-07-30 10:19:16 +02:00
Dirk Ziegelmeier
5f9c944da4 Add some netif related macros to docs 2016-07-30 10:06:06 +02:00
goldsimon
b7da649944 sio.h: include opt.h for checking #ifndef's 2016-07-29 08:01:41 +02:00
Dirk Ziegelmeier
90fba8773f Revert "Fix my messing of opt.h and the other options files - it was actually caused by a cyclic #include which I did not see"
It still does not work, due to #undef of options in opt.h, the documentation of many files is incomplete
This reverts commit 3f0dae29e9.
2016-07-28 23:34:16 +02:00
Dirk Ziegelmeier
3f0dae29e9 Fix my messing of opt.h and the other options files - it was actually caused by a cyclic #include which I did not see
Read the comments inside opt.h if you are interested.
2016-07-28 18:59:36 +02:00
Dirk Ziegelmeier
9fb9033815 Move MIB compiler to contrib, it's a better place for it 2016-07-28 14:33:15 +02:00
Dirk Ziegelmeier
8c620d9206 Restructure IPv6 config options
Add generate.bat to generate docs quickly under Windows OS
2016-07-28 09:21:16 +02:00
goldsimon
b4efa33b7c Removed the LWIP_HAVE_SLIPIF option: either the linker removes it when not used or you'll have to not compile it 2016-07-28 09:02:19 +02:00