Esempio n. 1
0
 internal static void WriteHeader(byte[] buffer, int offset, ArpHardwareType hardwareType, EthernetType protocolType, ArpOperation operation, IList <byte> senderHardwareAddress, IList <byte> senderProtocolAddress, IList <byte> targetHardwareAddress, IList <byte> targetProtocolAddress)
 {
     ByteArrayExtensions.Write(buffer, ref offset, (ushort)hardwareType, Endianity.Big);
     ByteArrayExtensions.Write(buffer, ref offset, (ushort)protocolType, Endianity.Big);
     ByteArrayExtensions.Write(buffer, ref offset, (byte)senderHardwareAddress.Count);
     ByteArrayExtensions.Write(buffer, ref offset, (byte)senderProtocolAddress.Count);
     ByteArrayExtensions.Write(buffer, ref offset, (ushort)operation, Endianity.Big);
     ByteArrayExtensions.Write(buffer, ref offset, (IEnumerable <byte>)senderHardwareAddress);
     ByteArrayExtensions.Write(buffer, ref offset, (IEnumerable <byte>)senderProtocolAddress);
     ByteArrayExtensions.Write(buffer, ref offset, (IEnumerable <byte>)targetHardwareAddress);
     ByteArrayExtensions.Write(buffer, ref offset, (IEnumerable <byte>)targetProtocolAddress);
 }
Esempio n. 2
0
 internal static void WriteHeader(byte[] buffer, int offset,
                                  ArpHardwareType hardwareType, EthernetType protocolType, ArpOperation operation,
                                  IList <byte> senderHardwareAddress, IList <byte> senderProtocolAddress,
                                  IList <byte> targetHardwareAddress, IList <byte> targetProtocolAddress)
 {
     buffer.Write(ref offset, (ushort)hardwareType, Endianity.Big);
     buffer.Write(ref offset, (ushort)protocolType, Endianity.Big);
     buffer.Write(ref offset, (byte)senderHardwareAddress.Count);
     buffer.Write(ref offset, (byte)senderProtocolAddress.Count);
     buffer.Write(ref offset, (ushort)operation, Endianity.Big);
     buffer.Write(ref offset, senderHardwareAddress);
     buffer.Write(ref offset, senderProtocolAddress);
     buffer.Write(ref offset, targetHardwareAddress);
     buffer.Write(ref offset, targetProtocolAddress);
 }
Esempio n. 3
0
 internal static void WriteHeader(byte[] buffer, int offset,
                                  ArpHardwareType hardwareType, EthernetType protocolType, ArpOperation operation,
                                  IList<byte> senderHardwareAddress, IList<byte> senderProtocolAddress,
                                  IList<byte> targetHardwareAddress, IList<byte> targetProtocolAddress)
 {
     buffer.Write(ref offset, (ushort)hardwareType, Endianity.Big);
     buffer.Write(ref offset, (ushort)protocolType, Endianity.Big);
     buffer.Write(ref offset, (byte)senderHardwareAddress.Count);
     buffer.Write(ref offset, (byte)senderProtocolAddress.Count);
     buffer.Write(ref offset, (ushort)operation, Endianity.Big);
     buffer.Write(ref offset, senderHardwareAddress);
     buffer.Write(ref offset, senderProtocolAddress);
     buffer.Write(ref offset, targetHardwareAddress);
     buffer.Write(ref offset, targetProtocolAddress);
 }