netsnmp_snmp_client.3
上传用户:wxp200602
上传日期:2007-10-30
资源大小:4028k
文件大小:6k
- .TH "various PDU processing routines" 3 "28 Nov 2005" "Version 5.2.1.rc3" "net-snmp" " -*- nroff -*-
- .ad l
- .nh
- .SH NAME
- various PDU processing routines -
- .SS "Defines"
- .in +1c
- .ti -1c
- .RI "#define fBBSD4_2fP"
- .br
- .ti -1c
- .RI "#define fBNFDBITSfP (sizeof(fBfd_maskfP) * NBBY)"
- .br
- .ti -1c
- .RI "#define fBFD_SETfP(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))"
- .br
- .ti -1c
- .RI "#define fBFD_CLRfP(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))"
- .br
- .ti -1c
- .RI "#define fBFD_ISSETfP(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))"
- .br
- .ti -1c
- .RI "#define fBFD_ZEROfP(p) memset((p), 0, sizeof(*(p)))"
- .br
- .in -1c
- .SS "Typedefs"
- .in +1c
- .ti -1c
- .RI "typedef long fBfd_maskfP"
- .br
- .in -1c
- .SS "Functions"
- .in +1c
- .ti -1c
- .RI "fBnetsnmp_pdufP * fBsnmp_pdu_createfP (int command)"
- .br
- .ti -1c
- .RI "fBnetsnmp_variable_listfP * fBsnmp_add_null_varfP (fBnetsnmp_pdufP *pdu, const oid *name, size_t name_length)"
- .br
- .ti -1c
- .RI "int fBsnmp_clone_varfP (fBnetsnmp_variable_listfP *var, fBnetsnmp_variable_listfP *newvar)"
- .br
- .ti -1c
- .RI "int fBsnmp_clone_memfP (void **dstPtr, void *srcPtr, unsigned len)"
- .br
- .ti -1c
- .RI "void fBsnmp_reset_var_buffersfP (fBnetsnmp_variable_listfP *var)"
- .br
- .ti -1c
- .RI "fBnetsnmp_variable_listfP * fBsnmp_clone_varbindfP (fBnetsnmp_variable_listfP *varlist)"
- .br
- .ti -1c
- .RI "fBnetsnmp_pdufP * fBsnmp_clone_pdufP (fBnetsnmp_pdufP *pdu)"
- .br
- .ti -1c
- .RI "fBnetsnmp_pdufP * fBsnmp_split_pdufP (fBnetsnmp_pdufP *pdu, int skip_count, int copy_count)"
- .br
- .ti -1c
- .RI "fBnetsnmp_pdufP * fBsnmp_fix_pdufP (fBnetsnmp_pdufP *pdu, int command)"
- .br
- .ti -1c
- .RI "unsigned long fBsnmp_varbind_lenfP (fBnetsnmp_pdufP *pdu)"
- .br
- .ti -1c
- .RI "int fBsnmp_set_var_objidfP (fBnetsnmp_variable_listfP *vp, const oid *objid, size_t name_length)"
- .br
- .ti -1c
- .RI "int fBsnmp_set_var_typed_valuefP (fBnetsnmp_variable_listfP *newvar, u_char type, const u_char *val_str, size_t val_len)"
- .br
- .RI "fIsnmp_set_var_typed_value is used to set data into the netsnmp_variable_list structure. fP"
- .ti -1c
- .RI "int fBcount_varbindsfP (fBnetsnmp_variable_listfP *var_ptr)"
- .br
- .ti -1c
- .RI "int fBcount_varbinds_of_typefP (fBnetsnmp_variable_listfP *var_ptr, u_char type)"
- .br
- .ti -1c
- .RI "fBnetsnmp_variable_listfP * fBfind_varbind_of_typefP (fBnetsnmp_variable_listfP *var_ptr, u_char type)"
- .br
- .ti -1c
- .RI "int fBsnmp_set_var_valuefP (fBnetsnmp_variable_listfP *vars, const u_char *value, size_t len)"
- .br
- .ti -1c
- .RI "void fBsnmp_replace_var_typesfP (fBnetsnmp_variable_listfP *vbl, u_char old_type, u_char new_type)"
- .br
- .ti -1c
- .RI "void fBsnmp_reset_var_typesfP (fBnetsnmp_variable_listfP *vbl, u_char new_type)"
- .br
- .ti -1c
- .RI "int fBsnmp_synch_response_cbfP (fBnetsnmp_sessionfP *ss, fBnetsnmp_pdufP *pdu, fBnetsnmp_pdufP **response, snmp_callback pcb)"
- .br
- .ti -1c
- .RI "int fBsnmp_synch_responsefP (fBnetsnmp_sessionfP *ss, fBnetsnmp_pdufP *pdu, fBnetsnmp_pdufP **response)"
- .br
- .ti -1c
- .RI "int fBsnmp_sess_synch_responsefP (void *sessp, fBnetsnmp_pdufP *pdu, fBnetsnmp_pdufP **response)"
- .br
- .ti -1c
- .RI "const char * fBsnmp_errstringfP (int errstat)"
- .br
- .in -1c
- .SS "Variables"
- .in +1c
- .ti -1c
- .RI "const char * fBerror_stringfP [19]"
- .br
- .in -1c
- .SH "Function Documentation"
- .PP
- .SS "int snmp_set_var_typed_value (fBnetsnmp_variable_listfP * newvar, u_char type, const u_char * val_str, size_t val_len)"
- .PP
- snmp_set_var_typed_value is used to set data into the netsnmp_variable_list structure.
- .PP
- Used to return data to the snmp request via the netsnmp_request_info structure's requestvb pointer.
- .PP
- fBParameters:fP
- .RS 4
- fInewvarfP the structure gets populated with the given data, type, val_str, and val_len.
- .br
- fItypefP is the asn data type to be copied
- .br
- fIval_strfP is a buffer containing the value to be copied into the newvar structure.
- .br
- fIval_lenfP the length of val_str
- .RE
- .PP
- fBReturns:fP
- .RS 4
- returns 0 on success and 1 on a malloc error
- .RE
- .PP
- .PP
- fBExamples: fP
- .in +1c
- fBdelayed_instance.cfP.
- .PP
- Definition at line 685 of file snmp_client.c.
- .PP
- References snmp_set_var_value(), and variable_list::type.
- .PP
- Referenced by _reorder_getbulk(), check_acm(), check_getnext_results(), handle_pdu(), netsnmp_check_getnext_reply(), netsnmp_create_subtree_cache(), netsnmp_instance_counter32_handler(), netsnmp_instance_int_handler(), netsnmp_instance_long_handler(), netsnmp_instance_ulong_handler(), netsnmp_old_api_helper(), netsnmp_stash_cache_helper(), netsnmp_table_build_result(), netsnmp_table_data_build_result(), netsnmp_watched_timestamp_handler(), netsnmp_watcher_helper_handler(), snmp_replace_var_types(), and snmp_reset_var_types().
- .SH "Variable Documentation"
- .PP
- .SS "const char* fBerror_stringfP[19]"
- .PP
- fBInitial value:fP
- .PP
- .nf
- {
- '(noError) No Error',
- '(tooBig) Response message would have been too large.',
- '(noSuchName) There is no such variable name in this MIB.',
- '(badValue) The value given has the wrong type or length.',
- '(readOnly) The two parties used do not have access to use the specified SNMP PDU.',
- '(genError) A general failure occured',
- 'noAccess',
- 'wrongType (The set datatype does not match the data type the agent expects)',
- 'wrongLength (The set value has an illegal length from what the agent expects)',
- 'wrongEncoding',
- 'wrongValue (The set value is illegal or unsupported in some way)',
- 'noCreation (That table does not support row creation or that object can not ever be created)',
- 'inconsistentValue (The set value is illegal or unsupported in some way)',
- 'resourceUnavailable (This is likely a out-of-memory failure within the agent)',
- 'commitFailed',
- 'undoFailed',
- 'authorizationError (access denied to that object)',
- 'notWritable (That object does not support modification)',
- 'inconsistentName (That object can not currently be created)'
- }
- .fi
- .PP
- Definition at line 1102 of file snmp_client.c.