Commit Graph

3814 Commits

Author SHA1 Message Date
Dirk Ziegelmeier
76d25befb4 Work on task #13907 PPP cleanups: Move PPP options from opt.h to dedicated ppp_opts.h file 2016-04-21 22:28:14 +02:00
Dirk Ziegelmeier
749f7fae1a Move PPP API files to netif/ppp subdir 2016-04-21 21:47:26 +02:00
Dirk Ziegelmeier
61d07f88f0 Fix bug #47749: #define ETHARP_TRUST_IP_MAC does not compile 2016-04-21 21:21:56 +02:00
Joel Cunningham
8ac1b4825a udp: use netif addr as src for multicast sockets
Sockets bound to a multicast address could not transmit multicast
packets because the pcb local address did not match the netif address
even if the outgoing netif was resolved correctly.

To correct the issue, pcbs with a multicast local address will use
the outgoing netif address as the source address in IPv4.
2016-04-18 16:36:13 -04:00
Dirk Ziegelmeier
87354abf0f snmpv3_mbedtls.c: snmpv3_crypt() is only needed when LWIP_SNMP_V3_CRYPTO is enabled 2016-04-14 08:26:29 +02:00
Dirk Ziegelmeier
0b6370b9b8 SNMPv3: Make receiving DES encrypted frames work, sending still fails because of broken padding 2016-04-11 22:04:28 +02:00
Dirk Ziegelmeier
92f5da8412 two minor fixes in snmpv3_mbedtls.c 2016-04-07 06:58:58 +02:00
Dirk Ziegelmeier
309e072238 Create new IP_IS_V4 macros and use them at instead of !IP_IS_V6 - since we now have an IPADDR_ANY_TYPE, just checking for !V6 does not mean it is V4 2016-04-06 22:31:31 +02:00
Dirk Ziegelmeier
ab2c65549d Avoid divisions / module in SNMP code on stupid compilers
Signed-off-by: goldsimon <goldsimon@gmx.de>
2016-04-06 11:16:54 +02:00
sg
ca1b8288de prepare for overriding current timeout implementation: all stack-internal caclic timers are avaliable in the lwip_cyclic_timers array 2016-04-05 23:01:57 +02:00
sg
8c7f513f4d patch #8358: allow more combinations of listening PCB for IPv6 2016-04-05 22:04:19 +02:00
sg
16c70dd60e fixed bug# 43739 (Accept not reporting errors about aborted connections): netconn_accept() returns ERR_ABRT (sockets: ECONNABORTED) for aborted connections, ERR_CLSD (sockets: EINVAL) if the listening netconn is closed, which better seems to follow the standard 2016-04-05 21:42:10 +02:00
sg
03e9c88488 fixed bug #47625 (Error in compilation of C++ source using netifapi macros) by changing NULL define for __cplusplus 2016-04-05 21:04:06 +02:00
sg
0731eda0b3 make autoip_supplied_address() take a const pointer, too 2016-04-05 20:38:11 +02:00
Dirk Ziegelmeier
083c6123d6 snmpv3_dummy.c: Add newline at end of file 2016-04-05 13:18:54 +02:00
Dirk Ziegelmeier
12a4cae404 Apply [patch #8969] from Freddie Chopin: Constify netif in dhcp_supplied_address() 2016-04-05 13:18:27 +02:00
Dirk Ziegelmeier
3a26e8b6cc Fix build when snmpv3 is not available. One more thanks, Erik :-) 2016-04-04 22:10:59 +02:00
Dirk Ziegelmeier
28652d4d51 Fix build when mbedtls is not available :-) Thanks Erik! 2016-04-04 22:07:50 +02:00
Dirk Ziegelmeier
b67427bd3b Commit Elias Oenal's SNMPv3 work, with some restructuring:
- The abstraction from crypto framework was not well suitable to MBEDTLS, so I decided to move everything into an own file.
- I removed several #defines and created function prototypes instead - this is more type-safe, and users don't need to reinvent the function signatures.
- Header files were splitted into a public and a private part.
- Only SNMPv3 authentication was tested, privacy not yet.
2016-04-04 18:55:32 +02:00
Dirk Ziegelmeier
3a7c998f91 Fix bug #47592: pppapi_do_ppp_set_notify_phase_callback has invalid parameter type
... and one more I missed in my conversion yesterday
2016-04-01 10:38:27 +02:00
Dirk Ziegelmeier
141aeaab3d Fix shadowing warning (when compiling in C++) in TCPIP call API. Reported by Freddie Chopin. 2016-03-31 19:52:20 +02:00
Dirk Ziegelmeier
c8b65f6c1d Fix #define IPADDR_STRLEN_MAX in IPv6 only and dual-stack case 2016-03-30 11:20:54 +02:00
Dirk Ziegelmeier
d70d9bf866 SNTP: Add function to get SNTP enabled state 2016-03-30 11:20:16 +02:00
Dirk Ziegelmeier
4bd57882b0 Fix SNMP compile on Win32 due to missing #includes 2016-03-29 16:51:33 +02:00
Dirk Ziegelmeier
52fdc6bb3e Partly apply Elias Oenal's SNMP V3 patch, part 2: Add SNMPv3 support routines. Crypto does not work yet. 2016-03-29 10:28:33 +02:00
Dirk Ziegelmeier
d0c3baf340 Partly apply Elias Oenal's SNMP V3 patch. There is more to come, the work is incomplete at the moment and does not compile when LWIP_SNMP_V3 is enabled. 2016-03-29 10:28:33 +02:00
Dirk Ziegelmeier
d8784a77b7 Fix bug #47556: snmp agent uses wrong err 'ERR_ABRT' - use ERR_ARG as old code. Was tested to be != ERR_OK only, so actual code did not matter 2016-03-28 16:57:36 +02:00
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