65 msg_ptr += ofs - base;
98 msg_ptr += ofs - base;
107 else if (*msg_ptr == 0x80)
154 else if (*msg_ptr == 0x81)
174 else if (*msg_ptr == 0x82)
205 *length = (*msg_ptr) << 8;
215 *octets_used = 1 + ((*msg_ptr) & 0x7f);
253 msg_ptr += ofs - base;
254 if ((len > 0) && (len < 6))
266 if ((len > 1) && (*msg_ptr == 0))
337 #if BYTE_ORDER == LITTLE_ENDIAN
340 #if BYTE_ORDER == BIG_ENDIAN
353 msg_ptr += ofs - base;
354 if ((len > 0) && (len < 5))
374 *lsb_ptr &= *msg_ptr;
380 *lsb_ptr |= *msg_ptr;
400 *lsb_ptr &= *msg_ptr;
404 *lsb_ptr |= *msg_ptr;
429 snmp_asn1_dec_oid(
struct pbuf *p,
u16_t ofs,
u16_t len,
struct snmp_obj_id *oid)
443 msg_ptr += ofs - base;
446 oid_ptr = &oid->id[0];
450 if (*msg_ptr == 0x2B)
458 else if (*msg_ptr < 40)
465 else if (*msg_ptr < 80)
469 *oid_ptr = (*msg_ptr) - 40;
476 *oid_ptr = (*msg_ptr) - 80;
505 while ((len > 0) && (oid->len < LWIP_SNMP_OBJ_ID_LEN))
512 while ((*msg_ptr & 0x80) && (len > 1))
515 sub_id = (sub_id << 7) + (*msg_ptr & ~0x80);
531 if (!(*msg_ptr & 0x80) && (len > 0))
535 sub_id = (sub_id << 7) + *msg_ptr;
611 msg_ptr += ofs - base;