netsnmp_snmp_agent.3
上传用户:wxp200602
上传日期:2007-10-30
资源大小:4028k
文件大小:21k
- .TH "net-snmp agent related processing" 3 "28 Nov 2005" "Version 5.2.1.rc3" "net-snmp" " -*- nroff -*-
- .ad l
- .nh
- .SH NAME
- net-snmp agent related processing -
- .SS "Data Structures"
- .in +1c
- .ti -1c
- .RI "struct fBaddrCachefP"
- .br
- .ti -1c
- .RI "struct fB_agent_nsapfP"
- .br
- .ti -1c
- .RI "struct fBagent_set_cache_sfP"
- .br
- .in -1c
- .SS "Defines"
- .in +1c
- .ti -1c
- .RI "#define fBSNMP_NEED_REQUEST_LISTfP"
- .br
- .ti -1c
- .RI "#define fBSNMP_ADDRCACHE_SIZEfP 10"
- .br
- .ti -1c
- .RI "#define fBSNMP_ADDRCACHE_MAXAGEfP 300"
- .br
- .in -1c
- .SS "Typedefs"
- .in +1c
- .ti -1c
- .RI "typedef fB_agent_nsapfP fBagent_nsapfP"
- .br
- .ti -1c
- .RI "typedef fBagent_set_cache_sfP fBagent_set_cachefP"
- .br
- .in -1c
- .SS "Enumerations"
- .in +1c
- .ti -1c
- .RI "enum { fBSNMP_ADDRCACHE_UNUSEDfP = 0, fBSNMP_ADDRCACHE_USEDfP = 1 }"
- .br
- .in -1c
- .SS "Functions"
- .in +1c
- .ti -1c
- .RI "int fBnetsnmp_agent_check_packetfP (fBnetsnmp_sessionfP *, struct fBnetsnmp_transport_sfP *, void *, int)"
- .br
- .ti -1c
- .RI "int fBnetsnmp_agent_check_parsefP (fBnetsnmp_sessionfP *, fBnetsnmp_pdufP *, int)"
- .br
- .ti -1c
- .RI "void fBdelete_subnetsnmp_tree_cachefP (fBnetsnmp_agent_sessionfP *asp)"
- .br
- .ti -1c
- .RI "int fBhandle_pdufP (fBnetsnmp_agent_sessionfP *asp)"
- .br
- .RI "fIThis function calls into netsnmp_set_mode_request_error, sets error_value given a reqinfo->mode value. fP"
- .ti -1c
- .RI "int fBnetsnmp_handle_requestfP (fBnetsnmp_agent_sessionfP *asp, int status)"
- .br
- .ti -1c
- .RI "int fBnetsnmp_wrap_up_requestfP (fBnetsnmp_agent_sessionfP *asp, int status)"
- .br
- .ti -1c
- .RI "int fBcheck_delayed_requestfP (fBnetsnmp_agent_sessionfP *asp)"
- .br
- .ti -1c
- .RI "int fBhandle_getnext_loopfP (fBnetsnmp_agent_sessionfP *asp)"
- .br
- .RI "fIrepeatedly calls getnext handlers looking for an answer till all requests are satisified. fP"
- .ti -1c
- .RI "int fBhandle_set_loopfP (fBnetsnmp_agent_sessionfP *asp)"
- .br
- .ti -1c
- .RI "int fBnetsnmp_check_queued_chain_forfP (fBnetsnmp_agent_sessionfP *asp)"
- .br
- .ti -1c
- .RI "int fBnetsnmp_add_queuedfP (fBnetsnmp_agent_sessionfP *asp)"
- .br
- .ti -1c
- .RI "int fBnetsnmp_remove_from_delegatedfP (fBnetsnmp_agent_sessionfP *asp)"
- .br
- .ti -1c
- .RI "int fBnetsnmp_allocate_globalcacheidfP (void)"
- .br
- .ti -1c
- .RI "int fBnetsnmp_get_local_cachidfP (fBnetsnmp_cachemapfP *cache_store, int globalid)"
- .br
- .ti -1c
- .RI "fBnetsnmp_cachemapfP * fBnetsnmp_get_or_add_local_cachidfP (fBnetsnmp_cachemapfP **cache_store, int globalid, int localid)"
- .br
- .ti -1c
- .RI "void fBnetsnmp_free_cachemapfP (fBnetsnmp_cachemapfP *cache_store)"
- .br
- .ti -1c
- .RI "fBagent_set_cachefP * fBsave_set_cachefP (fBnetsnmp_agent_sessionfP *asp)"
- .br
- .ti -1c
- .RI "int fBget_set_cachefP (fBnetsnmp_agent_sessionfP *asp)"
- .br
- .ti -1c
- .RI "NETSNMP_STATIC_INLINE void fB_reorder_getbulkfP (fBnetsnmp_agent_sessionfP *asp)"
- .br
- .ti -1c
- .RI "int fBgetNextSessIDfP ()"
- .br
- .ti -1c
- .RI "int fBagent_check_and_processfP (int block)"
- .br
- .RI "fIThis function checks for packets arriving on the SNMP port and processes them(snmp_read) if some are found, using the select(). fP"
- .ti -1c
- .RI "void fBnetsnmp_addrcache_initialisefP (void)"
- .br
- .ti -1c
- .RI "int fBnetsnmp_addrcache_addfP (const char *addr)"
- .br
- .ti -1c
- .RI "void fBnetsnmp_addrcache_agefP (void)"
- .br
- .ti -1c
- .RI "int fBnetsnmp_register_agent_nsapfP (fBnetsnmp_transportfP *t)"
- .br
- .ti -1c
- .RI "void fBnetsnmp_deregister_agent_nsapfP (int handle)"
- .br
- .ti -1c
- .RI "int fBinit_master_agentfP (void)"
- .br
- .ti -1c
- .RI "void fBclear_nsap_listfP (void)"
- .br
- .ti -1c
- .RI "void fBshutdown_master_agentfP (void)"
- .br
- .ti -1c
- .RI "fBnetsnmp_agent_sessionfP * fBinit_agent_snmp_sessionfP (fBnetsnmp_sessionfP *session, fBnetsnmp_pdufP *pdu)"
- .br
- .ti -1c
- .RI "void fBfree_agent_snmp_sessionfP (fBnetsnmp_agent_sessionfP *asp)"
- .br
- .ti -1c
- .RI "int fBnetsnmp_check_for_delegatedfP (fBnetsnmp_agent_sessionfP *asp)"
- .br
- .ti -1c
- .RI "int fBnetsnmp_check_delegated_chain_forfP (fBnetsnmp_agent_sessionfP *asp)"
- .br
- .ti -1c
- .RI "int fBnetsnmp_check_for_delegated_and_addfP (fBnetsnmp_agent_sessionfP *asp)"
- .br
- .ti -1c
- .RI "int fBnetsnmp_remove_delegated_requests_for_sessionfP (fBnetsnmp_sessionfP *sess)"
- .br
- .ti -1c
- .RI "void fBdump_sess_listfP (void)"
- .br
- .ti -1c
- .RI "void fBnetsnmp_remove_and_free_agent_snmp_sessionfP (fBnetsnmp_agent_sessionfP *asp)"
- .br
- .ti -1c
- .RI "void fBnetsnmp_free_agent_snmp_session_by_sessionfP (fBnetsnmp_sessionfP *sess, void(*free_request)(netsnmp_request_list *))"
- .br
- .ti -1c
- .RI "int fBhandle_snmp_packetfP (int op, fBnetsnmp_sessionfP *session, int reqid, fBnetsnmp_pdufP *pdu, void *magic)"
- .br
- .RI "fIhandles an incoming SNMP packet into the agent fP"
- .ti -1c
- .RI "fBnetsnmp_request_infofP * fBnetsnmp_add_varbind_to_cachefP (fBnetsnmp_agent_sessionfP *asp, int vbcount, fBnetsnmp_variable_listfP *varbind_ptr, fBnetsnmp_subtreefP *tp)"
- .br
- .ti -1c
- .RI "int fBcheck_acmfP (fBnetsnmp_agent_sessionfP *asp, u_char type)"
- .br
- .ti -1c
- .RI "int fBnetsnmp_create_subtree_cachefP (fBnetsnmp_agent_sessionfP *asp)"
- .br
- .ti -1c
- .RI "int fBnetsnmp_reassign_requestsfP (fBnetsnmp_agent_sessionfP *asp)"
- .br
- .ti -1c
- .RI "void fBnetsnmp_delete_request_infosfP (fBnetsnmp_request_infofP *reqlist)"
- .br
- .ti -1c
- .RI "void fBnetsnmp_delete_subtree_cachefP (fBnetsnmp_agent_sessionfP *asp)"
- .br
- .ti -1c
- .RI "int fBnetsnmp_check_requests_errorfP (fBnetsnmp_request_infofP *requests)"
- .br
- .ti -1c
- .RI "int fBnetsnmp_check_requests_statusfP (fBnetsnmp_agent_sessionfP *asp, fBnetsnmp_request_infofP *requests, int look_for_specific)"
- .br
- .ti -1c
- .RI "int fBnetsnmp_check_all_requests_statusfP (fBnetsnmp_agent_sessionfP *asp, int look_for_specific)"
- .br
- .ti -1c
- .RI "int fBhandle_var_requestsfP (fBnetsnmp_agent_sessionfP *asp)"
- .br
- .ti -1c
- .RI "void fBnetsnmp_check_outstanding_agent_requestsfP (void)"
- .br
- .ti -1c
- .RI "int fBnetsnmp_check_transaction_idfP (int transaction_id)"
- .br
- .RI "fIDecide if the requested transaction_id is still being processed within the agent. fP"
- .ti -1c
- .RI "int fBcheck_getnext_resultsfP (fBnetsnmp_agent_sessionfP *asp)"
- .br
- .RI "fIreturns 1 if there are valid GETNEXT requests left. fP"
- .ti -1c
- .RI "int fBhandle_setfP (fBnetsnmp_agent_sessionfP *asp)"
- .br
- .ti -1c
- .RI "NETSNMP_STATIC_INLINE int fB_request_set_errorfP (fBnetsnmp_request_infofP *request, int mode, int error_value)"
- .br
- .RI "fIset error for a request fP"
- .ti -1c
- .RI "int fBnetsnmp_request_set_errorfP (fBnetsnmp_request_infofP *request, int error_value)"
- .br
- .RI "fIset error for a request fP"
- .ti -1c
- .RI "NETSNMP_INLINE int fBnetsnmp_request_set_error_allfP (fBnetsnmp_request_infofP *requests, int error)"
- .br
- .RI "fIset error for all requests fP"
- .ti -1c
- .RI "u_long fBnetsnmp_marker_uptimefP (fBmarker_tfP pm)"
- .br
- .ti -1c
- .RI "u_long fBnetsnmp_timeval_uptimefP (struct timeval *tv)"
- .br
- .ti -1c
- .RI "u_long fBnetsnmp_get_agent_uptimefP (void)"
- .br
- .ti -1c
- .RI "NETSNMP_INLINE void fBnetsnmp_agent_add_list_datafP (fBnetsnmp_agent_request_infofP *ari, fBnetsnmp_data_listfP *fBnodefP)"
- .br
- .ti -1c
- .RI "NETSNMP_INLINE int fBnetsnmp_agent_remove_list_datafP (fBnetsnmp_agent_request_infofP *ari, const char *name)"
- .br
- .ti -1c
- .RI "NETSNMP_INLINE void * fBnetsnmp_agent_get_list_datafP (fBnetsnmp_agent_request_infofP *ari, const char *name)"
- .br
- .ti -1c
- .RI "NETSNMP_INLINE void fBnetsnmp_free_agent_data_setfP (fBnetsnmp_agent_request_infofP *ari)"
- .br
- .ti -1c
- .RI "NETSNMP_INLINE void fBnetsnmp_free_agent_data_setsfP (fBnetsnmp_agent_request_infofP *ari)"
- .br
- .ti -1c
- .RI "NETSNMP_INLINE void fBnetsnmp_free_agent_request_infofP (fBnetsnmp_agent_request_infofP *ari)"
- .br
- .ti -1c
- .RI "int fBnetsnmp_set_request_errorfP (fBnetsnmp_agent_request_infofP *reqinfo, fBnetsnmp_request_infofP *request, int error_value)"
- .br
- .RI "fIdeprecated, use netsnmp_request_set_error instead fP"
- .ti -1c
- .RI "int fBnetsnmp_set_mode_request_errorfP (int mode, fBnetsnmp_request_infofP *request, int error_value)"
- .br
- .RI "fIdeprecated, use netsnmp_request_set_error instead fP"
- .ti -1c
- .RI "int fBnetsnmp_set_all_requests_errorfP (fBnetsnmp_agent_request_infofP *reqinfo, fBnetsnmp_request_infofP *requests, int error_value)"
- .br
- .RI "fIset error for all request fP"
- .in -1c
- .SS "Variables"
- .in +1c
- .ti -1c
- .RI "oid fBversion_sysoidfP [] = { SYSTEM_MIB }"
- .br
- .ti -1c
- .RI "int fBversion_sysoid_lenfP = OID_LENGTH(fBversion_sysoidfP)"
- .br
- .ti -1c
- .RI "int fBlog_addressesfP = 0"
- .br
- .ti -1c
- .RI "fBnetsnmp_agent_sessionfP * fBagent_delegated_listfP = NULL"
- .br
- .ti -1c
- .RI "fBnetsnmp_agent_sessionfP * fBnetsnmp_agent_queued_listfP = NULL"
- .br
- .ti -1c
- .RI "fBnetsnmp_sessionfP * fBmain_sessionfP = NULL"
- .br
- .ti -1c
- .RI "timeval fBstarttimefP"
- .br
- .in -1c
- .SH "Function Documentation"
- .PP
- .SS "NETSNMP_STATIC_INLINE int _request_set_error (fBnetsnmp_request_infofP * request, int mode, int error_value)"
- .PP
- set error for a request
- .PP
- Definition at line 3268 of file snmp_agent.c.
- .PP
- References netsnmp_request_info_s::delegated, netsnmp_request_info_s::processed, REQUEST_IS_NOT_DELEGATED, netsnmp_request_info_s::requestvb, snmp_log(), netsnmp_request_info_s::status, and variable_list::type.
- .PP
- Referenced by netsnmp_request_set_error(), netsnmp_request_set_error_all(), netsnmp_set_mode_request_error(), and netsnmp_set_request_error().
- .SS "int agent_check_and_process (int block)"
- .PP
- This function checks for packets arriving on the SNMP port and processes them(snmp_read) if some are found, using the select().
- .PP
- If block is non zero, the function call blocks until a packet arrives
- .PP
- fBParameters:fP
- .RS 4
- fIblockfP used to control blocking in the select() function, 1 = block forever, and 0 = don't block
- .RE
- .PP
- fBReturns:fP
- .RS 4
- Returns a positive integer if packets were processed, and -1 if an error was found.
- .RE
- .PP
- .PP
- Definition at line 562 of file snmp_agent.c.
- .PP
- References FD_ZERO, netsnmp_check_outstanding_agent_requests(), NULL, run_alarms(), snmp_log(), snmp_log_perror(), snmp_read(), snmp_select_info(), and snmp_timeout().
- .SS "int check_getnext_results (fBnetsnmp_agent_sessionfP * asp)"
- .PP
- returns 1 if there are valid GETNEXT requests left.
- .PP
- Returns 0 if not.
- .PP
- Definition at line 2684 of file snmp_agent.c.
- .PP
- References netsnmp_request_info_s::inclusive, netsnmp_request_info_s::index, netsnmp_agent_request_info_s::mode, netsnmp_agent_session_s::mode, variable_list::name, variable_list::name_length, netsnmp_request_info_s::next, NULL, netsnmp_agent_session_s::oldmode, netsnmp_request_info_s::range_end, netsnmp_request_info_s::range_end_len, netsnmp_request_info_s::repeat, netsnmp_agent_session_s::reqinfo, netsnmp_request_info_s::requestvb, snmp_oid_compare(), snmp_set_var_objid(), snmp_set_var_typed_value(), netsnmp_agent_session_s::treecache, netsnmp_agent_session_s::treecache_num, and variable_list::type.
- .PP
- Referenced by handle_getnext_loop().
- .SS "int handle_getnext_loop (fBnetsnmp_agent_sessionfP * asp)"
- .PP
- repeatedly calls getnext handlers looking for an answer till all requests are satisified.
- .PP
- It's expected that one pass has been made before entering this function
- .PP
- Definition at line 2789 of file snmp_agent.c.
- .PP
- References check_acm(), check_getnext_results(), handle_var_requests(), netsnmp_check_for_delegated(), netsnmp_reassign_requests(), variable_list::next_variable, netsnmp_agent_session_s::pdu, and snmp_pdu::variables.
- .PP
- Referenced by check_delayed_request(), and handle_pdu().
- .SS "int handle_pdu (fBnetsnmp_agent_sessionfP * asp)"
- .PP
- This function calls into netsnmp_set_mode_request_error, sets error_value given a reqinfo->mode value.
- .PP
- It's used to send specific errors back to the agent to process accordingly.
- .PP
- 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.
- .PP
- 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.
- .PP
- fBParameters:fP
- .RS 4
- fIreqinfofP is a pointer to the netsnmp_agent_request_info struct. It contains the reqinfo->mode which is required to set error_value or log error messages.
- .br
- fIrequestfP is a pointer to the netsnmp_request_info struct. The error_value is set to request->requestvb->type
- .br
- fIerror_valuefP is the exception value you want to set, below are possible values.
- .IP "(bu" 2
- SNMP_NOSUCHOBJECT
- .IP "(bu" 2
- SNMP_NOSUCHINSTANCE
- .IP "(bu" 2
- SNMP_ENDOFMIBVIEW
- .IP "(bu" 2
- SNMP_ERR_NOERROR
- .IP "(bu" 2
- SNMP_ERR_TOOBIG
- .IP "(bu" 2
- SNMP_ERR_NOSUCHNAME
- .IP "(bu" 2
- SNMP_ERR_BADVALUE
- .IP "(bu" 2
- SNMP_ERR_READONLY
- .IP "(bu" 2
- SNMP_ERR_GENERR
- .IP "(bu" 2
- SNMP_ERR_NOACCESS
- .IP "(bu" 2
- SNMP_ERR_WRONGTYPE
- .IP "(bu" 2
- SNMP_ERR_WRONGLENGTH
- .IP "(bu" 2
- SNMP_ERR_WRONGENCODING
- .IP "(bu" 2
- SNMP_ERR_WRONGVALUE
- .IP "(bu" 2
- SNMP_ERR_NOCREATION
- .IP "(bu" 2
- SNMP_ERR_INCONSISTENTVALUE
- .IP "(bu" 2
- SNMP_ERR_RESOURCEUNAVAILABLE
- .IP "(bu" 2
- SNMP_ERR_COMMITFAILED
- .IP "(bu" 2
- SNMP_ERR_UNDOFAILED
- .IP "(bu" 2
- SNMP_ERR_AUTHORIZATIONERROR
- .IP "(bu" 2
- SNMP_ERR_NOTWRITABLE
- .IP "(bu" 2
- SNMP_ERR_INCONSISTENTNAME
- .PP
- .RE
- .PP
- fBReturns:fP
- .RS 4
- Returns error_value under all conditions.
- .RE
- .PP
- .PP
- Definition at line 3083 of file snmp_agent.c.
- .PP
- References check_acm(), snmp_pdu::command, count_varbinds(), snmp_pdu::flags, get_set_cache(), handle_getnext_loop(), handle_set_loop(), handle_var_requests(), netsnmp_agent_session_s::mode, netsnmp_create_subtree_cache(), variable_list::next_variable, NULL, netsnmp_agent_session_s::oldmode, netsnmp_agent_session_s::pdu, netsnmp_agent_session_s::requests, snmp_increment_statistic(), snmp_replace_var_types(), snmp_set_var_typed_value(), netsnmp_agent_session_s::status, variable_list::type, snmp_pdu::variables, and netsnmp_agent_session_s::vbcount.
- .PP
- Referenced by netsnmp_handle_request().
- .SS "int handle_snmp_packet (int op, fBnetsnmp_sessionfP * session, int reqid, fBnetsnmp_pdufP * pdu, void * magic)"
- .PP
- handles an incoming SNMP packet into the agent
- .PP
- Definition at line 1731 of file snmp_agent.c.
- .PP
- References check_access(), snmp_pdu::command, snmp_pdu::errstat, init_agent_snmp_session(), netsnmp_handle_request(), netsnmp_remove_and_free_agent_snmp_session(), NULL, netsnmp_agent_session_s::pdu, snmp_session::s_snmp_errno, send_easy_trap(), netsnmp_agent_session_s::session, snmp_free_pdu(), snmp_increment_statistic(), snmp_send(), netsnmp_agent_session_s::status, and snmp_pdu::version.
- .PP
- Referenced by netsnmp_register_agent_nsap().
- .SS "fBnetsnmp_request_infofP* netsnmp_add_varbind_to_cache (fBnetsnmp_agent_sessionfP * asp, int vbcount, fBnetsnmp_variable_listfP * varbind_ptr, fBnetsnmp_subtreefP * tp)"
- .PP
- fBTodofP
- .RS 4
- make this be more intelligent about ranges. Right now we merely take the highest level commonality of a registration range and use that. At times we might be able to be smarter about checking the range itself as opposed to the node above where the range exists, but I doubt this will come up all that frequently.
- .RE
- .PP
- .PP
- Definition at line 1832 of file snmp_agent.c.
- .PP
- References netsnmp_request_info_s::agent_req_info, netsnmp_agent_session_s::cache_store, netsnmp_subtree_s::cacheid, snmp_pdu::command, netsnmp_request_info_s::delegated, netsnmp_subtree_s::end_a, netsnmp_subtree_s::end_len, netsnmp_subtree_s::global_cacheid, netsnmp_request_info_s::inclusive, netsnmp_request_info_s::index, variable_list::name, variable_list::name_length, netsnmp_acm_check_subtree(), netsnmp_free_request_data_sets(), netsnmp_get_local_cachid(), netsnmp_get_or_add_local_cachid(), netsnmp_oid_find_prefix(), netsnmp_request_info_s::next, netsnmp_subtree_s::next, NULL, netsnmp_request_info_s::parent_data, netsnmp_agent_session_s::pdu, netsnmp_request_info_s::prev, netsnmp_request_info_s::processed, netsnmp_request_info_s::range_end, netsnmp_request_info_s::range_end_len, netsnmp_agent_session_s::reqinfo, netsnmp_agent_session_s::requests, netsnmp_tree_cache_s::requests_begin, netsnmp_tree_cache_s::requests_end, netsnmp_request_info_s::requestvb, netsnmp_request_info_s::requestvb_start, netsnmp_subtree_s::start_a, netsnmp_subtree_s::start_len, netsnmp_request_info_s::status, netsnmp_tree_cache_s::subtree, netsnmp_request_info_s::subtree, netsnmp_agent_session_s::treecache, netsnmp_agent_session_s::treecache_len, netsnmp_agent_session_s::treecache_num, and variable_list::type.
- .PP
- Referenced by netsnmp_create_subtree_cache(), and netsnmp_reassign_requests().
- .SS "int netsnmp_check_transaction_id (int transaction_id)"
- .PP
- Decide if the requested transaction_id is still being processed within the agent.
- .PP
- This is used to validate whether a delayed cache (containing possibly freed pointers) is still usable.
- .PP
- returns SNMPERR_SUCCESS if it's still valid, or SNMPERR_GENERR if not.
- .PP
- Definition at line 2594 of file snmp_agent.c.
- .PP
- References netsnmp_agent_session_s::next, NULL, netsnmp_agent_session_s::pdu, and snmp_pdu::transid.
- .PP
- Referenced by check_delayed_request(), and netsnmp_handler_check_cache().
- .SS "int netsnmp_request_set_error (fBnetsnmp_request_infofP * request, int error_value)"
- .PP
- set error for a request
- .PP
- fBParameters:fP
- .RS 4
- fIrequestfP request which has error
- .br
- fIerror_valuefP error value for request
- .RE
- .PP
- .PP
- Definition at line 3336 of file snmp_agent.c.
- .PP
- References _request_set_error(), netsnmp_request_info_s::agent_req_info, and netsnmp_agent_request_info_s::mode.
- .PP
- Referenced by netsnmp_remove_delegated_requests_for_session().
- .SS "NETSNMP_INLINE int netsnmp_request_set_error_all (fBnetsnmp_request_infofP * requests, int error)"
- .PP
- set error for all requests
- .PP
- fBParameters:fP
- .RS 4
- fIrequestsfP request list
- .br
- fIerror_valuefP error value for requests
- .RE
- .PP
- fBReturns:fP
- .RS 4
- SNMPERR_SUCCESS, or an error code
- .RE
- .PP
- paranoid sanity checks
- .PP
- Definition at line 3351 of file snmp_agent.c.
- .PP
- References _request_set_error(), netsnmp_request_info_s::agent_req_info, netsnmp_agent_request_info_s::mode, netsnmp_request_info_s::next, NULL, and snmp_log().
- .PP
- Referenced by netsnmp_set_all_requests_error().
- .SS "int netsnmp_set_all_requests_error (fBnetsnmp_agent_request_infofP * reqinfo, fBnetsnmp_request_infofP * requests, int error_value)"
- .PP
- set error for all request
- .PP
- fBDeprecatedfP
- .RS 4
- use netsnmp_request_set_error_all
- .PP
- fBParameters:fP
- .RS 4
- fIreqinfofP agent_request_info pointer for requests
- .br
- fIrequestsfP request list
- .br
- fIerror_valuefP error value for requests
- .RE
- .PP
- fBReturns:fP
- .RS 4
- error_value
- .RE
- .PP
- .RE
- .PP
- .PP
- Definition at line 3525 of file snmp_agent.c.
- .PP
- References netsnmp_request_set_error_all().
- .PP
- Referenced by netsnmp_cache_helper_handler(), netsnmp_multiplexer_helper_handler(), and netsnmp_read_only_helper().
- .SS "int netsnmp_set_mode_request_error (int mode, fBnetsnmp_request_infofP * request, int error_value)"
- .PP
- deprecated, use netsnmp_request_set_error instead
- .PP
- fBDeprecatedfP
- .RS 4
- , use netsnmp_request_set_error instead
- .PP
- fBParameters:fP
- .RS 4
- fImodefP Net-SNMP agent processing mode
- .br
- fIrequestfP request_info pointer
- .br
- fIerror_valuefP error value for requests
- .RE
- .PP
- fBReturns:fP
- .RS 4
- error_value
- .RE
- .PP
- .RE
- .PP
- .PP
- Definition at line 3509 of file snmp_agent.c.
- .PP
- References _request_set_error().
- .SS "int netsnmp_set_request_error (fBnetsnmp_agent_request_infofP * reqinfo, fBnetsnmp_request_infofP * request, int error_value)"
- .PP
- deprecated, use netsnmp_request_set_error instead
- .PP
- fBDeprecatedfP
- .RS 4
- , use netsnmp_request_set_error instead
- .PP
- fBParameters:fP
- .RS 4
- fIreqinfofP agent_request_info pointer for request
- .br
- fIrequestfP request_info pointer
- .br
- fIerror_valuefP error value for requests
- .RE
- .PP
- fBReturns:fP
- .RS 4
- error_value
- .RE
- .PP
- .RE
- .PP
- .PP
- fBExamples: fP
- .in +1c
- fBdelayed_instance.cfP.
- .PP
- Definition at line 3490 of file snmp_agent.c.
- .PP
- References _request_set_error(), and netsnmp_agent_request_info_s::mode.
- .PP
- Referenced by netsnmp_call_handlers(), netsnmp_instance_counter32_handler(), netsnmp_instance_helper_handler(), netsnmp_instance_int_handler(), netsnmp_instance_long_handler(), netsnmp_instance_ulong_handler(), netsnmp_old_api_helper(), netsnmp_scalar_group_helper_handler(), netsnmp_scalar_helper_handler(), netsnmp_table_data_helper_handler(), netsnmp_table_data_set_helper_handler(), netsnmp_watched_spinlock_handler(), netsnmp_watched_timestamp_handler(), netsnmp_watcher_helper_handler(), and table_helper_handler().
- .SS "int netsnmp_wrap_up_request (fBnetsnmp_agent_sessionfP * asp, int status)"
- .PP
- if asp->pdu
- .PP
- Definition at line 1482 of file snmp_agent.c.
- .PP
- References _reorder_getbulk(), snmp_pdu::command, count_varbinds(), snmp_pdu::errindex, snmp_pdu::errstat, netsnmp_agent_session_s::index, variable_list::name, variable_list::name_length, netsnmp_remove_and_free_agent_snmp_session(), variable_list::next_variable, NULL, netsnmp_agent_session_s::orig_pdu, netsnmp_agent_session_s::pdu, save_set_cache(), netsnmp_agent_session_s::session, SNMP_FREE, snmp_free_pdu(), snmp_increment_statistic(), snmp_increment_statistic_by(), snmp_log(), snmp_perror(), snmp_send(), sprint_realloc_objid(), netsnmp_agent_session_s::status, variable_list::type, snmp_pdu::variables, and snmp_pdu::version.
- .PP
- Referenced by check_delayed_request(), and netsnmp_handle_request().