Data Structures |
|
| struct | addrCache |
| struct | _agent_nsap |
| struct | agent_set_cache_s |
Defines |
|
| #define | SNMP_NEED_REQUEST_LIST |
| #define | SNMP_ADDRCACHE_SIZE 10 |
| #define | SNMP_ADDRCACHE_MAXAGE 300 |
Typedefs |
|
| typedef _agent_nsap | agent_nsap |
| typedef agent_set_cache_s | agent_set_cache |
Enumerations |
|
| enum | { SNMP_ADDRCACHE_UNUSED = 0, SNMP_ADDRCACHE_USED = 1 } |
Functions |
|
| int | netsnmp_agent_check_packet (netsnmp_session *, struct netsnmp_transport_s *, void *, int) |
| int | netsnmp_agent_check_parse (netsnmp_session *, netsnmp_pdu *, int) |
| void | delete_subnetsnmp_tree_cache (netsnmp_agent_session *asp) |
| int | handle_pdu (netsnmp_agent_session *asp) |
| This function calls into netsnmp_set_mode_request_error, sets error_value given a reqinfo->mode
value. |
|
| int | netsnmp_handle_request (netsnmp_agent_session *asp, int status) |
| int | netsnmp_wrap_up_request (netsnmp_agent_session *asp, int status) |
| int | check_delayed_request (netsnmp_agent_session *asp) |
| int | handle_getnext_loop (netsnmp_agent_session *asp) |
| repeatedly calls getnext handlers looking for an answer till all requests are satisified. |
|
| int | handle_set_loop (netsnmp_agent_session *asp) |
| int | netsnmp_check_queued_chain_for (netsnmp_agent_session *asp) |
| int | netsnmp_add_queued (netsnmp_agent_session *asp) |
| int | netsnmp_remove_from_delegated (netsnmp_agent_session *asp) |
| int | netsnmp_allocate_globalcacheid (void) |
| int | netsnmp_get_local_cachid (netsnmp_cachemap *cache_store, int globalid) |
| netsnmp_cachemap * | netsnmp_get_or_add_local_cachid (netsnmp_cachemap **cache_store, int globalid, int localid) |
| void | netsnmp_free_cachemap (netsnmp_cachemap *cache_store) |
| agent_set_cache * | save_set_cache (netsnmp_agent_session *asp) |
| int | get_set_cache (netsnmp_agent_session *asp) |
| NETSNMP_STATIC_INLINE void | _reorder_getbulk (netsnmp_agent_session *asp) |
| int | getNextSessID () |
| int | agent_check_and_process (int block) |
| This function checks for packets arriving on the SNMP port and processes them(snmp_read) if some are
found, using the select(). |
|
| void | netsnmp_addrcache_initialise (void) |
| int | netsnmp_addrcache_add (const char *addr) |
| void | netsnmp_addrcache_age (void) |
| int | netsnmp_agent_check_packet (netsnmp_session *session, netsnmp_transport *transport, void *transport_data, int transport_data_length) |
| int | netsnmp_register_agent_nsap (netsnmp_transport *t) |
| void | netsnmp_deregister_agent_nsap (int handle) |
| int | init_master_agent (void) |
| void | clear_nsap_list (void) |
| void | shutdown_master_agent (void) |
| netsnmp_agent_session * | init_agent_snmp_session (netsnmp_session *session, netsnmp_pdu *pdu) |
| void | free_agent_snmp_session (netsnmp_agent_session *asp) |
| int | netsnmp_check_for_delegated (netsnmp_agent_session *asp) |
| int | netsnmp_check_delegated_chain_for (netsnmp_agent_session *asp) |
| int | netsnmp_check_for_delegated_and_add (netsnmp_agent_session *asp) |
| int | netsnmp_remove_delegated_requests_for_session (netsnmp_session *sess) |
| void | dump_sess_list (void) |
| void | netsnmp_remove_and_free_agent_snmp_session (netsnmp_agent_session *asp) |
| void | netsnmp_free_agent_snmp_session_by_session (netsnmp_session *sess, void(*free_request)(netsnmp_request_list *)) |
| int | handle_snmp_packet (int op, netsnmp_session *session, int reqid, netsnmp_pdu *pdu, void *magic) |
| handles an incoming SNMP packet into the agent |
|
| netsnmp_request_info * | netsnmp_add_varbind_to_cache (netsnmp_agent_session *asp, int vbcount, netsnmp_variable_list *varbind_ptr, netsnmp_subtree *tp) |
| int | check_acm (netsnmp_agent_session *asp, u_char type) |
| int | netsnmp_create_subtree_cache (netsnmp_agent_session *asp) |
| int | netsnmp_reassign_requests (netsnmp_agent_session *asp) |
| void | netsnmp_delete_request_infos (netsnmp_request_info *reqlist) |
| void | netsnmp_delete_subtree_cache (netsnmp_agent_session *asp) |
| int | netsnmp_check_all_requests_error (netsnmp_agent_session *asp, int look_for_specific) |
| int | netsnmp_check_requests_error (netsnmp_request_info *requests) |
| int | netsnmp_check_requests_status (netsnmp_agent_session *asp, netsnmp_request_info *requests, int look_for_specific) |
| int | netsnmp_check_all_requests_status (netsnmp_agent_session *asp, int look_for_specific) |
| int | handle_var_requests (netsnmp_agent_session *asp) |
| void | netsnmp_check_outstanding_agent_requests (void) |
| int | netsnmp_check_transaction_id (int transaction_id) |
| Decide if the requested transaction_id is still being processed within the agent. |
|
| int | check_getnext_results (netsnmp_agent_session *asp) |
| returns 1 if there are valid GETNEXT requests left. |
|
| int | handle_set (netsnmp_agent_session *asp) |
| NETSNMP_STATIC_INLINE int | _request_set_error (netsnmp_request_info *request, int mode, int error_value) |
| set error for a request |
|
| int | netsnmp_request_set_error (netsnmp_request_info *request, int error_value) |
| set error for a request |
|
| NETSNMP_INLINE int | netsnmp_request_set_error_all (netsnmp_request_info *requests, int error) |
| set error for all requests |
|
| u_long | netsnmp_marker_uptime (marker_t pm) |
| u_long | netsnmp_timeval_uptime (struct timeval *tv) |
| u_long | netsnmp_get_agent_uptime (void) |
| NETSNMP_INLINE void | netsnmp_agent_add_list_data (netsnmp_agent_request_info *ari, netsnmp_data_list *node) |
| NETSNMP_INLINE int | netsnmp_agent_remove_list_data (netsnmp_agent_request_info *ari, const char *name) |
| NETSNMP_INLINE void * | netsnmp_agent_get_list_data (netsnmp_agent_request_info *ari, const char *name) |
| NETSNMP_INLINE void | netsnmp_free_agent_data_set (netsnmp_agent_request_info *ari) |
| NETSNMP_INLINE void | netsnmp_free_agent_data_sets (netsnmp_agent_request_info *ari) |
| NETSNMP_INLINE void | netsnmp_free_agent_request_info (netsnmp_agent_request_info *ari) |
| int | netsnmp_set_request_error (netsnmp_agent_request_info *reqinfo, netsnmp_request_info *request, int error_value) |
| deprecated, use netsnmp_request_set_error instead |
|
| int | netsnmp_set_mode_request_error (int mode, netsnmp_request_info *request, int error_value) |
| deprecated, use netsnmp_request_set_error instead |
|
| int | netsnmp_set_all_requests_error (netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests, int error_value) |
| set error for all request |
|
Variables |
|
| oid | version_sysoid [] = { SYSTEM_MIB } |
| int | version_sysoid_len = OID_LENGTH(version_sysoid) |
| int | log_addresses = 0 |
| netsnmp_agent_session * | agent_delegated_list = NULL |
| netsnmp_agent_session * | netsnmp_agent_queued_list = NULL |
| int | netsnmp_running = 1 |
| netsnmp_session * | main_session = NULL |
| timeval | starttime |
|
||||||||||||||||
|
set error for a request Definition at line 3313 of file snmp_agent.c. References netsnmp_request_info_s::delegated, netsnmp_request_info_s::processed, netsnmp_request_info_s::requestvb, snmp_log(), netsnmp_request_info_s::status, and variable_list::type. Referenced by netsnmp_request_set_error(), netsnmp_request_set_error_all(), netsnmp_set_mode_request_error(), and netsnmp_set_request_error(). |
|
|
This function checks for packets arriving on the SNMP port and processes them(snmp_read) if some are found, using the select(). If block is non zero, the function call blocks until a packet arrives
Definition at line 560 of file snmp_agent.c. References snmp_log(). |
|
|
returns 1 if there are valid GETNEXT requests left. Returns 0 if not. Definition at line 2726 of file snmp_agent.c. References netsnmp_request_info_s::inclusive, netsnmp_request_info_s::index, variable_list::name, variable_list::name_length, netsnmp_request_info_s::next, netsnmp_request_info_s::range_end, netsnmp_request_info_s::range_end_len, netsnmp_request_info_s::repeat, netsnmp_request_info_s::requestvb, snmp_oid_compare(), snmp_set_var_typed_value(), and variable_list::type. Referenced by handle_getnext_loop(). |
|
|
repeatedly calls getnext handlers looking for an answer till all requests are satisified. It's expected that one pass has been made before entering this function Definition at line 2831 of file snmp_agent.c. References check_getnext_results(), and variable_list::next_variable. Referenced by handle_pdu(). |
|
|
This function calls into netsnmp_set_mode_request_error, sets error_value given a reqinfo->mode value. It's used to send specific errors back to the agent to process accordingly. If error_value is set to SNMP_NOSUCHOBJECT, SNMP_NOSUCHINSTANCE, or SNMP_ENDOFMIBVIEW the following is applicable: Sets the error_value to request->requestvb->type if reqinfo->mode value is set to MODE_GET. If the reqinfo->mode value is set to MODE_GETNEXT or MODE_GETBULK the code calls snmp_log logging an error message. Otherwise, the request->status value is checked, if it's < 0 snmp_log is called with an error message and SNMP_ERR_GENERR is assigned to request->status. If the request->status value is >= 0 the error_value is set to request->status.
Definition at line 3125 of file snmp_agent.c. References handle_getnext_loop(), variable_list::next_variable, snmp_set_var_typed_value(), netsnmp_request_info_s::status, and variable_list::type. |
|
||||||||||||||||||||||||
|
handles an incoming SNMP packet into the agent Definition at line 1735 of file snmp_agent.c. References snmp_pdu::command, snmp_pdu::errstat, snmp_session::s_snmp_errno, send_easy_trap(), and snmp_pdu::version. |
|
||||||||||||||||||||
|
|
Decide if the requested transaction_id is still being processed within the agent. This is used to validate whether a delayed cache (containing possibly freed pointers) is still usable. returns SNMPERR_SUCCESS if it's still valid, or SNMPERR_GENERR if not. Definition at line 2636 of file snmp_agent.c. Referenced by netsnmp_handler_check_cache(). |
|
||||||||||||
|
set error for a request
Definition at line 3381 of file snmp_agent.c. References _request_set_error(), netsnmp_request_info_s::agent_req_info, and netsnmp_agent_request_info_s::mode. |
|
||||||||||||
|
set error for all requests
paranoid sanity checks Definition at line 3396 of file snmp_agent.c. References _request_set_error(), netsnmp_request_info_s::agent_req_info, netsnmp_agent_request_info_s::mode, netsnmp_request_info_s::next, and snmp_log(). Referenced by netsnmp_cache_helper_handler(), netsnmp_multiplexer_helper_handler(), and netsnmp_set_all_requests_error(). |
|
||||||||||||||||
|
set error for all request
Definition at line 3570 of file snmp_agent.c. References netsnmp_request_set_error_all(). |
|
||||||||||||||||
|
deprecated, use netsnmp_request_set_error instead
Definition at line 3554 of file snmp_agent.c. References _request_set_error(). |
|
||||||||||||||||
|
deprecated, use netsnmp_request_set_error instead
Definition at line 3535 of file snmp_agent.c. References _request_set_error(), and netsnmp_agent_request_info_s::mode. Referenced by _data_lookup(), netsnmp_instance_num_file_handler(), netsnmp_old_api_helper(), and table_helper_handler(). |
|
||||||||||||
|
if asp->pdu Definition at line 1486 of file snmp_agent.c. References snmp_pdu::command, snmp_pdu::errindex, snmp_pdu::errstat, variable_list::name, variable_list::name_length, variable_list::next_variable, SNMP_FREE, snmp_log(), and variable_list::type. |
1.3.9.1
Last modified: Thursday, 01-Mar-2007 16:20:14 PST
For questions regarding web content and site functionality, please write to the net-snmp-users mail list.