Commit Graph

3787 Commits

Author SHA1 Message Date
sg
27f03798b9 Fixed possible problems with tcp_backlog_delayed/tcp_backlog_accepted 2016-03-25 16:19:39 +01:00
goldsimon
5b0a47ca87 removed unused return values of tcp_listen_input & tcp_timewait_input; fixed unused variable warning 2016-03-24 15:06:31 +01:00
Dirk Ziegelmeier
9b0a0841e9 Fix compile of snmp/snmp_mib2.c - don't know why I didn't notice yesterday... 2016-03-24 14:31:33 +01:00
goldsimon
0b4bc5ea31 minor whitespace change only 2016-03-24 07:15:27 +01:00
Dirk Ziegelmeier
cab341976e SNMP: Reduce #includes of snmp_mib2.c 2016-03-23 22:36:02 +01:00
Dirk Ziegelmeier
52a3bf5d43 SNMP: Cleanups after my last changes 2016-03-23 22:32:47 +01:00
Dirk Ziegelmeier
63c2dc926e SNMP: Move MIB2 ip subtree to separate file to get snmp_mib2.c smaller 2016-03-23 22:32:47 +01:00
Dirk Ziegelmeier
cc477361ad SNMP: Move MIB2 system subtree to separate file to get snmp_mib2.c smaller 2016-03-23 22:32:47 +01:00
Dirk Ziegelmeier
377885581f SNMP: Move MIB2 interfaces subtree to separate file to get snmp_mib2.c smaller 2016-03-23 22:32:47 +01:00
Dirk Ziegelmeier
7321420d8c SNMP: Move MIB2 ICMP subtree to separate file to get snmp_mib2.c smaller 2016-03-23 22:32:47 +01:00
Dirk Ziegelmeier
9466d64a9a SNMP: Move MIB2 TCP subtree to separate file to get snmp_mib2.c smaller 2016-03-23 22:32:47 +01:00
Dirk Ziegelmeier
d929a4b17e SNMP: Move MIB2 UDP subtree to separate file to get snmp_mib2.c smaller 2016-03-23 22:32:46 +01:00
Dirk Ziegelmeier
945607e094 SNMP: Move MIB2 SNMP subtree to separate file to get snmp_mib2.c smaller 2016-03-23 22:32:46 +01:00
sg
7721b20179 call accept-callback with ERR_MEM when allocating a pcb fails on passive open to inform the application about this error; ATTENTION: applications have to handle NULL pcb in accept callback! 2016-03-23 21:57:38 +01:00
sg
c6b742812d fixed bug #38203: DHCP options are not recorded in all DHCP ack messages (patch by Florent Matignon) 2016-03-23 21:06:52 +01:00
goldsimon
85d5fbdc7f lwip_accept: fixed returning EOPNOTSUPP instead of -1 (EOPNOTSUPP is set as socket error) 2016-03-23 14:27:40 +01:00
Axel Lin
449fc98a55 tcp_alloc(): Remove superfluous initialization for pcb->keep_cnt_sent
It's already done by memset(0). This was missed in commit 5794ac2340
"tcp_alloc(): remove explicit =0 already done by memset(0)", fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-03-23 14:26:32 +01:00
Dirk Ziegelmeier
7e7f2f31ff Cleanup and simplify tcpip_api_call() implementation a bit 2016-03-22 21:52:11 +01:00
Dirk Ziegelmeier
a1fc91afa8 Fix newly introduced tcpip_api_call did not return correct return value 2016-03-22 21:34:05 +01:00
goldsimon
c39ef75cb3 ... and another compiler error: tcp_nagle_enable() must stay at tcpflags_t, not using u16_t 2016-03-22 15:58:00 +01:00
goldsimon
7bda462031 fixed wrong commit: compatibility-define tcp_accepted() was accidentally commented-out 2016-03-22 15:54:14 +01:00
Dirk Ziegelmeier
f97bf85fd6 udp.c: Allow udp_connect() on a dual-stack UDP PCB (type IPADDR_TYPE_ANY). This may be useful in some applications - no need to keep separate storage for target IP. 2016-03-22 15:12:16 +01:00
sg
dd80759bb9 tcp: changed accept handling to be done internally: the application does not have to call tcp_accepted() any more. Instead, when delaying accept (e.g. sockets do), call tcp_backlog_delayed()/tcp_backlog_accepted() (fixes bug #46696) 2016-03-22 07:30:44 +01:00
sg
a1c78ea7bf ignore dns response parsing errors, only abort resolving for correct responses or error responses from correct server (bug #47459) 2016-03-22 07:22:17 +01:00
sg
5794ac2340 tcp_alloc(): remove explicit =0 already done by memset(0) 2016-03-18 22:05:17 +01:00
sg
44e1a2d8e2 define tcp_backlog_set() as dummy-define when backlog feature is disable 2016-03-18 20:05:04 +01:00
sg
149bb36805 fixed bug #47448 (netconn/socket leak if RST is received during close) 2016-03-17 21:49:01 +01:00
Joel Cunningham
93ccba9bcb don't fail closing a socket/netconn when failing to allocate the FIN segment; blocking the calling thread for a while is better than risking leaking a netconn/socket (see bug #46701)
Signed-off-by: sg <goldsimon@gmx.de>
2016-03-17 21:00:18 +01:00
sg
b24e5cd1c8 fixed compiling netconn_write_partly with LWIP_SO_SNDTIMEO==1 after recent api implementation changes (bug #47436, patch by William Hayes) 2016-03-17 20:15:22 +01:00
Dirk Ziegelmeier
7fbb5fc82a Fix netconn API in core locking mode 2016-03-17 09:31:50 +01:00
Dirk Ziegelmeier
464a8c9794 Delete script to compile MOBA MIB 2016-03-17 08:27:45 +01:00
Dirk Ziegelmeier
7aea739f87 PPPAPI: Don't return garbage in *_create calls in case tcpip_api_call() fails;
Let some functions return err_t instead of void because tcpip_api_call() may fail
2016-03-16 23:01:05 +01:00
sg
852d5b9c80 Optimize tcp_output runtime by not calling ip_route() for every segment sent 2016-03-16 22:31:33 +01:00
sg
b4d7238eb8 tcp_output_segment: don't count retransmitted segments in mib2.tcpoutsegs by detecting p->payload != tcphdr pointer; don't try to retransmit segments where p->ref != 1 (as it is invalid to mess up p->len/p->payload when we don't have exclusive access to the pbuf) 2016-03-16 22:22:20 +01:00
Dirk Ziegelmeier
ee87d28252 Rename tcpip_apimsg to netconn_apimsg (better suits naming convention in api_lib.c) 2016-03-16 22:02:47 +01:00
Dirk Ziegelmeier
6ffe12cede Readd struct protoype in api.h 2016-03-16 21:57:25 +01:00
Dirk Ziegelmeier
d6adc1f6cb Rename tcpip_send_api_msg to tcpip_send_msg_wait_sem (hopefully a little bit clearer name) 2016-03-16 21:57:24 +01:00
sg
5f8b5cbb20 reset rto timer on fast retransmission (see task #13757, patch by Joel Cunningham) 2016-03-16 21:49:37 +01:00
sg
7b9cb98bbb LWIP_TCPIP_CORE_LOCKING_INPUT is not experimental any more, as well 2016-03-16 21:48:47 +01:00
Dirk Ziegelmeier
222eb25eb5 Accidentally committed my MIB compiler test, sorry! 2016-03-16 21:38:22 +01:00
Dirk Ziegelmeier
dbfdb13166 LwipMibCompiler: Set MIB compiler as startup project instead of MIB viewer 2016-03-16 21:35:21 +01:00
Dirk Ziegelmeier
d38cdccbcd netconn API: Remove api_msg wrapper struct, it is not needed any more 2016-03-16 21:35:21 +01:00
Dirk Ziegelmeier
2575c7fb5f netconn API: Cleanup, remove lots of #defines, take advantage of new tcpip_send_api_msg function feature to abstract core locking away 2016-03-16 21:35:21 +01:00
Dirk Ziegelmeier
ea174560b1 tcpip.c tcpip_send_api_msg: Handle core locking case internally 2016-03-16 21:35:21 +01:00
Dirk Ziegelmeier
bc51dddcaf Add some comments to functions and #defines. According to Simon, LWIP core locking is not experimental any more. 2016-03-16 21:35:21 +01:00
sg
f09dec5fb7 ethernetif.c: implement SNMP counters, simplify input function: no need to check ethType, ethernet_input() already does this 2016-03-16 21:26:31 +01:00
sg
8e8571da6a fixed bug #46384 Segment size calculation bug with MSS != TCP_MSS 2016-03-16 16:56:15 +01:00
Dirk Ziegelmeier
0d576aa521 Fix bug #47426 incorrect typecast in pppapi.c 2016-03-16 12:37:08 +01:00
goldsimon
0e1b401abe sntp: fixed constness for SNTP_SERVER_DNS==1 2016-03-14 14:29:26 +01:00
Dirk Ziegelmeier
bf7fc41e0f LwipMibCompiler: Add windows command line example 2016-03-14 12:13:44 +01:00
Dirk Ziegelmeier
90bc1da434 LwipMibCompiler: Don't generate empty root nodes 2016-03-14 12:13:24 +01:00
Dirk Ziegelmeier
dc98e31e4d LwipMibCompiler: MibTree: Adapt coding style to the rest of the C# project 2016-03-14 12:13:05 +01:00
Dirk Ziegelmeier
1d7996dc47 tcpip API calls: Implement LWIP_NETCONN_SEM_PER_THREAD support for ALL API calls 2016-03-13 19:43:49 +01:00
Dirk Ziegelmeier
2b3db52c70 pppol2tp.c: Avoid an #ifdef - there is a new UDP API function that can be used here 2016-03-12 12:26:23 +01:00
Jan Breuer
b65a22b32a LwipMibCompiler: Don't preserve upper case on generated variables 2016-03-12 09:09:26 +01:00
Jan Breuer
b849e52c17 LwipMibCompiler: preserve upper case in comments 2016-03-12 09:09:22 +01:00
Jan Breuer
588b11185a LwipMibCompiler: Remove false positive root entities 2016-03-12 09:05:19 +01:00
Jan Breuer
dfc963880a LwipMibCompiler: Fix generating SnmpScalarArrayNode callbacks 2016-03-12 09:03:41 +01:00
Dirk Ziegelmeier
00975769a0 Minor TCPIP API call functions cleanup 2016-03-10 22:44:31 +01:00
Dirk Ziegelmeier
f7a3d6cca5 Port PPP API to new simple tcpip API call method 2016-03-10 22:44:25 +01:00
Dirk Ziegelmeier
8f71795844 Port netifapi to new simple tcpip API call method 2016-03-10 22:42:21 +01:00
Dirk Ziegelmeier
8106413644 tcpip.c: Implement an easier way for TCPIP API calls - client code does not have to deal with semaphores and core locking any more 2016-03-10 22:42:21 +01:00
sg
5e472badf1 Work on bug #44595: remove check for recvmbox != NULL from netconn_recv() to let it return ERR_CLSD for half-closed TCP connections 2016-03-10 21:20:25 +01:00
Axel Lin
2a2f92f7c2 Make ERR_IS_FATAL() test first fatal error instead of last non-fatal error
This way, we don't need to update ERR_IS_FATAL() every time new non-fatal error
is added. Also drop 2 empty lines so the error constants present in 2 groups,
non-fatal errors and fatal errors.
2016-03-10 07:21:34 +01:00
Dirk Ziegelmeier
f3b7bca3cf Fix bug #47370: Port DNS client to IPv6 2016-03-09 19:25:06 +01:00
Dirk Ziegelmeier
9fbf5a4004 SNMP: Support LWIP_TCPIP_CORE_LOCKING sync method 2016-03-09 08:39:56 +01:00
sg
5d637360cc fixed ERR_IS_FATAL() after changing ERR_IF to non-fatal 2016-03-08 21:04:21 +01:00
Dirk Ziegelmeier
7d8f0c781f Fix wrong usage of LWIP_NETCONN_SEM_PER_THREAD macro in api_msg.h 2016-03-08 19:53:37 +01:00
Dirk Ziegelmeier
a212210c35 Add missing #include in memp.c 2016-03-08 19:53:01 +01:00
Dirk Ziegelmeier
ba40925335 tcpip_send_api_msg function is only needed in non-core-locking mode 2016-03-08 19:41:32 +01:00
Dirk Ziegelmeier
eab92ccb03 netifapi: Eliminate wrapper struct netifapi_msg and rename netifapi_msg_msg to netifapi_msg 2016-03-08 19:41:32 +01:00
Dirk Ziegelmeier
fc17d02451 Fix compile with LWIP_TCPIP_CORE_LOCKING 2016-03-08 19:41:32 +01:00
Dirk Ziegelmeier
37d514c949 Minor cleanups in #includes and comments 2016-03-08 19:41:32 +01:00
Dirk Ziegelmeier
a4297ef0fd Reduce includes of tcpip_priv.h 2016-03-08 19:41:32 +01:00
Dirk Ziegelmeier
c65eca58c9 Decouple tcpip.c/tcpip_priv.h from netconn API 2016-03-08 19:41:32 +01:00
Dirk Ziegelmeier
18bb74e5c5 Decouple tcpip.c/tcpip_priv.h from PPP API
PPP API can now be moved to netif/ppp subdir
2016-03-08 19:41:32 +01:00
Dirk Ziegelmeier
af1978fa4e Implement generic API message handling
Add generic tcpip_send_api_msg function
Let netif API and netconn API use it
Decouple tcpip.c and tcpip_priv.h from netif API
2016-03-08 19:41:32 +01:00
sg
5cf802eda0 dns_gethostbyname: return error code if no valid server is set instead of calling the 'found' callback in this case (fixes bug #46887) 2016-03-07 19:47:39 +01:00
Joel Cunningham
80cc988f2f Optimize sendmsg UDP pbuf chain creation
This commit optimizes the sendmsg UDP pbuf chain creation by not
allocating/freeing a netbuf per io vector and instead building a pbuf
chain directly in the sockets layer
2016-03-07 09:26:58 -06:00
sg
076795562e fixed typo in one of the last commits 2016-03-06 20:59:50 +01:00
sg
f5fef6eebc fixed bug #45353: IPv6 router / neighbor relationship is not always consistent - patch by Stian Sebastian Skjelstad 2016-03-06 14:48:41 +01:00
sg
375ec36246 ERR_IF is not necessarily a fatal error (fixes bug #46338: UDP netconns block after fatal error) 2016-03-05 16:15:04 +01:00
sg
b00a17059a fixed icmp_send_response with LWIP_HOOK_IP4_ROUTE_SRC enabled 2016-03-05 15:57:40 +01:00
Dirk Ziegelmeier
bcab7fef84 netifapi.c: Fix compile when IPv4 is not enabled 2016-03-05 15:55:53 +01:00
sg
d2bb569ee4 bug #46094: moved IPv4 routing hook functions down so that they implement actual routing (source-based IPv4 routing is not affected by this change) 2016-03-05 15:52:39 +01:00
Dirk Ziegelmeier
52b426a343 ip_addr.h: Use IP_GET_TYPE macro in other macros 2016-03-05 14:35:29 +01:00
Dirk Ziegelmeier
f4fbc90217 netifapi: Do not pass NULL pointers for IP addresses to subsequent functions
Same as in my last commits - this avoids errors in lwIP code where ip addresses are dereferenced (e.g. for IP type checking) without handling thinking about NULL pointers.
2016-03-05 14:35:29 +01:00
sg
e0ab8c581d fixed bug #46093: Move IP6_ROUTE() hook to after LL processing 2016-03-05 14:11:24 +01:00
Dirk Ziegelmeier
094cdf1c7b netconn: Create API macros to get/set IPV6ONLY flag 2016-03-04 23:06:33 +01:00
Dirk Ziegelmeier
814577fcc6 snmp: Fix snmp_oid_to_ip for IPADDR_ANY_TYPE ips 2016-03-04 22:46:54 +01:00
Dirk Ziegelmeier
15925b66c6 Fix ip_addr_cmp to correctly compare IPADDR_ANY_TYPE ips 2016-03-04 22:46:18 +01:00
Dirk Ziegelmeier
925b280fd2 Apply patch from Elias Önal to fix a few datatypes in SNMP MIB2 2016-03-04 22:35:09 +01:00
sg
6b405eccd0 Tried to fix bug #47270 by accepting all ipv4 multicast packets (at IP level) when LWIP_IGMP is disabled 2016-03-04 21:57:47 +01:00
goldsimon
15326cdbad Added macro to get the ip address type 2016-03-04 09:07:50 +01:00
Dirk Ziegelmeier
bd0b51c9ef Fix my previous netconn_do_listen changes in lwip_netconn_do_listen 2016-03-03 23:16:01 +01:00
Dirk Ziegelmeier
9a4c66006e Fix compile error in raw.c (possible unused arg) 2016-03-03 22:55:42 +01:00
Dirk Ziegelmeier
1c52780b62 snmp_netconn: Use new "socket-like" netconn API dual-stack implementation 2016-03-03 22:52:43 +01:00
Dirk Ziegelmeier
bee5515e9a netconn API: Reimplement dual-stack API to be socket-like.
When IPv6 ANY address is used and the NETCONN_FLAG_IPV6_V6ONLY is NOT set, bind/listen on/to IP_ANY_TYPE
2016-03-03 22:52:04 +01:00
Dirk Ziegelmeier
0a7f404d09 api_lib.c: Don't propagate NULL pointers as ip address to subsequent functions 2016-03-03 22:49:55 +01:00
Dirk Ziegelmeier
1dea649cff Fix comment in tcp.c 2016-03-03 22:48:10 +01:00