Lines Matching defs:ofs

74                                    struct pbuf *p, u16_t ofs);
136 u16_t ofs;
141 ofs = snmp_resp_header_enc(m_stat, p);
143 snmp_varbind_list_enc(&emptyvb, p, ofs);
145 snmp_varbind_list_enc(&m_stat->outvb, p, ofs);
243 u16_t ofs;
246 ofs = snmp_trap_header_enc(&trap_msg, p);
247 snmp_varbind_list_enc(&trap_msg.outvb, p, ofs);
463 u16_t ofs;
465 ofs = 0;
466 snmp_asn1_enc_type(p, ofs,
468 ofs += 1;
469 snmp_asn1_enc_length(p, ofs, m_stat->rhl.seqlen);
470 ofs += m_stat->rhl.seqlenlen;
472 snmp_asn1_enc_type(p, ofs,
474 ofs += 1;
475 snmp_asn1_enc_length(p, ofs, m_stat->rhl.verlen);
476 ofs += m_stat->rhl.verlenlen;
477 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.verlen, snmp_version);
478 ofs += m_stat->rhl.verlen;
480 snmp_asn1_enc_type(p, ofs,
482 ofs += 1;
483 snmp_asn1_enc_length(p, ofs, m_stat->rhl.comlen);
484 ofs += m_stat->rhl.comlenlen;
485 snmp_asn1_enc_raw(p, ofs, m_stat->rhl.comlen, m_stat->community);
486 ofs += m_stat->rhl.comlen;
488 snmp_asn1_enc_type(p, ofs,
491 ofs += 1;
492 snmp_asn1_enc_length(p, ofs, m_stat->rhl.pdulen);
493 ofs += m_stat->rhl.pdulenlen;
495 snmp_asn1_enc_type(p, ofs,
497 ofs += 1;
498 snmp_asn1_enc_length(p, ofs, m_stat->rhl.ridlen);
499 ofs += m_stat->rhl.ridlenlen;
500 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.ridlen, m_stat->rid);
501 ofs += m_stat->rhl.ridlen;
503 snmp_asn1_enc_type(p, ofs,
505 ofs += 1;
506 snmp_asn1_enc_length(p, ofs, m_stat->rhl.errstatlen);
507 ofs += m_stat->rhl.errstatlenlen;
508 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.errstatlen, m_stat->error_status);
509 ofs += m_stat->rhl.errstatlen;
511 snmp_asn1_enc_type(p, ofs,
513 ofs += 1;
514 snmp_asn1_enc_length(p, ofs, m_stat->rhl.erridxlen);
515 ofs += m_stat->rhl.erridxlenlen;
516 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.erridxlen, m_stat->error_index);
517 ofs += m_stat->rhl.erridxlen;
519 return ofs;
527 u16_t ofs;
529 ofs = 0;
530 snmp_asn1_enc_type(p, ofs,
532 ofs += 1;
533 snmp_asn1_enc_length(p, ofs, m_trap->thl.seqlen);
534 ofs += m_trap->thl.seqlenlen;
536 snmp_asn1_enc_type(p, ofs,
538 ofs += 1;
539 snmp_asn1_enc_length(p, ofs, m_trap->thl.verlen);
540 ofs += m_trap->thl.verlenlen;
541 snmp_asn1_enc_s32t(p, ofs, m_trap->thl.verlen, snmp_version);
542 ofs += m_trap->thl.verlen;
544 snmp_asn1_enc_type(p, ofs,
546 ofs += 1;
547 snmp_asn1_enc_length(p, ofs, m_trap->thl.comlen);
548 ofs += m_trap->thl.comlenlen;
549 snmp_asn1_enc_raw(p, ofs, m_trap->thl.comlen,
551 ofs += m_trap->thl.comlen;
553 snmp_asn1_enc_type(p, ofs,
556 ofs += 1;
557 snmp_asn1_enc_length(p, ofs, m_trap->thl.pdulen);
558 ofs += m_trap->thl.pdulenlen;
560 snmp_asn1_enc_type(p, ofs,
562 ofs += 1;
563 snmp_asn1_enc_length(p, ofs, m_trap->thl.eidlen);
564 ofs += m_trap->thl.eidlenlen;
565 snmp_asn1_enc_oid(p, ofs, m_trap->enterprise->len,
567 ofs += m_trap->thl.eidlen;
569 snmp_asn1_enc_type(p, ofs,
572 ofs += 1;
573 snmp_asn1_enc_length(p, ofs, m_trap->thl.aaddrlen);
574 ofs += m_trap->thl.aaddrlenlen;
575 snmp_asn1_enc_raw(p, ofs, m_trap->thl.aaddrlen, &m_trap->sip_raw[0]);
576 ofs += m_trap->thl.aaddrlen;
578 snmp_asn1_enc_type(p, ofs,
580 ofs += 1;
581 snmp_asn1_enc_length(p, ofs, m_trap->thl.gtrplen);
582 ofs += m_trap->thl.gtrplenlen;
583 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.gtrplen, m_trap->gen_trap);
584 ofs += m_trap->thl.gtrplen;
586 snmp_asn1_enc_type(p, ofs,
588 ofs += 1;
589 snmp_asn1_enc_length(p, ofs, m_trap->thl.strplen);
590 ofs += m_trap->thl.strplenlen;
591 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.strplen, m_trap->spc_trap);
592 ofs += m_trap->thl.strplen;
594 snmp_asn1_enc_type(p, ofs,
597 ofs += 1;
598 snmp_asn1_enc_length(p, ofs, m_trap->thl.tslen);
599 ofs += m_trap->thl.tslenlen;
600 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.tslen, m_trap->ts);
601 ofs += m_trap->thl.tslen;
603 return ofs;
610 snmp_varbind_list_enc(struct snmp_varbind_root *root, struct pbuf *p, u16_t ofs)
617 snmp_asn1_enc_type(p, ofs,
619 ofs += 1;
620 snmp_asn1_enc_length(p, ofs, root->seqlen);
621 ofs += root->seqlenlen;
625 snmp_asn1_enc_type(p, ofs,
627 ofs += 1;
628 snmp_asn1_enc_length(p, ofs, vb->seqlen);
629 ofs += vb->seqlenlen;
631 snmp_asn1_enc_type(p, ofs,
634 ofs += 1;
635 snmp_asn1_enc_length(p, ofs, vb->olen);
636 ofs += vb->olenlen;
637 snmp_asn1_enc_oid(p, ofs, vb->ident_len, &vb->ident[0]);
638 ofs += vb->olen;
640 snmp_asn1_enc_type(p, ofs, vb->value_type);
641 ofs += 1;
642 snmp_asn1_enc_length(p, ofs, vb->vlen);
643 ofs += vb->vlenlen;
648 snmp_asn1_enc_s32t(p, ofs, vb->vlen, *sint_ptr);
654 snmp_asn1_enc_u32t(p, ofs, vb->vlen, *uint_ptr);
660 snmp_asn1_enc_raw(p, ofs, vb->vlen, raw_ptr);
666 snmp_asn1_enc_oid(p, ofs, vb->value_len / sizeof(s32_t),
673 ofs += vb->vlen;
676 return ofs;