Exemplo n.º 1
0
        public override Handler Parse()
        {
            var header = new ArpHeader();
            header.HardwareType = LoadUInt16ReversingEndian();
            header.ProtocolType = LoadUInt16ReversingEndian();

            header.HardwareSize = LoadAndScroll<Byte>();
            header.ProtocolSize = LoadAndScroll<Byte>();
            header.Operation = LoadUInt16ReversingEndian();

            header.SourceMacAddress = LoadAndScroll<MacAddress>();
            header.SourceIPAddress = LoadAndScroll<IPAddress>();
            header.DestinationMacAddress = LoadAndScroll<MacAddress>();
            header.DestinationIPAddress = LoadAndScroll<IPAddress>();

            SetValue(ArpHeaderProperty, header);

            return GetNextHandler();
        }
Exemplo n.º 2
0
 public static ArpData Create(string deviceID, ArpHeader arpHeader, SystemModule module)
 {
     return Create(deviceID, arpHeader.SourceIPAddress, arpHeader.SourceMacAddress, module);
 }