various PDU processing routines
[The Net-SNMP library]


マクロ定義

#define BSD4_2
#define NFDBITS   (sizeof(fd_mask) * NBBY)
#define FD_SET(n, p)   ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
#define FD_CLR(n, p)   ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
#define FD_ISSET(n, p)   ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
#define FD_ZERO(p)   memset((p), 0, sizeof(*(p)))

型定義

typedef long fd_mask

関数

netsnmp_pdusnmp_pdu_create (int command)
netsnmp_variable_listsnmp_add_null_var (netsnmp_pdu *pdu, const oid *name, size_t name_length)
int snmp_clone_var (netsnmp_variable_list *var, netsnmp_variable_list *newvar)
int snmp_clone_mem (void **dstPtr, void *srcPtr, unsigned len)
void snmp_reset_var_buffers (netsnmp_variable_list *var)
netsnmp_variable_listsnmp_clone_varbind (netsnmp_variable_list *varlist)
netsnmp_pdusnmp_clone_pdu (netsnmp_pdu *pdu)
netsnmp_pdusnmp_split_pdu (netsnmp_pdu *pdu, int skip_count, int copy_count)
netsnmp_pdusnmp_fix_pdu (netsnmp_pdu *pdu, int command)
unsigned long snmp_varbind_len (netsnmp_pdu *pdu)
int snmp_set_var_objid (netsnmp_variable_list *vp, const oid *objid, size_t name_length)
int snmp_set_var_typed_value (netsnmp_variable_list *newvar, u_char type, const u_char *val_str, size_t val_len)
 snmp_set_var_typed_value is used to set data into the netsnmp_variable_list structure.
int snmp_set_var_typed_integer (netsnmp_variable_list *newvar, u_char type, long val)
int count_varbinds (netsnmp_variable_list *var_ptr)
int count_varbinds_of_type (netsnmp_variable_list *var_ptr, u_char type)
netsnmp_variable_listfind_varbind_of_type (netsnmp_variable_list *var_ptr, u_char type)
netsnmp_variable_listfind_varbind_in_list (netsnmp_variable_list *vblist, oid *name, size_t len)
int snmp_set_var_value (netsnmp_variable_list *vars, const u_char *value, size_t len)
void snmp_replace_var_types (netsnmp_variable_list *vbl, u_char old_type, u_char new_type)
void snmp_reset_var_types (netsnmp_variable_list *vbl, u_char new_type)
int snmp_synch_response_cb (netsnmp_session *ss, netsnmp_pdu *pdu, netsnmp_pdu **response, snmp_callback pcb)
int snmp_synch_response (netsnmp_session *ss, netsnmp_pdu *pdu, netsnmp_pdu **response)
int snmp_sess_synch_response (void *sessp, netsnmp_pdu *pdu, netsnmp_pdu **response)
const char * snmp_errstring (int errstat)
void netsnmp_query_set_default_session (netsnmp_session *sess)
netsnmp_sessionnetsnmp_query_get_default_session (void)
int netsnmp_query_get (netsnmp_variable_list *list, netsnmp_session *session)
int netsnmp_query_getnext (netsnmp_variable_list *list, netsnmp_session *session)
int netsnmp_query_set (netsnmp_variable_list *list, netsnmp_session *session)
int netsnmp_query_walk (netsnmp_variable_list *list, netsnmp_session *session)

変数

const char * error_string [19]

関数

int snmp_set_var_typed_value ( netsnmp_variable_list newvar,
u_char  type,
const u_char *  val_str,
size_t  val_len 
)

snmp_set_var_typed_value is used to set data into the netsnmp_variable_list structure.

Used to return data to the snmp request via the netsnmp_request_info structure's requestvb pointer.

引数:
newvar the structure gets populated with the given data, type, val_str, and val_len.
type is the asn data type to be copied
val_str is a buffer containing the value to be copied into the newvar structure.
val_len the length of val_str
戻り値:
returns 0 on success and 1 on a malloc error
例:
delayed_instance.c.

snmp_client.c686 行で定義されています。

参照先 snmp_set_var_value()variable_list::type.

参照元 _reorder_getbulk()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_num_file_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()snmp_reset_var_types().

int snmp_set_var_value ( netsnmp_variable_list vars,
const u_char *  value,
size_t  len 
)

snmp_client.c753 行で定義されています。

参照先 variable_list::bufnetsnmp_vardata::counter64netsnmp_vardata::integerNULLnetsnmp_vardata::objidsnmp_log()snmp_set_detail()netsnmp_vardata::stringvariable_list::typevariable_list::valvariable_list::val_len.

参照元 parse_one_oid_index()snmp_set_var_typed_integer()snmp_set_var_typed_value()snmp_varlist_add_variable().


変数

const char* error_string[19]

初期値:

 {
    "(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)"
}

snmp_client.c1130 行で定義されています。


net-snmpに対してSat Sep 5 13:14:29 2009に生成されました。  doxygen 1.4.7