Пример #1
0
        public L2_VLan(PacketSpan <VLanHeader> tagVlanSpan, EthernetProtocolId tpid)
        {
            this.TagVlan = default;

            this.Type    = tpid;
            this.Generic = tagVlanSpan.ToGenericSpan();
        }
Пример #2
0
        public L2(PacketSpan <EthernetHeader> etherSpan)
        {
            this.Ethernet = default;

            this.Type    = PacketL2Type.Ethernet;
            this.Generic = etherSpan.ToGenericSpan();
        }
Пример #3
0
        public L3(PacketSpan <PPPoESessionHeader> pppoeSpan)
        {
            this.IPv4  = default;
            this.PPPoE = default;

            this.Type    = EthernetProtocolId.PPPoE_Session;
            this.Generic = pppoeSpan.ToGenericSpan();
        }
Пример #4
0
        public L4(PacketSpan <UDPHeader> udpSpan)
        {
            this.TCP = default;
            this.UDP = default;

            this.Type    = IPProtocolNumber.UDP;
            this.Generic = udpSpan.ToGenericSpan();
        }
Пример #5
0
        public L3(PacketSpan <IPv4Header> ipv4Span)
        {
            this.IPv4  = default;
            this.PPPoE = default;

            this.Type    = EthernetProtocolId.IPv4;
            this.Generic = ipv4Span.ToGenericSpan();
        }