Constructor and Description |
---|
Dhcp.Builder()
Create a new builder using the defaults:
|
Dhcp.Builder(Dhcp dhcp)
Copy constructor builder initialized from the passed in protocol.
|
Modifier and Type | Method and Description |
---|---|
Dhcp.Builder |
bootFileName(String bootFileName)
Sets the boot file name.
|
Dhcp |
build()
Creates a new protocol instance from this builder.
|
Dhcp.Builder |
clientAddr(IpAddress clientAddr)
Sets the client IP address.
|
Dhcp.Builder |
clientHwAddr(MacAddress clientHwAddr)
Sets the client layer-2 hardware address.
|
Dhcp.Builder |
flag(Dhcp.Flag flag)
Sets the
Dhcp.Flag.BROADCAST or Dhcp.Flag.UNICAST (default)
type. |
Dhcp.Builder |
gatewayAddr(IpAddress gatewayAddr)
Sets the gateway IP address.
|
Dhcp.Builder |
hopCount(int hopCount)
Sets the hop count.
|
Dhcp.Builder |
hwType(HardwareType hwType)
Sets the hardware type.
|
Dhcp.Builder |
numSecs(int numSecs)
Sets the number of seconds elapsed since a client began an attempt
to acquire or renew a lease.
|
Dhcp.Builder |
opCode(Dhcp.OpCode opCode)
Sets the operation code.
|
Dhcp.Builder |
options(DhcpOption[] options)
Sets the options array.
|
Dhcp.Builder |
serverAddr(IpAddress serverAddr)
Sets the server IP address.
|
Dhcp.Builder |
serverHostName(String serverHostName)
Sets the server host name (nickname).
|
Dhcp.Builder |
transId(long transId)
Sets the transaction ID which is a 32-bit identification field
generated by the client to allow it to match up requests with
replies.
|
Dhcp.Builder |
yourAddr(IpAddress yourAddr)
Sets the "Your" IP address which is the IP address that the server
is assigning to the client.
|
public Dhcp.Builder()
opCode = BOOT_REQ hwType = ETHERNET flag = UNICAST serverHostName = EMPTY bootFileName = EMPTY options = NO_OPTIONS
public Dhcp.Builder(Dhcp dhcp)
dhcp
- builder is initialed from this protocol's datapublic Dhcp build()
public Dhcp.Builder opCode(Dhcp.OpCode opCode)
opCode
- operation code enumerationpublic Dhcp.Builder hwType(HardwareType hwType)
hwType
- hardware type enumerationpublic Dhcp.Builder hopCount(int hopCount)
hopCount
- hop countpublic Dhcp.Builder transId(long transId)
transId
- transaction IDpublic Dhcp.Builder numSecs(int numSecs)
numSecs
- number of secondspublic Dhcp.Builder flag(Dhcp.Flag flag)
Dhcp.Flag.BROADCAST
or Dhcp.Flag.UNICAST
(default)
type.flag
- broadcast or unicastpublic Dhcp.Builder clientAddr(IpAddress clientAddr)
clientAddr
- client IP addresspublic Dhcp.Builder yourAddr(IpAddress yourAddr)
yourAddr
- "Your" IP addresspublic Dhcp.Builder serverAddr(IpAddress serverAddr)
serverAddr
- server IP addresspublic Dhcp.Builder gatewayAddr(IpAddress gatewayAddr)
gatewayAddr
- gateway IP addresspublic Dhcp.Builder clientHwAddr(MacAddress clientHwAddr)
clientHwAddr
- client hardware addresspublic Dhcp.Builder serverHostName(String serverHostName)
serverHostName
- server host namepublic Dhcp.Builder bootFileName(String bootFileName)
bootFileName
- boot file namepublic Dhcp.Builder options(DhcpOption[] options)
options
- array of optionsCopyright © 2015. All Rights Reserved.