yumapro  23.10T-7
YumaPro SDK
Loading...
Searching...
No Matches
Protocol Support

Protocol support for net-snmp agent for SNMP support. More...

Collaboration diagram for Protocol Support:

Functions

int agentx_parse (netsnmp_session *session, netsnmp_pdu *pdu, u_char *data, size_t len)
 Utility functions for parsing an AgentX packet. More...
 
int agentx_realloc_build (netsnmp_session *session, netsnmp_pdu *pdu, u_char **buf, size_t *buf_len, size_t *out_len)
 Realloc an AgentX PDU. More...
 
int agentx_check_packet (u_char *packet, size_t packet_len)
 Check the packet. More...
 

Detailed Description

Protocol support for net-snmp agent for SNMP support.

Requires WITH_SNMP=1 in build and –with-snmp=true CLI parameter at runtime.

Function Documentation

◆ agentx_check_packet()

int agentx_check_packet ( u_char *  packet,
size_t  packet_len 
)

Check the packet.

Only present if WITH_SNMP=1.

     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |   h.version   |    h.type     |    h.flags    |  <reserved>   |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                          h.sessionID                          |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                        h.transactionID                        |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                          h.packetID                           |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                        h.payload_length                       |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     20 bytes in header
Parameters
packetthe packet to check
packet_lenlength of packet to check
Returns
the proper length of an incoming agentx packet.

◆ agentx_parse()

int agentx_parse ( netsnmp_session *  session,
netsnmp_pdu *  pdu,
u_char *  data,
size_t  len 
)

Utility functions for parsing an AgentX packet.

Only present if WITH_SNMP=1.

Parameters
sessionThe net-snmp session
pduThe snmp pdu information
dataThe snmp pdu data information
lenlength of request
Returns
1 on success, 0 on error

◆ agentx_realloc_build()

int agentx_realloc_build ( netsnmp_session *  session,
netsnmp_pdu *  pdu,
u_char **  buf,
size_t *  buf_len,
size_t *  out_len 
)

Realloc an AgentX PDU.

Only present if WITH_SNMP=1.

Parameters
sessionThe net-snmp session
pduThe snmp pdu information
[out]bufaddress of return buffer
*buf has allocated buffer
[out]buf_lenaddress of return buffer length
*buf_len has length of *buf
[out]out_lenaddress of output length
*out_len has output length
Returns
1 on success, 0 on error