public class DhcpOption extends Object
Modifier and Type | Class and Description |
---|---|
static class |
DhcpOption.Code
Option codes (used in messages types, request params, ...).
|
static class |
DhcpOption.MessageType
Message types.
|
Modifier and Type | Field and Description |
---|---|
static DhcpOption |
END_OPTION
Singleton of the
DhcpOption.Code.END . |
static DhcpOption |
PAD_OPTION
Singleton of the
DhcpOption.Code.PAD . |
Constructor and Description |
---|
DhcpOption(DhcpOption.Code code)
Constructor for a no-payload option.
|
DhcpOption(DhcpOption.Code code,
byte[] bytes)
Constructor for a byte array (opaque) option.
|
DhcpOption(DhcpOption.Code code,
DhcpOption.Code[] codes)
Constructor for an option holding a list of
DhcpOption.Code values. |
DhcpOption(DhcpOption.Code code,
IpAddress ipAddr)
Constructor for a IP address option.
|
DhcpOption(DhcpOption.Code code,
IpAddress[] ipAddrs)
Constructor for an option holding a list of IP addresses.
|
DhcpOption(DhcpOption.Code code,
long number)
Constructor for a scalar (number) option.
|
DhcpOption(DhcpOption.Code code,
MacAddress macAddr)
Constructor for an option holding a MAC address.
|
DhcpOption(DhcpOption.Code code,
String name)
Constructor for a string option.
|
DhcpOption(DhcpOption.MessageType msgType)
Constructor for the message type option.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
bytes()
Returns a copy of the byte array or null.
|
DhcpOption.Code |
code()
Returns the option code.
|
DhcpOption.Code[] |
codes()
Returns a copy of the list of codes or null.
|
IpAddress |
ipAddr()
Returns the IP address for this option or null.
|
IpAddress[] |
ipAddrs()
Returns a copy of the list of IP addresses or null.
|
MacAddress |
macAddr()
Returns the MAC address or null.
|
String |
name()
Returns the string value or null.
|
long |
number()
Returns the number (scalar) value.
|
String |
toString() |
public static final DhcpOption END_OPTION
DhcpOption.Code.END
.public static final DhcpOption PAD_OPTION
DhcpOption.Code.PAD
.public DhcpOption(DhcpOption.Code code)
code
- option codepublic DhcpOption(DhcpOption.MessageType msgType)
msgType
- message typepublic DhcpOption(DhcpOption.Code code, byte[] bytes)
code
- option codebytes
- payload byte arraypublic DhcpOption(DhcpOption.Code code, String name)
code
- option codename
- string valuepublic DhcpOption(DhcpOption.Code code, IpAddress ipAddr)
code
- option codeipAddr
- IP addresspublic DhcpOption(DhcpOption.Code code, IpAddress[] ipAddrs)
code
- option codeipAddrs
- array of IP addressespublic DhcpOption(DhcpOption.Code code, MacAddress macAddr)
code
- option codemacAddr
- MAC addresspublic DhcpOption(DhcpOption.Code code, DhcpOption.Code[] codes)
DhcpOption.Code
values.code
- option codecodes
- array of codespublic DhcpOption(DhcpOption.Code code, long number)
code
- option codenumber
- scalar valuepublic DhcpOption.Code code()
public byte[] bytes()
public MacAddress macAddr()
public long number()
public String name()
public DhcpOption.Code[] codes()
public IpAddress[] ipAddrs()
public IpAddress ipAddr()
Copyright © 2016. All Rights Reserved.