示例#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();
        }