![]() |
yumapro
25.10-1
YumaPro SDK
|
Control interface for Server interface to net-snmp agent for SNMP support. More...

Functions | |
| int | ypsnmp_snmp_packet (int op_type, netsnmp_session *session, int reqid, netsnmp_pdu *pdu, void *magic) |
| Register handle an incoming SNMP packet. More... | |
| int | ypsnmp_check_packet (netsnmp_session *session, netsnmp_transport *transport, void *transport_data, int transport_data_length) |
| Handler for all incoming messages (a.k.a. More... | |
| int | ypsnmp_check_parse (netsnmp_session *session, netsnmp_pdu *pdu, int result) |
| Check the PDU parse. More... | |
| status_t | agt_ypsnmp_init (void) |
| Initialize the agt_ypsnmp module. More... | |
| void | agt_ypsnmp_cleanup (void) |
| Cleanup the agt_ypsnmp module. More... | |
| void | agt_ypsnmp_check_io (void) |
| Check if any SNMP messages to process. More... | |
| status_t | agt_ypsnmp_reply_handler (ses_cb_t *scb, yangapi_cb_t *rcb, rpc_msg_t *msg, status_t result) |
| Handler called for sending a response. More... | |
| status_t | agt_ypsnmp_notification_handler (agt_not_msg_t *notif) |
| Handler called for sending a notification. More... | |
| status_t | agt_ypsnmp_handle_request (ypsnmp_agent_session_t *asp) |
| Incoming Packet handling function. More... | |
Control interface for Server interface to net-snmp agent for SNMP support.
Requires WITH_SNMP=1 in build and –with-snmp=true CLI parameter at runtime.
| void agt_ypsnmp_check_io | ( | void | ) |
Check if any SNMP messages to process.
Adapted from net-snmp agent
Only present if WITH_SNMP=1.

| void agt_ypsnmp_cleanup | ( | void | ) |
Cleanup the agt_ypsnmp module.
Only present if WITH_SNMP=1.


| status_t agt_ypsnmp_handle_request | ( | ypsnmp_agent_session_t * | asp | ) |
Incoming Packet handling function.
Handles master packets as well as AgentX packets Only present if WITH_SNMP=1.
| asp | agent session to use |


| status_t agt_ypsnmp_init | ( | void | ) |
Initialize the agt_ypsnmp module.
Only present if WITH_SNMP=1.


| status_t agt_ypsnmp_notification_handler | ( | agt_not_msg_t * | notif | ) |
Handler called for sending a notification.
Only present if WITH_SNMP=1.
| notif | notification message |

| status_t agt_ypsnmp_reply_handler | ( | ses_cb_t * | scb, |
| yangapi_cb_t * | rcb, | ||
| rpc_msg_t * | msg, | ||
| status_t | result | ||
| ) |
Handler called for sending a response.
Only present if WITH_SNMP=1.
| scb | session control block |
| rcb | yangapi control block to use |
| msg | rpc_msg_t in progress |
| result | general request status |


| int ypsnmp_check_packet | ( | netsnmp_session * | session, |
| netsnmp_transport * | transport, | ||
| void * | transport_data, | ||
| int | transport_data_length | ||
| ) |
Handler for all incoming messages (a.k.a.
packets) for the agent.
Print output when appropriate, and increment the incoming counter.
Only present if WITH_SNMP=1.
| session | The net-snmp session |
| transport | transport enum |
| transport_data | control block for transport |
| transport_data_length | length of transport_data |
| int ypsnmp_check_parse | ( | netsnmp_session * | session, |
| netsnmp_pdu * | pdu, | ||
| int | result | ||
| ) |
Check the PDU parse.
Only present if WITH_SNMP=1.
| session | The net-snmp session |
| pdu | message to process |
| result | of parse |
| int ypsnmp_snmp_packet | ( | int | op_type, |
| netsnmp_session * | session, | ||
| int | reqid, | ||
| netsnmp_pdu * | pdu, | ||
| void * | magic | ||
| ) |
Register handle an incoming SNMP packet.
This is the callback registered for incoming packets.
This function processes a complete (according to asn_check_packet or the AgentX equivalent) packet, parsing it into a PDU and calling the relevant callbacks. On entry, packetptr points at the packet in the session's buffer and length is the length of the packet.
Only present if WITH_SNMP=1.
| op_type | Operation type |
| session | The net-snmp session |
| reqid | The request id of this pdu ( 0 for TRAP) |
| pdu | The snmp pdu information |
| magic | opaque handler |
