Commit Graph

4368 Commits

Author SHA1 Message Date
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
af48bec63c Update MDNS docs after porting to dual-stack API 2016-08-14 17:12:01 +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
4d85def20a Update README applications sections 2016-08-14 15:39:58 +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
36b9caed23 Fix compile of unit test 2016-08-11 23:54:59 +02:00
Dirk Ziegelmeier
13251526fa Strip path prefix in doxygen docs - no /home/dziegel/ in the future :-) 2016-08-11 21:25:28 +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
6ba03d543f Activate TCP backlog in documentation 2016-08-09 08:18:42 +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
Dirk Ziegelmeier
4b41ef551e Add note about Filelists.mk in UPGRADING document 2016-08-08 21:55:08 +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
Dirk Ziegelmeier
10332773ff Remove tcp_accepted() from rawapi.txt. Thanks to Sergio Caprile for pointing this out! 2016-08-08 16:09:26 +02:00
Dirk Ziegelmeier
fa568f7750 Fix typos in docs 2016-08-08 12:16:17 +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