snmp_api.c:    for(vp = pdu->variables; vp; vp = vp->next_variable){
snmp_api.c:    if (pdu->command != TRP_REQ_MSG){
snmp_api.c:	    (long *)&pdu->reqid, sizeof(pdu->reqid));
snmp_api.c:		(long *)&pdu->errstat, sizeof(pdu->errstat));
snmp_api.c:		(long *)&pdu->errindex, sizeof(pdu->errindex));
snmp_api.c:	    (oid *)pdu->enterprise, pdu->enterprise_length);
snmp_api.c:		(u_char *)&pdu->agent_addr.sin_addr.s_addr, sizeof(pdu->agent_addr.sin_addr.s_addr));
snmp_api.c:		(long *)&pdu->trap_type, sizeof(pdu->trap_type));
snmp_api.c:		(long *)&pdu->specific_type, sizeof(pdu->specific_type));
snmp_api.c:		(long *)&pdu->time, sizeof(pdu->time));
snmp_api.c:    cp = asn_build_header(buf, &length, (u_char)pdu->command, totallength);
snmp_api.c:    pdu->command = msg_type;
snmp_api.c:    if (pdu->command != TRP_REQ_MSG){
snmp_api.c:	data = asn_parse_int(data, &length, &type, (long *)&pdu->reqid, sizeof(pdu->reqid));
snmp_api.c:	data = asn_parse_int(data, &length, &type, (long *)&pdu->errstat, sizeof(pdu->errstat));
snmp_api.c:	data = asn_parse_int(data, &length, &type, (long *)&pdu->errindex, sizeof(pdu->errindex));
snmp_api.c:	pdu->enterprise_length = MAX_NAME_LEN;
snmp_api.c:	data = asn_parse_objid(data, &length, &type, objid, &pdu->enterprise_length);
snmp_api.c:	pdu->enterprise = (oid *)malloc(pdu->enterprise_length * sizeof(oid));
snmp_api.c:	bcopy((char *)objid, (char *)pdu->enterprise, pdu->enterprise_length * sizeof(oid));
snmp_api.c:	data = asn_parse_string(data, &length, &type, (u_char *)&pdu->agent_addr.sin_addr.s_addr, &four);
snmp_api.c:	data = asn_parse_int(data, &length, &type, (long *)&pdu->trap_type, sizeof(pdu->trap_type));
snmp_api.c:	data = asn_parse_int(data, &length, &type, (long *)&pdu->specific_type, sizeof(pdu->specific_type));
snmp_api.c:	data = asn_parse_int(data, &length, &type, (long *)&pdu->time, sizeof(pdu->time));
snmp_api.c:	if (pdu->variables == NULL){
snmp_api.c:	    pdu->variables = vp = (struct variable_list *)malloc(sizeof(struct variable_list));
snmp_api.c:    if (pdu->command == GET_REQ_MSG || pdu->command == GETNEXT_REQ_MSG
snmp_api.c:	|| pdu->command == GET_RSP_MSG || pdu->command == SET_REQ_MSG){
snmp_api.c:	if (pdu->reqid == SNMP_DEFAULT_REQID)
snmp_api.c:	    pdu->reqid = ++Reqid;
snmp_api.c:	if (pdu->errstat == SNMP_DEFAULT_ERRSTAT)
snmp_api.c:	    pdu->errstat = 0;
snmp_api.c:	if (pdu->errindex == SNMP_DEFAULT_ERRINDEX)
snmp_api.c:	    pdu->errindex = 0;
snmp_api.c:	pdu->reqid = 1;	/* give a bogus non-error reqid for traps */
snmp_api.c:	if (pdu->enterprise_length == SNMP_DEFAULT_ENTERPRISE_LENGTH){
snmp_api.c:	    pdu->enterprise = (oid *)malloc(sizeof(DEFAULT_ENTERPRISE));
snmp_api.c:	    bcopy((char *)DEFAULT_ENTERPRISE, (char *)pdu->enterprise, sizeof(DEFAULT_ENTERPRISE));
snmp_api.c:	    pdu->enterprise_length = sizeof(DEFAULT_ENTERPRISE)/sizeof(oid);
snmp_api.c:	if (pdu->time == SNMP_DEFAULT_TIME)
snmp_api.c:	    pdu->time = DEFAULT_TIME;
snmp_api.c:    if (pdu->address.sin_addr.s_addr == SNMP_DEFAULT_ADDRESS){
snmp_api.c:	    bcopy((char *)&isp->addr, (char *)&pdu->address, sizeof(pdu->address));
snmp_api.c:    if (sendto(isp->sd, (char *)packet, length, 0, (struct sockaddr *)&pdu->address, sizeof(pdu->address)) < 0){
snmp_api.c:    if (pdu->command == GET_REQ_MSG || pdu->command == GETNEXT_REQ_MSG || pdu->command == SET_REQ_MSG){
snmp_api.c:	rp->request_id = pdu->reqid;
snmp_api.c:    return pdu->reqid;
snmp_api.c:    vp = pdu->variables;
snmp_api.c:    if (pdu->enterprise)
snmp_api.c:	free((char *)pdu->enterprise);
snmp_api.c:	    pdu->address = from;
snmp_api.c:	    pdu->reqid = 0;
snmp_api.c:	    pdu->variables = NULL;
snmp_api.c:	    pdu->enterprise = NULL;
snmp_api.c:	    pdu->enterprise_length = 0;
snmp_api.c:	    if (pdu->command == GET_RSP_MSG){
snmp_api.c:		    if (rp->request_id == pdu->reqid){
snmp_api.c:			if (sp->callback(RECEIVED_MESSAGE, sp, pdu->reqid, pdu, sp->callback_magic) == 1){
snmp_api.c:	    } else if (pdu->command == GET_REQ_MSG || pdu->command == GETNEXT_REQ_MSG
snmp_api.c:		    || pdu->command == TRP_REQ_MSG || pdu->command == SET_REQ_MSG){
snmp_api.c:		sp->callback(RECEIVED_MESSAGE, sp, pdu->reqid, pdu, sp->callback_magic);
snmp_api.c:		    sp->callback(TIMED_OUT, sp, rp->pdu->reqid, rp->pdu, sp->callback_magic);
snmp_api.c:		    if (sendto(isp->sd, (char *)packet, length, 0, (struct sockaddr *)&rp->pdu->address, sizeof(rp->pdu->address)) < 0){
snmp_client.c:    pdu->command = command;
snmp_client.c:    pdu->errstat = SNMP_DEFAULT_ERRSTAT;
snmp_client.c:    pdu->errindex = SNMP_DEFAULT_ERRINDEX;
snmp_client.c:    pdu->address.sin_addr.s_addr = SNMP_DEFAULT_ADDRESS;
snmp_client.c:    pdu->enterprise = NULL;
snmp_client.c:    pdu->enterprise_length = 0;
snmp_client.c:    pdu->variables = NULL;
snmp_client.c:    if (pdu->variables == NULL){
snmp_client.c:	pdu->variables = vars = (struct variable_list *)malloc(sizeof(struct variable_list));
snmp_client.c:	for(vars = pdu->variables; vars->next_variable; vars = vars->next_variable)
snmp_client.c:    if (op == RECEIVED_MESSAGE && pdu->command == GET_RSP_MSG){
snmp_client.c:	newpdu->variables = 0;
snmp_client.c:	var = pdu->variables;
snmp_client.c:	    newpdu->variables = newvar = (struct variable_list *)malloc(sizeof(struct variable_list));
snmp_client.c:    if (pdu->command != GET_RSP_MSG || pdu->errstat == SNMP_ERR_NOERROR || pdu->errindex <= 0)
snmp_client.c:    newpdu->variables = 0;
snmp_client.c:    newpdu->command = command;
snmp_client.c:    newpdu->reqid = SNMP_DEFAULT_REQID;
snmp_client.c:    newpdu->errstat = SNMP_DEFAULT_ERRSTAT;
snmp_client.c:    newpdu->errindex = SNMP_DEFAULT_ERRINDEX;
snmp_client.c:    var = pdu->variables;
snmp_client.c:    if (pdu->errindex == index){	/* skip first variable */
snmp_client.c:	newpdu->variables = newvar = (struct variable_list *)malloc(sizeof(struct variable_list));
snmp_client.c:	    if (++index == pdu->errindex)
snmp_client.c:    if (index < pdu->errindex || copied == 0){
