示例#1
0
 internal DhcpPacket(
     uint transactionId,
     DhcpOperation operation,
     ClientHardwareAddress clientHardwareAddress,
     uint hops,
     ushort secs,
     bool isBroadcast,
     IPAddress clientIp,
     IPAddress yourIp,
     IPAddress serverIp,
     IPAddress gatewayIp,
     string serverName,
     string bootFile,
     IReadOnlyList <IDhcpOption> options)
 {
     _options              = options;
     Secs                  = secs;
     IsBroadcast           = isBroadcast;
     ClientIp              = clientIp;
     YourIp                = yourIp;
     ServerIp              = serverIp;
     GatewayIp             = gatewayIp;
     ServerName            = serverName;
     BootFile              = bootFile;
     TransactionId         = transactionId;
     Operation             = operation;
     ClientHardwareAddress = clientHardwareAddress;
     Hops                  = hops;
 }
示例#2
0
        public DhcpPacketBuilder WithClientHardwareAddress(ClientHardwareAddressType addressType, byte[] addressBytes)
        {
            _clientHardwareAddress = new ClientHardwareAddress(addressType, addressBytes);

            return(this);
        }