| Package | Description |
|---|---|
| org.dhcp4java |
This package provides classes for manipulating DHCP Packets: creating, parsing and sending.
|
| Modifier and Type | Method and Description |
|---|---|
DHCPOption |
DHCPOption.applyOption(DHCPPacket request)
Get the option value based on the context, i.e. the client's request.
|
DHCPOption |
DHCPPacket.getOption(byte code)
Returns the option as DHCPOption object.
|
DHCPOption[] |
DHCPPacket.getOptionsArray()
Return an array of all DHCP options.
|
static DHCPOption |
DHCPOption.newOptionAsByte(byte code,
byte val)
Creates a DHCP Option as Byte format.
|
static DHCPOption |
DHCPOption.newOptionAsInetAddress(byte code,
InetAddress val)
Sets a DHCP Option as InetAddress format.
|
static DHCPOption |
DHCPOption.newOptionAsInetAddresses(byte code,
InetAddress[] val)
Creates a DHCP Option as InetAddress array format.
|
static DHCPOption |
DHCPOption.newOptionAsInt(byte code,
int val)
Creates a DHCP Option as Integer format.
|
static DHCPOption |
DHCPOption.newOptionAsShort(byte code,
short val)
Creates a DHCP Option as Short format.
|
static DHCPOption |
DHCPOption.newOptionAsShorts(byte code,
short[] arr)
Creates a DHCP Options as Short[] format.
|
static DHCPOption |
DHCPOption.newOptionAsString(byte code,
String val)
Creates a DHCP Option as String format.
|
static DHCPOption |
DHCPOption.parseNewOption(byte code,
Class<?> format,
String sValue)
Parse an option from a pure string representation.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<DHCPOption> |
DHCPPacket.getOptionsCollection()
Return an ordered list/collection of all options.
|
| Modifier and Type | Method and Description |
|---|---|
static DHCPPacket |
DHCPResponseFactory.makeDHCPAck(DHCPPacket request,
InetAddress offeredAddress,
int leaseTime,
InetAddress serverIdentifier,
String message,
DHCPOption[] options)
Create a populated DHCPACK response.
|
static DHCPPacket |
DHCPResponseFactory.makeDHCPOffer(DHCPPacket request,
InetAddress offeredAddress,
int leaseTime,
InetAddress serverIdentifier,
String message,
DHCPOption[] options)
Create a populated DHCPOFFER response.
|
void |
DHCPPacket.setOption(DHCPOption opt)
Sets the option specified for the option.
|
void |
DHCPPacket.setOptions(DHCPOption[] opts)
Sets an array of options.
|
| Modifier and Type | Method and Description |
|---|---|
void |
DHCPPacket.setOptions(Collection<DHCPOption> opts)
Sets a Collection of options.
|
Copyright © 2018 Philip Helger. All rights reserved.