Dirk Ziegelmeier
51369854b5
Fix bug #52911 : SNMPv3 time window check is not the same as RFC3414
2018-01-16 13:30:31 +01:00
Dirk Ziegelmeier
653313cb37
Work on task #14780 : Add debug helper asserts to ensure threading/locking requirements are met
...
Add LWIP_ASSERT_CORE_LOCKED() to several more places
2018-01-12 13:15:36 +01:00
Axel Lin
5cd6c38893
apps/snmp: Fix buld error when LWIP_SNMP_CONFIGURE_VERSIONS=1
...
The version check is done in these functions, it should be ok to put
assert in the else clause.
Fix below build errors:
../../../../lwip/src/apps/snmp/snmp_msg.c: In function ‘snmp_version_enabled’:
../../../../lwip/src/apps/snmp/snmp_msg.c:87:1: error: embedding a directive within macro arguments is not portable [-Werror]
#if LWIP_SNMP_V3
^
../../../../lwip/src/apps/snmp/snmp_msg.c:89:1: error: embedding a directive within macro arguments is not portable [-Werror]
#endif
^
../../../../lwip/src/apps/snmp/snmp_msg.c: In function ‘snmp_version_enable’:
../../../../lwip/src/apps/snmp/snmp_msg.c:126:1: error: embedding a directive within macro arguments is not portable [-Werror]
#if LWIP_SNMP_V3
^
../../../../lwip/src/apps/snmp/snmp_msg.c:128:1: error: embedding a directive within macro arguments is not portable [-Werror]
#endif
^
cc1: all warnings being treated as errors
/home/axel/git/lwip/lwip-contrib/ports/unix/../Common.allports.mk:94:
recipe for target 'snmp_msg.o' failed
make: *** [snmp_msg.o] Error 1
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-11-22 16:53:00 +01:00
Dirk Ziegelmeier
7eb462867b
Fix follow-up to [bug #52315 ] Minor typo in output of MIB compiler
...
LWIP_SNMP_OBJ_ID_LEN -> SNMP_MAX_OBJ_ID_LEN
2017-11-05 11:51:23 +01:00
Dirk Ziegelmeier
3ed24085fa
Reformat SNMP code using astylerc
2017-09-17 20:29:18 +02:00
Dirk Ziegelmeier
0eb8d19e82
Move several port number #defines to iana.h
2017-08-08 11:37:08 +02:00
Dirk Ziegelmeier
0d23d686eb
snmp_asn1.c: Fix handling of u64 values
2017-07-26 12:48:19 +02:00
Dirk Ziegelmeier
0dabc8df9b
snmp_asn1: Surround u64_t handling functions with #if LWIP_HAVE_INT64
2017-07-26 09:42:41 +02:00
Dirk Ziegelmeier
b7e24fdc58
Accidentally removed a break statement in my last commit
2017-07-26 09:32:40 +02:00
Dirk Ziegelmeier
aa4d978448
Fix [bug #51520 ] Big endian bug in apps/snmp/snmp_asn1.c
...
Apply patch from Art Heers that does not need endianess checks
2017-07-26 09:28:07 +02:00
Dirk Ziegelmeier
f5d7535323
Work on [bug #51577 ] snmp/asn1: 64 bit encoding/decoding seems broken for big endian
...
We should support COUNTER64 data type only when we have u64_t on the system
2017-07-26 09:27:11 +02:00
goldsimon
4c13c32473
fix bug #51578 (SNMP failed to decode some values on non 32bit platforms)
2017-07-26 08:41:13 +02:00
goldsimon
f3c860958f
-Wconversion (still far from finished) and other minor compilation fixes...
2017-07-06 22:47:11 +02:00
Axel Lin
bf510fee51
SNMP: Cleanup unreachable code
...
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
2017-05-04 09:15:29 +02:00
goldsimon
aa0601a66d
snmp_asn1_dec_tlv: explicitly check 'length_bytes > pbuf_stream->length' (for clarity, even if it would fail in pbuf_stream later)
2017-03-30 21:31:44 +02:00
Dirk Ziegelmeier
4a7569fc2d
SNMP traps: Fix ignored return values
2017-03-30 13:01:10 +02:00
Dirk Ziegelmeier
132c285fd4
SNMP. Fix several ignored return values
2017-03-30 12:50:32 +02:00
Dirk Ziegelmeier
2673e635a3
Fix community string length copying - correctly handle long strings
2017-03-30 11:09:35 +02:00
Dirk Ziegelmeier
8d149e63a6
SNMP: strcpy -> strncpy, strlen -> strnlen
2017-03-30 08:57:53 +02:00
Dirk Ziegelmeier
40df1474cc
SNMP: Advertise SNMPv3 support
2017-03-28 21:33:37 +02:00
Dirk Ziegelmeier
e15e504217
Some minor SNMPv3 related cleanups
2017-03-06 09:38:58 +01:00
Dirk Ziegelmeier
02be2f8f42
Move snmpv3_dummy.* from main lwIP rep to contrib
2017-03-03 13:42:37 +01:00
Dirk Ziegelmeier
9719c52e62
SNMPv3: Missed two locations where the new enums can be used
2017-03-03 13:21:22 +01:00
Dirk Ziegelmeier
c961ac70b6
Fixump snmp/snmpv3_dummy.h copyright header
2017-03-03 13:17:06 +01:00
Dirk Ziegelmeier
6f485cc870
snmp/snmpv3_dummy.c: Set default configuration in snmpv3_dummy_init()
...
(Note: snmpv3_dummy.* will be moved to lwip-contrib soon)
2017-03-03 13:12:47 +01:00
Dirk Ziegelmeier
461f1fe1a9
More SNMPv3 cleanups: Create own header snmpv3_dummy.h and move functions in there
...
Decouple snmp_netconn.c from snmpv3_dummy.c (snmpv3_enginetime_timer)
Make SNMP API more type-safe using enums
2017-03-03 13:01:04 +01:00
Dirk Ziegelmeier
ecb3867803
SNMPv3: Rename tcpip_enginetime_timer to snmpv3_enginetime_timer
2017-03-03 12:32:22 +01:00
Dirk Ziegelmeier
593b211d1b
A few more SNMPv3 cleanups
2017-03-02 11:20:02 +01:00
Dirk Ziegelmeier
0065cd915f
Several Win32 compile fixes in SNMP code
2017-03-02 07:49:42 +01:00
Dirk Ziegelmeier
83de16678c
SNMP: TABs -> spaces
2017-03-02 07:33:18 +01:00
Dirk Ziegelmeier
ea41480232
Replace several C++ style comments by C-style
2017-03-01 21:25:03 +01:00
Dirk Ziegelmeier
4ef21e2597
Fix compile when SNMPv3 is disabled
2017-03-01 20:39:39 +01:00
Dirk Ziegelmeier
78cdbff1b3
Several compile fixes for Marco's patch
2017-03-01 20:39:39 +01:00
Dirk Ziegelmeier
fef7ce3c0d
Some whitespace fixes to Marco's patches
2017-03-01 20:39:39 +01:00
Marco
f0605a510f
Modified the snmpv3_dummy implementation to be more functional.
...
The dummy implementation also implements the user table as a reference.
2017-03-01 20:39:39 +01:00
Marco
3b8bb580e4
Add framework MIB and USM mib if SNMPv3 is enabled.
2017-03-01 20:39:39 +01:00
Marco
4b97f2bb8e
Implemented usm mib.
2017-03-01 20:39:39 +01:00
Marco
46df850cb9
Implemented framework mib.
2017-03-01 20:39:39 +01:00
Marco
f8f3cc039a
Start a timer for enginetime handling.
...
This timer function should be implemented in the snmpv3_xxx.c file.
2017-03-01 20:39:39 +01:00
Marco
f092d09121
Added handling invalid packets in SNMPv3.
2017-03-01 20:39:39 +01:00
Marco
78806001e5
Made accepted SNMP version runtime configurable.
...
This feature can be disabled by setting LWIP_SNMP_CONFIGURE_VERSIONS to 0.
2017-03-01 20:39:39 +01:00
Marco
8fd09d4608
Added missing context specific tags.
2017-03-01 20:39:39 +01:00
Marco
ec044e826e
Replaced old LWIP_SNMPV3_GET_ENGINE_BOOTS macro.
...
Replaced old LWIP_SNMPV3_GET_ENGINE_BOOTS macro with the new snmpv3_get_engine_boots_internal function.
2017-03-01 20:39:39 +01:00
goldsimon
0d585d55d3
Added LWIP_SINGLE_NETIF for small targets with only one netif (see task #13515 , there might be more optimizations to come with this option)
2017-03-01 16:10:50 +01:00
Dirk Ziegelmeier
d8135f9ae2
Fix bug #50427 : SNMP: ifIndex should use netif_get_index()
...
We have netif_get_index(netif) now
2017-03-01 12:34:47 +01:00
Dirk Ziegelmeier
f874d15185
Add #include <string.h> in snmp_netconn.c because memset() is used
2017-01-01 12:38:34 +01:00
goldsimon
fb07d47b82
more LWIP_NOASSERT fixes
2016-12-19 10:34:49 +01:00
Dirk Ziegelmeier
e5f9f187ad
Continue to fix incorrect casts via size_t for some platforms
...
Now also for casts:
- to remove alignment warnings
- casts between pointers and ints
2016-12-12 10:17:33 +01:00
Dirk Ziegelmeier
1687721600
Fix compile when IPv4 is disabled
2016-12-05 22:01:58 +01:00
Dirk Ziegelmeier
f6e27940bd
Make lwIP compile with clang -Wdocumentation -> several documentation fixes
2016-10-09 12:21:39 +02:00