| /onnv-gate/usr/src/cmd/agents/snmp/snmplib/test/ |
| H A D | madman_api_test.c | 64 static int target_add(char *name, char *error_label); 69 static int target_add(char *name, char *error_label) in target_add() argument 74 error_label[0] = '\0'; in target_add() 78 sprintf(error_label, "BUG: name is NULL"); in target_add() 85 sprintf(error_label, ERR_MSG_ALLOC); in target_add() 132 applEntry = applEntry_process_response(session, response, error_label); in snmp_callback() 140 if(assocEntry_send_request(session, GETNEXT_REQ_MSG, -1, -1, error_label)) in snmp_callback() 143 session->peername, error_label); in snmp_callback() 144 snmp_session_close(session, error_label); in snmp_callback() 151 request_name, session->peername, error_label); in snmp_callback() [all …]
|
| H A D | madman_api_test_2.c | 64 static int target_add(char *name, char *error_label); 69 static int target_add(char *name, char *error_label) in target_add() argument 74 error_label[0] = '\0'; in target_add() 78 sprintf(error_label, "BUG: name is NULL"); in target_add() 85 sprintf(error_label, ERR_MSG_ALLOC); in target_add() 132 applEntry = applEntry_process_response(session, response, error_label); in snmp_callback() 140 if(assocEntry_send_request(session, GETNEXT_REQ_MSG, -1, -1, error_label)) in snmp_callback() 143 session->peername, error_label); in snmp_callback() 144 snmp_session_close(session, error_label); in snmp_callback() 151 request_name, session->peername, error_label); in snmp_callback() [all …]
|
| H A D | asn1_test.c | 58 p = asn_parse_int(static_buffer, &len, &type, &integer, sizeof(long), error_label); in main() 61 fprintf(stderr, "asn_parse_int() failed: %s\n", error_label); in main() 110 p = asn_build_int(buffer, &len, type, &integer, sizeof(long), error_label); in second_test() 113 fprintf(stderr, "asn_build_int() failed: %s\n", error_label); in second_test() 127 p = asn_parse_int(buffer, &len, &type, &integer, sizeof(long), error_label); in second_test() 130 fprintf(stderr, "asn_parse_int() failed: %s\n", error_label); in second_test() 143 pdu = snmp_pdu_new(error_label); in third_test()
|
| H A D | trap_test.c | 42 if(trap_destinator_add("panda", error_label)) in main() 45 error_label); in main() 49 if(trap_send_to_all_destinators(NULL, SNMP_TRAP_WARMSTART, 0, NULL, error_label)) in main() 52 error_label); in main()
|
| H A D | madman_trap_test.c | 109 if(trap_init(&sysObjectID_value, error_label)) in main() 111 fprintf(stderr, "trap_init() failed: %s\n", error_label); in main() 115 if(trap_destinator_add("panda", error_label)) in main() 118 error_label); in main()
|
| /onnv-gate/usr/src/cmd/agents/snmp/snmplib/ |
| H A D | asn1.c | 54 char *error_label) in asn_parse_int() argument 64 error_label[0] = '\0'; in asn_parse_int() 67 (void)sprintf(error_label, ERR_MSG_NOT_LONG); in asn_parse_int() 71 bufp = asn_parse_length(bufp, &asn_length, error_label); in asn_parse_int() 73 (void)sprintf(error_label, ERR_MSG_BAD_LENGTH); in asn_parse_int() 78 (void)sprintf(error_label, ERR_MSG_OVERFLOW); in asn_parse_int() 82 (void)sprintf(error_label, ERR_MSG_DONT_SUPPORT_LARGE_INT); in asn_parse_int() 112 char *error_label) in asn_parse_unsigned_int() argument 121 error_label[0] = '\0'; in asn_parse_unsigned_int() 124 (void)sprintf(error_label, ERR_MSG_NOT_LONG); in asn_parse_unsigned_int() [all …]
|
| H A D | request.c | 70 /* static */ SNMP_pdu *request_create(char *community, int type, char *error_label) in request_create() argument 75 error_label[0] = '\0'; in request_create() 85 sprintf(error_label, "BUG: request_create(): bad type (0x%x)", in request_create() 90 request = snmp_pdu_new(error_label); in request_create() 100 sprintf(error_label, ERR_MSG_ALLOC); in request_create() 114 …cking(IPAddress *ip_address, int port,struct timeval *timeout,SNMP_pdu *request, char *error_label) in request_send_to_port_time_out_blocking() argument 125 error_label[0] = '\0'; in request_send_to_port_time_out_blocking() 129 sprintf(error_label, "BUG: request_send_blocking(): request is NULL"); in request_send_to_port_time_out_blocking() 141 sprintf(error_label, "BUG: request_send_blocking(): bad type (0x%x)", in request_send_to_port_time_out_blocking() 150 sprintf(error_label, ERR_MSG_SOCKET, in request_send_to_port_time_out_blocking() [all …]
|
| H A D | trap.c | 77 int trap_init(Oid *enterprise, char *error_label) in trap_init() argument 79 error_label[0] = '\0'; in trap_init() 83 sprintf(error_label, "BUG: trap_init(): enterprise is NULL"); in trap_init() 90 default_enterprise = SSAOidDup(enterprise, error_label); in trap_init() 102 …p_address, Oid *enterprise, int generic, int specific, SNMP_variable *variables, char *error_label) in trap_send() argument 114 error_label[0] = '\0'; in trap_send() 118 if(get_my_ip_address(&my_ip_address, error_label)) in trap_send() 126 pdu = snmp_pdu_new(error_label); in trap_send() 144 sprintf(error_label, ERR_MSG_ALLOC); in trap_send() 164 if(SSAOidCpy(&(pdu->enterprise), enterprise, error_label)) in trap_send() [all …]
|
| H A D | pdu.c | 66 static SNMP_pdu *snmp_pdu_decode(u_char *packet, int length, char *error_label); 67 static SNMP_variable *snmp_pdu_decode_variable(u_char **data, int *length, char *error_label); 68 static int snmp_pdu_encode(SNMP_pdu *pdu, u_char *packet, int *length, char *error_label); 69 …r *snmp_pdu_encode_variable(SNMP_variable *variable, u_char *data, int *length, char *error_label); 76 SNMP_variable *snmp_variable_new(char *error_label) in snmp_variable_new() argument 81 error_label[0] = '\0'; in snmp_variable_new() 86 sprintf(error_label, ERR_MSG_ALLOC); in snmp_variable_new() 97 SNMP_variable *snmp_typed_variable_new(Oid *name, u_char type, SNMP_value *value, char *error_label) in snmp_typed_variable_new() argument 102 error_label[0] = '\0'; in snmp_typed_variable_new() 106 sprintf(error_label, "BUG: snmp_typed_variable_new(): name is NULL"); in snmp_typed_variable_new() [all …]
|
| H A D | impl.c | 313 int SSAStringCpy(String *string1, String *string2, char *error_label) in SSAStringCpy() argument 315 error_label[0] = '\0'; in SSAStringCpy() 319 sprintf(error_label, "BUG: SSAStringCpy(): string1 is NULL"); in SSAStringCpy() 325 sprintf(error_label, "BUG: SSAStringCpy(): string2 is NULL"); in SSAStringCpy() 331 sprintf(error_label, "BUG: SSAStringCpy(): string1->chars is not NULL"); in SSAStringCpy() 337 sprintf(error_label, "BUG: SSAStringCpy(): string1->len is not 0"); in SSAStringCpy() 349 sprintf(error_label, ERR_MSG_ALLOC); in SSAStringCpy() 385 int SSAStringInit(String *string, u_char *chars, int len, char *error_label) in SSAStringInit() argument 387 error_label[0] = '\0'; in SSAStringInit() 391 sprintf(error_label, "BUG: SSAStringInit(): string is NULL"); in SSAStringInit() [all …]
|
| H A D | madman_api.c | 1023 uintptr_t pointer, char *error_label); 1032 int sysUpTime_send_request(SNMP_session *session, char *error_label) in sysUpTime_send_request() argument 1038 error_label[0] = '\0'; in sysUpTime_send_request() 1041 request = snmp_pdu_new(error_label); in sysUpTime_send_request() 1048 if(snmp_pdu_append_null_variable(request, object->name, error_label) == NULL) in sysUpTime_send_request() 1054 if(snmp_session_send(session, SYSUPTIME_REQ, request, error_label)) in sysUpTime_send_request() 1070 SysUpTime *sysUpTime_process_response(SNMP_session *session, SNMP_pdu *response, char *error_label) in sysUpTime_process_response() argument 1078 error_label[0] = '\0'; in sysUpTime_process_response() 1082 sprintf(error_label, "BUG: sysUpTime_process_response(): response is NULL"); in sysUpTime_process_response() 1088 sprintf(error_label, ERR_MSG_ERROR_STATUS, in sysUpTime_process_response() [all …]
|
| H A D | madman_api.h | 354 int sysUpTime_send_request(SNMP_session *session, char *error_label); 356 SNMP_pdu *response, char *error_label); 368 u_char request_type, int32_t applIndex, char *error_label); 370 SNMP_pdu *response, char *error_label); 377 u_char request_type, int32_t applIndex, int32_t assocIndex, char *error_label); 379 SNMP_pdu *response, char *error_label); 396 u_char request_type, int32_t applIndex, char *error_label); 398 SNMP_pdu *response, char *error_label); 405 u_char request_type, int32_t applIndex, int32_t mtaGroupIndex, char *error_label); 407 SNMP_pdu *response, char *error_label); [all …]
|
| H A D | pdu.h | 89 extern SNMP_variable *snmp_pdu_append_null_variable(SNMP_pdu *pdu, Oid *name, char *error_label); 91 u_char type, SNMP_value *value, char *error_label); 94 extern SNMP_pdu *snmp_pdu_receive(int sd, Address *address, char *error_label); 95 extern int snmp_pdu_send(int sd, Address *address, SNMP_pdu *pdu, char *error_label); 102 extern SNMP_pdu *snmp_pdu_new(char *error_label); 103 extern SNMP_variable *snmp_variable_new(char *error_label); 104 …MP_variable *snmp_typed_variable_new(Oid *name, u_char type, SNMP_value *value, char *error_label); 106 …variable_append(SNMP_variable *list, Oid *name, u_char type, SNMP_value *value, char *error_label); 108 extern SNMP_pdu *snmp_pdu_dup(SNMP_pdu *pdu, char *error_label); 109 extern SNMP_variable *snmp_variable_dup(SNMP_variable *variable, char *error_label); [all …]
|
| H A D | madman_trap.c | 81 STRING, &value, error_label); in send_trap_appl_status_changed() 86 error_label); in send_trap_appl_status_changed() 95 INTEGER, &value, error_label); in send_trap_appl_status_changed() 100 error_label); in send_trap_appl_status_changed() 107 list, error_label)) in send_trap_appl_status_changed() 111 error_label); in send_trap_appl_status_changed() 139 STRING, &value, error_label); in send_trap_appl_alarm() 144 error_label); in send_trap_appl_alarm() 152 INTEGER, &value, error_label); in send_trap_appl_alarm() 157 error_label); in send_trap_appl_alarm() [all …]
|
| H A D | signals.c | 42 signals_init(void signals_sighup(), void signals_exit(), char *error_label) in signals_init() argument 47 error_label[0] = '\0'; in signals_init() 51 (void) sprintf(error_label, ERR_MSG_SIGACT, SIGHUP, in signals_init() 57 (void) sprintf(error_label, ERR_MSG_SIGACT, SIGINT, in signals_init() 61 (void) sprintf(error_label, ERR_MSG_SIGACT, SIGTERM, in signals_init() 65 (void) sprintf(error_label, ERR_MSG_SIGACT, SIGUSR1, in signals_init() 69 (void) sprintf(error_label, ERR_MSG_SIGACT, SIGUSR2, in signals_init() 76 (void) sprintf(error_label, ERR_MSG_SIGACT, in signals_init()
|
| H A D | trap.h | 44 extern int trap_init(Oid *default_enterprise, char *error_label); 46 …_address, Oid *enterprise, int generic, int specific, SNMP_variable *variables, char *error_label); 57 char *error_label); 58 extern int trap_destinator_add(char *name, char *error_label); 61 …stinators(Oid *enterprise, int generic, int specific, SNMP_variable *variables, char *error_label); 62 …rise, int generic, int specific, uint32_t time_stamp, SNMP_variable *variables, char *error_label); 66 SNMP_variable *variables,char *error_label);
|
| H A D | request.h | 42 extern int32_t request_sysUpTime(char *error_label, char *community_name); 43 extern int request_snmpEnableAuthTraps(char *error_label); 44 extern SNMP_pdu *request_create(char *community, int type, char *error_label); 45 extern SNMP_pdu *request_send_blocking(IPAddress *ip_address, SNMP_pdu *request, char *error_label); 46 …equest_send_to_port_blocking(IPAddress *ip_address, int port,SNMP_pdu *request, char *error_label); 47 …king(IPAddress *ip_address, int port,struct timeval *timeout,SNMP_pdu *request, char *error_label);
|
| H A D | impl.h | 118 extern Oid *SSAOidStrToOid(char *name, char *error_label); 122 char *error_label); 123 extern int SSAStringCpy(String *string1, String *string2, char *error_label); 128 extern int SSAOidInit(Oid *oid, Subid *subids, int len, char *error_label); 129 extern int SSAOidCpy(Oid *oid1, Oid *oid2, char *error_label); 130 extern Oid *SSAOidDup(Oid *oid, char *error_label); 134 char *error_label); 135 extern int get_my_ip_address(IPAddress *my_ip_address, char *error_label);
|
| H A D | trace.c | 69 int trace_set(int level, char *error_label) in trace_set() argument 71 error_label[0] = '\0'; in trace_set() 75 sprintf(error_label, ERR_MSG_BAD_TRACE_LEVEL, in trace_set() 105 (void)trace_set(0, error_label); in trace_reset() 114 (void)trace_set(trace_level + 1, error_label); in trace_increment() 124 (void)trace_set(trace_level - 1, error_label); in trace_decrement()
|
| H A D | snmp_api.c | 164 …snmp_session_open_default(char *peername, void callback(), void *callback_magic, char *error_label) in snmp_session_open_default() argument 168 callback, callback_magic, error_label); in snmp_session_open_default() 174 …*community, int retries, int32_t timeout, void callback(), void *callback_magic, char *error_label) in snmp_session_open() argument 189 error_label[0] = '\0'; in snmp_session_open() 193 sprintf(error_label, "BUG: snmp_session_open(): peername is NULL"); in snmp_session_open() 199 sprintf(error_label, "BUG: snmp_session_open(): callback is NULL"); in snmp_session_open() 229 if(name_to_ip_address(peername, &ip_address, error_label)) in snmp_session_open() 243 sprintf(error_label, ERR_MSG_ALLOC); in snmp_session_open() 251 sprintf(error_label, ERR_MSG_ALLOC); in snmp_session_open() 260 sprintf(error_label, ERR_MSG_ALLOC); in snmp_session_open() [all …]
|
| H A D | snmp_api.h | 115 …community, int retries, int32_t timeout, void callback(), void *callback_magic, char *error_label); 117 …nmp_session_open_default(char *peername, void callback(), void *callback_magic, char *error_label); 128 int snmp_session_close(SNMP_session *session, char *error_label); 143 int snmp_session_send(SNMP_session *session, int predefined_id, SNMP_pdu *pdu, char *error_label);
|
| /onnv-gate/usr/src/cmd/agents/snmp/agent/ |
| H A D | access.c | 86 Manager* manager_add(char *name, char *error_label) in manager_add() argument 93 error_label[0] = '\0'; in manager_add() 98 (void)sprintf(error_label, "BUG: manager_add(): name is NULL"); in manager_add() 107 if(name_to_ip_address(name, &ip_address, error_label)) in manager_add() 123 (void)sprintf(error_label, ERR_MSG_MANAGER_DUP, name); in manager_add() 142 (void)sprintf(error_label, ERR_MSG_ALLOC); in manager_add() 151 (void)sprintf(error_label, ERR_MSG_ALLOC); in manager_add() 372 int community_add(char *name, int type, char *error_label) in community_add() argument 380 error_label[0] = '\0'; in community_add() 384 (void)sprintf(error_label, "BUG: community_add(): name is NULL"); in community_add() [all …]
|
| H A D | reg_subtree.c | 157 list = snmp_typed_variable_append(list,oid,INTEGER,&value,error_label); in sap_append_integer_variable() 171 list = snmp_typed_variable_append(list,oid,type,&value,error_label); in sap_append_variable() 187 list = snmp_typed_variable_append(list,oid,STRING,&value,error_label); in sap_append_string_variable() 202 list = snmp_typed_variable_append(list,oid,OBJID,&value,error_label); in sap_append_oid_variable() 306 error_label[0] = '\0'; in send_request_to_agent() 308 request = request_create( (community==NULL?"public":community), type, error_label); in send_request_to_agent() 324 request_send_to_port_time_out_blocking(agent_addr, port,timeout, request, error_label); in send_request_to_agent() 338 if (get_my_ip_address(&my_ip_address, error_label)) in send_request_to_relay_agent() 356 if((new = snmp_variable_new(error_label)) == NULL) in create_variable() 358 if(SSAOidCpy(&(new->name),name,error_label)) in create_variable() [all …]
|
| H A D | agent.c | 95 static int agent_get_next(SNMP_pdu *pdu, char *error_label); 97 static int agent_get(SNMP_pdu *pdu, char *error_label); 98 static int agent_set(int pass, SNMP_pdu *pdu, char *error_label); 129 snmpEnableAuthTraps = request_snmpEnableAuthTraps(error_label); in agent_process() 135 NULL, error_label)) in agent_process() 138 error_label); in agent_process() 174 snmpEnableAuthTraps = request_snmpEnableAuthTraps(error_label); in agent_process() 180 NULL, error_label)) in agent_process() 183 error_label); in agent_process() 207 if(agent_get_next(pdu, error_label)) in agent_process() [all …]
|
| /onnv-gate/usr/src/cmd/agents/snmp/snmprelayd/ |
| H A D | session.c | 303 pdu = snmp_pdu_receive(clients_sd, &address, error_label); in session_dispatch() 309 …if (strncmp (error_label, "The message has a wrong version", 31) == 0 && --VersionWarnings >= 0 ) … in session_dispatch() 312 error_label); in session_dispatch() 316 error_label); in session_dispatch() 359 three_phase.cur_pdu = snmp_pdu_dup(pdu, error_label); in session_dispatch() 362 error("snmp_pdu_dup() failed: %s",error_label); in session_dispatch() 373 &(variable->name),error_label) == NULL){ in session_dispatch() 375 error_label); in session_dispatch() 629 request->pdu = snmp_pdu_dup(session->pdu, error_label); in session_build_local_sysUptime() 632 error("snmp_pdu_dup() failed: %s", error_label); in session_build_local_sysUptime() [all …]
|