jona
d6a6b661d9
Fix typos using codespell
...
Conservative strategy was used, maybe other typos remain.
Rebased: Simon Goldschmidt <goldsimon@gmx.de>
2020-02-15 21:45:41 +01:00
Simon Goldschmidt
9071db11af
snmp: don't allocat outbound msg for GET RESP (inform cb)
2018-11-22 12:54:50 +01:00
Simon Goldschmidt
ed59260b92
snmp: fix coding style
...
no need to initialize global static variables to NULL
2018-11-22 12:51:46 +01:00
Simon Goldschmidt
3bd84aba4b
snmp_v3: use strlen, not strnlen
...
strnlen is not portable.
In this case, it does not matter as we zero-terminate the string before.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-11-19 20:13:30 +01:00
Dirk Ziegelmeier
65033b6ba5
Apply patch for task #15072 : SNMP support for notifications and informs (v2c)
...
Original author: Ognjen Bjelica
with minor fixes from Dirk Ziegelmeier
2018-11-07 21:04:53 +01:00
Dirk Ziegelmeier
aafc0adfe1
Fix bug #54381 : SNMP RAW_DATA support is broken
2018-07-26 14:16:00 +02:00
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
3ed24085fa
Reformat SNMP code using astylerc
2017-09-17 20:29:18 +02:00
Dirk Ziegelmeier
0d23d686eb
snmp_asn1.c: Fix handling of u64 values
2017-07-26 12:48:19 +02:00
Dirk Ziegelmeier
b7e24fdc58
Accidentally removed a break statement in my last commit
2017-07-26 09:32:40 +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
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
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
e15e504217
Some minor SNMPv3 related cleanups
2017-03-06 09:38:58 +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
593b211d1b
A few more SNMPv3 cleanups
2017-03-02 11:20:02 +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
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
Dirk Ziegelmeier
f6e27940bd
Make lwIP compile with clang -Wdocumentation -> several documentation fixes
2016-10-09 12:21:39 +02:00
Dirk Ziegelmeier
af04864094
Remove non-standard strnlen() call in snmp_msg.c
2016-09-29 08:30:33 +02:00
Dirk Ziegelmeier
dbd847b70c
Fix bugfix for bug #49136 : No SNMPv2 SetRequest response when OID does not exist
...
Last commit broke SNMPv1 answers
2016-09-20 14:28:40 +02:00
Dirk Ziegelmeier
19e2780656
Fix bug #49136 : No SNMPv2 SetRequest response when OID does not exist
2016-09-20 14:06:20 +02:00
Dirk Ziegelmeier
8dbd1abdc4
Minor coding style fixes while reading SNMP code
2016-09-12 12:55:24 +02:00
Dirk Ziegelmeier
9078f31544
Minor: memcpy -> MEMCPY / SMEMCPY
2016-08-30 21:56:09 +02:00
Dirk Ziegelmeier
fefb782bfe
Apply fix by Marco Veeneman in SNMPv3: The outbound_padding is calculated wrong in snmp_complete_outbound_frame()
2016-08-19 12:22:59 +02:00
Dirk Ziegelmeier
12609c951c
Fix compile of SNMPv3 code with MSVC
2016-08-19 12:22:58 +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
c6831648e2
Document apps in doxygen module style, create more top-level categories to structure documentation
2016-07-26 19:30:05 +02:00
Dirk Ziegelmeier
a62e4452a2
Work on patch #9044 : SNMP response for failed get operation
...
Inspired by Marco Veeneman. Change signature of get_value function to return s16_t, where values <0 indicate an error. This is mapped to SNMP_ERR_GENERROR.
2016-07-26 12:59:26 +02:00
goldsimon
52da49cd81
snmp: changed name (snmp_length_outbound_varbind -> snmp_varbind_length)
2016-07-08 10:24:06 +02:00
Marco Veeneman
dcd52510ce
Reduce code duplication in SNMP agent traps implementation.
...
See patch #9038 : SNMP Traps with varbinds, file #37748 by Marco Veeneman
2016-07-07 21:00:07 +02:00
Dirk Ziegelmeier
cb5f7859fd
Apply patch #9038 : SNMP Traps with varbinds
...
Applied with modifications. Original patch from Marco Veeneman.
2016-07-04 21:11:20 +02:00
Dirk Ziegelmeier
8dc77ef558
doxygen updates - include IPv6 in documentation. Exclude include/netif/ppp/polarssl.
...
Convert TODO -> @todo
2016-06-22 20:18:23 +02:00
goldsimon
076f1ee89e
minor: coding style cleanup in snmp code
2016-06-09 14:28:04 +02:00
Dirk Ziegelmeier
451277e7f0
Include all lwIP files in doxygen documentation
2016-05-24 21:03:41 +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
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
5aa5563622
snmp_msg.c: Fix unchecked return value. Found by Coverity.
2016-02-10 21:57:57 +01:00
Dirk Ziegelmeier
fbdfba2509
SNMP: Found the correct cause of a memory leak
2016-01-07 09:52:13 +01:00