Commit Graph

276 Commits

Author SHA1 Message Date
goldsimon
025d5591eb httpd improvements: added persistent connections, improved asynchronous read mode, compile-time deflate compression, new CGI mode, SSI handler can be called with tag string (instead of tag index) 2016-04-26 13:00:27 +02: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
Dirk Ziegelmeier
083c6123d6 snmpv3_dummy.c: Add newline at end of file 2016-04-05 13:18:54 +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
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
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
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
Dirk Ziegelmeier
464a8c9794 Delete script to compile MOBA MIB 2016-03-17 08:27:45 +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
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
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
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
9fbf5a4004 SNMP: Support LWIP_TCPIP_CORE_LOCKING sync method 2016-03-09 08:39:56 +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
925b280fd2 Apply patch from Elias Önal to fix a few datatypes in SNMP MIB2 2016-03-04 22:35:09 +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
eead3a7038 Simon says: dual-stack does not work on iperf because there IPs encoded in the payloads and IPv6 is not supported there in the current lwIP implementation -> revert 2016-03-03 13:06:55 +01:00
Dirk Ziegelmeier
ce370ec48f Compile fix lwiperf.c after my last change 2016-03-03 12:23:34 +01:00
Dirk Ziegelmeier
24ebf6bd6f Implement dual-stack in lwiperf, netbiosns and sntp 2016-03-03 12:15:57 +01:00
Dirk Ziegelmeier
b0d4386744 Adapt HTTP server to new dual-stack API 2016-03-02 23:47:09 +01:00
Dirk Ziegelmeier
babb247e2a SNMP MIB2: Fix temporary OID buffer size some tables have been too small 2016-03-02 23:09:51 +01:00
Dirk Ziegelmeier
4bbfc3857a Implement dual-stack in SNMP for netconn API 2016-02-29 19:31:19 +01:00
Dirk Ziegelmeier
2289673a30 Implement support for IP_ANY_TYPE in SNMP 2016-02-29 19:31:19 +01:00
Dirk Ziegelmeier
953b7bdd59 Implement UDP dual-stack PCB support
Create special IP address type "IPADDR_TYPE_ANY" for it.
SNMP uses new feature in non-netconn mode.

TODO: Same for TCP & RAW, adapt NETCONN to use this feature
2016-02-24 22:37:01 +01:00
Dirk Ziegelmeier
6650eb4cd2 snmp_traps.c: Fix compile on Win32 - missing string.h include
Catch possible strlen returnvalue > 0xffff
2016-02-23 10:06:46 +01:00
Dirk Ziegelmeier
c805843e64 Change signature of ip_output, ip_output_if, ip_output_if_src, ip_output_hinted, ip_route, ip_netif_get_local_ip, ip_route_get_local_ip and tcp_eff_send_mss not to take an isipv6 parameter. Use the IP version of the destination address instead. 2016-02-22 13:38:40 +01:00
Dirk Ziegelmeier
bbb5e99f25 Fix netconn access after it was freed in lwiperf - found by Coverity 2016-02-19 23:26:06 +01:00
Dirk Ziegelmeier
cf3d7def33 Let MIB compiler generate const structs, too (see last commit) 2016-02-17 08:14:16 +01:00
Dirk Ziegelmeier
24bc77a935 Found some struct instances that can be const 2016-02-16 22:31:59 +01:00
Dirk Ziegelmeier
5aa5563622 snmp_msg.c: Fix unchecked return value. Found by Coverity. 2016-02-10 21:57:57 +01:00
Dirk Ziegelmeier
09b850cc6f snmp_threadsync.c: Fix ignored return value of mutex/semaphore creation. Found by Coverity. 2016-02-10 21:55:50 +01:00
Dirk Ziegelmeier
e5eba61cf0 SNMP: Correctly name a global variable 2016-02-10 20:32:50 +01:00
Dirk Ziegelmeier
54a2c13b2e SNMP: Fix compile in dual-stack configuration 2016-02-06 00:21:06 +01:00
Dirk Ziegelmeier
b2410e428a SNMP: Remove comment about traps in README 2016-02-04 16:22:43 +01:00
Dirk Ziegelmeier
208f24a20c SNMP: Add some comments in thread sync code 2016-02-04 16:20:46 +01:00
Dirk Ziegelmeier
8cd33a5e41 SNMP: Implement basic SNMPv1 traps; Remove IPv6 support in RAW API again until there is a clean solution for dual-stack UDP 2016-02-04 16:19:59 +01:00
Dirk Ziegelmeier
905a434179 snmp_pbuf_stream: Reduce code duplication. Most is already implemented in lwIP pbuf framework. 2016-02-03 08:39:41 +01:00
Dirk Ziegelmeier
28549e35fe SNMP: Update threadsync not to use mem_malloc - memory can be instantiated statically since it is only needed once per threadsync instance 2016-02-02 22:31:59 +01:00
Philipp Toelke
1de8d432d4 httpd: fix sending of data from send_headers 2016-01-29 09:26:29 +01:00
Dirk Ziegelmeier
90df2111b7 SNMP: Add missing closing braces in #ifdef __cplusplus case 2016-01-22 13:28:11 +01:00
Joel Cunningham
0a67c06b51 Fix type on snmp_set_test_ok to be snmp_err_t
This function was returning values from snmp_err_t but wasn't
upgraded to using the typedef after commit babce70

This resulted in compilation failure on MSVC 2013
2016-01-20 11:18:35 -06:00
Dirk Ziegelmeier
4cf509989f SNMP: Fix variable naming in snmp_pbuf_stream 2016-01-20 10:53:15 +01:00
Dirk Ziegelmeier
dc36dbac27 SNMP MIB2: Add unsupported snmpSilentDrops and snmpProxyDrops objects 2016-01-15 11:46:35 +01:00
Dirk Ziegelmeier
d9534325cf SNTP: Add function to get operating mode 2016-01-15 11:41:12 +01:00
Dirk Ziegelmeier
c2ba9129ad SNMP: Fix InetAddress octet string encoding (length was missing) 2016-01-13 13:04:37 +01:00
Dirk Ziegelmeier
40ff62fa60 SNMP MIB Compiler: Update project settings, fix wrong output path in SharpSnmpLib 2016-01-12 08:40:12 +01:00
Dirk Ziegelmeier
84397ef013 SNMP MIB Compiler: Treat read-create nodes as read-only 2016-01-11 20:28:01 +01:00
Dirk Ziegelmeier
a2b7cec17b SNMP MIB Compiler: Add example command line to compile UDP-MIB 2016-01-11 20:15:17 +01:00
Dirk Ziegelmeier
e80e7a10d4 SNMP MIB Compiler: Resolve MIB files in a case-insensitive way 2016-01-11 20:14:54 +01:00
Dirk Ziegelmeier
8c4d1909f4 SNMP MIB Compiler: Deal with multiple OID assignments in a MIB file 2016-01-11 19:45:57 +01:00
Dirk Ziegelmeier
bb8ecd7e08 SNMP: Add some basic MIBs 2016-01-11 19:45:25 +01:00
Dirk Ziegelmeier
44256740bd SNMP MIB Viewer: Adapt to changes in SNMP framework that were required to compile UDP-MIB and TCP-MIB 2016-01-11 12:25:47 +01:00
Dirk Ziegelmeier
b68e801975 MIB compiler: Eliminate the need for a cast 2016-01-11 10:32:33 +01:00
Dirk Ziegelmeier
987f0e3016 Update SNMP README - add correct SharpSnmpLib reference 2016-01-11 10:26:37 +01:00
Dirk Ziegelmeier
713deba83f SNMP MIB compiler: Add ability to generate UDP-MIB and TCP-MIB 2016-01-11 10:24:31 +01:00
Dirk Ziegelmeier
b9d0d80946 SNMP: Add more MIB compiler info 2016-01-09 14:35:51 +01:00
Dirk Ziegelmeier
84cd489d24 SNMP: Add MIB compiler (code generator) 2016-01-09 12:39:48 +01:00
Dirk Ziegelmeier
fbdfba2509 SNMP: Found the correct cause of a memory leak 2016-01-07 09:52:13 +01:00
Dirk Ziegelmeier
e033866651 Merge branch 'master' of ssh://git.sv.gnu.org:/srv/git/lwip 2016-01-05 10:00:21 +01:00
Dirk Ziegelmeier
76094b8c7e SNMP: SMEMCPY should only be used when size is known at compile time 2016-01-05 09:59:42 +01:00
Dirk Ziegelmeier
e336f877c2 Merge branch 'master' of ssh://git.sv.gnu.org:/srv/git/lwip 2016-01-04 21:27:39 +01:00
Dirk Ziegelmeier
7f699b36ff Update some MIB2 comments 2016-01-04 21:27:24 +01:00
Dirk Ziegelmeier
e041b9a51c SNMP: Fix shadowing warning in another file. Pointed out by Erik Ekman. 2016-01-04 13:30:02 +01:00
Dirk Ziegelmeier
0a222a2ff7 SNMP: Fix shadowing warning pointed out by Erik Ekman 2016-01-04 12:31:09 +01:00
Dirk Ziegelmeier
d4361fc7d7 snmp_traps.c: #if 0 ... #endif around C++ style comments does not work - remove the code completely for now 2016-01-04 11:41:17 +01:00
Dirk Ziegelmeier
44617bfa9b Fix compile of SNMP on MSVC 2016-01-04 11:26:36 +01:00
Dirk Ziegelmeier
6352106aaa Fix C++ style comment in snmp_asn1.h 2016-01-04 11:05:44 +01:00
Dirk Ziegelmeier
7412a0e74e SNMP: Move common MIB code into snmp_core.c helper functions 2016-01-02 21:29:01 +01:00
Dirk Ziegelmeier
19d17adcfb SNMP MIB2: Implement tcpConnectionTable 2016-01-02 20:55:14 +01:00
Dirk Ziegelmeier
e1e7a704e1 SNMP MIB2: Implement tcpListenerTable 2016-01-02 20:06:53 +01:00
Dirk Ziegelmeier
19dd6c391f SNMP MIB2: Update UDP endpoint table variable names 2016-01-01 23:09:54 +01:00
Dirk Ziegelmeier
c5cab4e719 SNMP RAW API: Listen on IPV6 UDP port, too 2016-01-01 22:59:00 +01:00
Dirk Ziegelmeier
b48f6d1405 Add comment about udpEnpointTable non-accessible columns 2016-01-01 22:00:39 +01:00
Dirk Ziegelmeier
c466f8824f SNMP: Finish implementing UDP-MIB. Add unsupported udpHCInDatagrams and udpHCOutDatagrams items. 2016-01-01 21:58:51 +01:00
Dirk Ziegelmeier
2b16cd93bf SNMP: Another release_instance call bugfix in SNMP Get/GetNext requests 2016-01-01 20:58:02 +01:00
Dirk Ziegelmeier
0c39165701 SNMP: Two bugfixes in SNMP GET requests 2016-01-01 20:44:16 +01:00
Dirk Ziegelmeier
9d1234d83a Add some comments and OID checks to udpEndpointTable 2015-12-31 16:19:26 +01:00
Dirk Ziegelmeier
dfaa979b99 Start working on udpEndpointTable 2015-12-31 16:13:45 +01:00
Dirk Ziegelmeier
611966de63 SNMP: Cleanup snmp IP helper functions, add IPv6 support 2015-12-29 22:06:23 +01:00
Dirk Ziegelmeier
4341df4094 SNMP: Fix compile when IPV4 is not enabled 2015-12-28 22:28:01 +01:00
Dirk Ziegelmeier
83f8ec1397 Some SNMP MIB2 code layout cleanups 2015-12-28 21:37:17 +01:00
Dirk Ziegelmeier
fdd98879bf C-Style comments only, please 2015-12-26 12:17:07 +01:00
Dirk Ziegelmeier
5e34b8736a Minor SNMP compile and comment fix 2015-12-26 12:02:16 +01:00
Dirk Ziegelmeier
7b946fa9b1 SNMP agent rewrite
- SNMPv2c support
  - Greatly reduced RAM usage, no memory pools any more
  - API cleanup
  - MIB2 is separated from SNMP stack
  - Support for multiple MIBs (snmp_set_mibs call) - e.g. for private MIB
  - Improved MIB2 implementation (tcpConnTable etc.)
  - Redesigned simple and generic API for MIB implementation
  - Comfortable node types for scalar arrays and tables
  - Counter64, bit and truthvalue datatype support
  - Callbacks for SNMP writes
  - Runs on two APIs: RAW and netconn
  - Async API is gone - the stack now supports netconn API instead,
    so blocking operations can be done in MIB calls.
    SNMP runs in a worker thread when netconn API is used.
  - Simplified thread sync support for MIBs - useful when MIBs
    need to access variables shared with other threads without locking
    (used in MIB2 to access lwIP stats from lwIP thread)

Currently in work:
  - Traps rewrite
  - MIB compiler
2015-12-26 11:43:29 +01:00
Dirk Ziegelmeier
0c06f09d6d makefsdata.c: Adapt to new header include location 2015-12-09 12:48:02 +01:00
Dirk Ziegelmeier
b8e94ec066 lwiperf: TX buffer can be static 2015-11-18 07:52:04 +01:00
Dirk Ziegelmeier
e15872982e Add iperf to apps;
Fix compile of lwiperf.c
2015-11-18 07:46:39 +01:00
Dirk Ziegelmeier
c69dede728 Move httpd from contrib to main git repository 2015-11-16 12:27:24 +01:00
Dirk Ziegelmeier
cacbd596c9 Move some prototypes from snmp_msg.h to snmp.h because they are used by user code 2015-11-14 19:50:57 +01:00
Dirk Ziegelmeier
6203737093 Rename snmp_mib2.h to snmp.h so source compatibility for user netif implementations is preserved 2015-11-12 21:25:42 +01:00
Dirk Ziegelmeier
5f642eb3e3 Completely decouple SNMP stack from lwIP core by using private memory pools;
Move SNMP stack to apps;
API breaking change: Users need to call snmp_init() now!
2015-11-12 21:21:14 +01:00
sg
a7ee681515 netbios -> netbiosns, added netbiosns_opts.h, added netbiosns_set_name() and netbiosns_stop() 2015-10-08 22:13:00 +02:00
sg
b02bcde8e0 added netbios name server from contrib (-> netbiosns) 2015-10-08 22:05:55 +02:00
sg
bef5ccda0b removed spaces at line ending, fixed include guard 2015-10-08 21:46:43 +02:00
sg
a2cd2ae5a8 lwiperf: fixed const-cast warning 2015-10-08 21:22:35 +02:00
sg
698e20a990 Added lwiperf, a simple ipv4/tcp iperf peer 2015-10-08 21:14:14 +02:00
sg
22957a8082 added sntp_opts.h (all options for the sntp app), added FILES to describe the include folder 2015-10-07 22:24:32 +02:00
sg
8dfd5e82cb first 'app': added SNTP client from contrib (unmodified from 196cbae376dfd484b4833503dd43057b4c3462fa, 28.08.2015) 2015-10-07 22:16:48 +02:00