Exemplo n.º 1
0
        public DhcpTestPacket(
            string hexBytes,
            uint transactionId,
            DhcpOperation operation,
            ClientHardwareAddressType clientHardwareAddressType,
            byte[] clientHardwareAddressBytes,
            uint hops,
            uint secs,
            bool isBroadcast,
            IPAddress clientIp,
            IPAddress yourIp,
            IPAddress serverIp,
            IPAddress gatewayIp,
            string serverName,
            string bootFile,
            IReadOnlyList <IDhcpOption> options)
        {
            Bytes = hexBytes.AsHexBytes();

            TransactionId              = transactionId;
            Operation                  = operation;
            ClientHardwareAddressType  = clientHardwareAddressType;
            ClientHardwareAddressBytes = clientHardwareAddressBytes;
            Hops        = hops;
            Secs        = secs;
            IsBroadcast = isBroadcast;
            ClientIp    = clientIp;
            YourIp      = yourIp;
            ServerIp    = serverIp;
            GatewayIp   = gatewayIp;
            ServerName  = serverName;
            BootFile    = bootFile;
            Options     = options;
        }
Exemplo n.º 2
0
        public DhcpPacketBuilder WithClientHardwareAddress(ClientHardwareAddressType addressType, byte[] addressBytes)
        {
            _clientHardwareAddress = new ClientHardwareAddress(addressType, addressBytes);

            return(this);
        }
Exemplo n.º 3
0
 public ClientHardwareAddress(ClientHardwareAddressType type, byte[] addressBytes)
 {
     Type         = type;
     AddressBytes = addressBytes;
 }