Esempio n. 1
0
            private void _parse()
            {
                _hdr = new AsnHdr(m_io, this, m_root);
                switch (Hdr.Tag)
                {
                case Snmp.AsnTypeTag.Set: {
                    __raw_body = m_io.ReadBytes(Hdr.Len.Value);
                    var io___raw_body = new KaitaiStream(__raw_body);
                    _body = new BodySequence(io___raw_body, this, m_root);
                    break;
                }

                case Snmp.AsnTypeTag.OctetString: {
                    __raw_body = m_io.ReadBytes(Hdr.Len.Value);
                    var io___raw_body = new KaitaiStream(__raw_body);
                    _body = new BodyPrintableString(io___raw_body, this, m_root);
                    break;
                }

                case Snmp.AsnTypeTag.Utf8string: {
                    __raw_body = m_io.ReadBytes(Hdr.Len.Value);
                    var io___raw_body = new KaitaiStream(__raw_body);
                    _body = new BodyUtf8string(io___raw_body, this, m_root);
                    break;
                }

                case Snmp.AsnTypeTag.Sequence30: {
                    __raw_body = m_io.ReadBytes(Hdr.Len.Value);
                    var io___raw_body = new KaitaiStream(__raw_body);
                    _body = new BodySequence(io___raw_body, this, m_root);
                    break;
                }

                case Snmp.AsnTypeTag.Integer: {
                    __raw_body = m_io.ReadBytes(Hdr.Len.Value);
                    var io___raw_body = new KaitaiStream(__raw_body);
                    _body = new BodyInteger(io___raw_body, this, m_root);
                    break;
                }

                case Snmp.AsnTypeTag.Sequence10: {
                    __raw_body = m_io.ReadBytes(Hdr.Len.Value);
                    var io___raw_body = new KaitaiStream(__raw_body);
                    _body = new BodySequence(io___raw_body, this, m_root);
                    break;
                }

                case Snmp.AsnTypeTag.PrintableString: {
                    __raw_body = m_io.ReadBytes(Hdr.Len.Value);
                    var io___raw_body = new KaitaiStream(__raw_body);
                    _body = new BodyPrintableString(io___raw_body, this, m_root);
                    break;
                }

                default: {
                    _body = m_io.ReadBytes(Hdr.Len.Value);
                    break;
                }
                }
            }
Esempio n. 2
0
            private void _read()
            {
                _b1      = m_io.ReadU1();
                __raw_b2 = m_io.ReadBytes((B1 < 128 ? 0 : (B1 & 127)));
                var io___raw_b2 = new KaitaiStream(__raw_b2);

                _b2 = new BodyInteger(io___raw_b2, this, m_root);
            }
Esempio n. 3
0
            private void _read()
            {
                _hdr      = new AsnHdr(m_io, this, m_root);
                __raw_val = m_io.ReadBytes(Hdr.Len.Value);
                var io___raw_val = new KaitaiStream(__raw_val);

                _val = new BodyInteger(io___raw_val, this, m_root);
            }