mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-03 21:32:08 +00:00
SNMP UDP ports can be configured at compile time
This commit is contained in:
parent
91afefa61a
commit
5eabd4591a
@ -23,6 +23,9 @@ HISTORY
|
|||||||
|
|
||||||
++ New features:
|
++ New features:
|
||||||
|
|
||||||
|
2007-03-08 Simon Goldschmidt
|
||||||
|
* snmp_msg.h, msg_in.c: SNMP UDP ports can be configured at compile time.
|
||||||
|
|
||||||
2007-03-06 Frédéric Bernon
|
2007-03-06 Frédéric Bernon
|
||||||
* api.h, api_lib.c, sockets.h, sockets.c, tcpip.c, sys.h, sys.c, err.h:
|
* api.h, api_lib.c, sockets.h, sockets.c, tcpip.c, sys.h, sys.c, err.h:
|
||||||
Implement SO_RCVTIMEO on UDP sockets/netconn.
|
Implement SO_RCVTIMEO on UDP sockets/netconn.
|
||||||
|
@ -807,7 +807,7 @@ snmp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, struct ip_addr *addr,
|
|||||||
udphdr = p->payload;
|
udphdr = p->payload;
|
||||||
|
|
||||||
/* check if datagram is really directed at us (including broadcast requests) */
|
/* check if datagram is really directed at us (including broadcast requests) */
|
||||||
if ((pcb == snmp1_pcb) && (ntohs(udphdr->dest) == 161))
|
if ((pcb == snmp1_pcb) && (ntohs(udphdr->dest) == SNMP_IN_PORT))
|
||||||
{
|
{
|
||||||
struct snmp_msg_pstat *msg_ps;
|
struct snmp_msg_pstat *msg_ps;
|
||||||
u8_t req_idx;
|
u8_t req_idx;
|
||||||
|
@ -44,8 +44,16 @@
|
|||||||
#include "private_mib.h"
|
#include "private_mib.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* The listen port of the SNMP agent. Clients have to make their requests to
|
||||||
|
this port. Most standard clients won't work if you change this! */
|
||||||
|
#ifndef SNMP_IN_PORT
|
||||||
#define SNMP_IN_PORT 161
|
#define SNMP_IN_PORT 161
|
||||||
|
#endif
|
||||||
|
/* The remote port the SNMP agent sends traps to. Most standard trap sinks won't
|
||||||
|
work if you change this! */
|
||||||
|
#ifndef SNMP_TRAP_PORT
|
||||||
#define SNMP_TRAP_PORT 162
|
#define SNMP_TRAP_PORT 162
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SNMP_ES_NOERROR 0
|
#define SNMP_ES_NOERROR 0
|
||||||
#define SNMP_ES_TOOBIG 1
|
#define SNMP_ES_TOOBIG 1
|
||||||
|
Loading…
Reference in New Issue
Block a user