Lines Matching refs:reply_pdu
187 snmp_pdu_t *reply_pdu;
192 reply_pdu = (snmp_pdu_t *)calloc(1, sizeof (snmp_pdu_t));
193 if (reply_pdu == NULL)
203 snmp_free_pdu(reply_pdu);
210 if ((p = asn_parse_int(p, &msgsz, &reply_pdu->version)) == NULL) {
211 snmp_free_pdu(reply_pdu);
214 if ((reply_pdu->version != SNMP_VERSION_1) &&
215 (reply_pdu->version != SNMP_VERSION_2c)) {
216 snmp_free_pdu(reply_pdu);
223 p = asn_parse_string(p, &msgsz, &reply_pdu->community,
224 &reply_pdu->community_len);
226 snmp_free_pdu(reply_pdu);
233 if ((p = snmp_parse_pdu(reqid, p, &msgsz, reply_pdu)) == NULL) {
234 snmp_free_pdu(reply_pdu);
238 return (reply_pdu);
548 * Parse the PDU portion of the incoming snmp message into the reply_pdu.
553 snmp_parse_pdu(int reqid, uchar_t *msg, size_t *msgsz_p, snmp_pdu_t *reply_pdu)
566 reply_pdu->command = (int)id;
572 if ((p = asn_parse_int(p, msgsz_p, &reply_pdu->reqid)) == NULL)
574 if (reply_pdu->reqid != reqid)
580 if ((p = asn_parse_int(p, msgsz_p, &reply_pdu->errstat)) == NULL)
582 if ((p = asn_parse_int(p, msgsz_p, &reply_pdu->errindex)) == NULL)
597 reply_pdu->vars = newvp;