Class DHCP
- java.lang.Object
-
- org.opendaylight.openflowplugin.libraries.liblldp.Packet
-
- org.opendaylight.netvirt.dhcpservice.api.DHCP
-
public class DHCP extends org.opendaylight.openflowplugin.libraries.liblldp.Packet
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsOption(byte code)
org.opendaylight.openflowplugin.libraries.liblldp.Packet
deserialize(byte[] data, int bitOffset, int size)
This method deserializes the data bits obtained from the wire into the respective header and payload which are of type Packet.byte[]
getChaddr()
byte[]
getCiaddr()
int
getfieldnumBits(java.lang.String fieldName)
short
getFlags()
byte[]
getGiaddr()
int
getHeaderSize()
byte
getHlen()
byte
getHtype()
byte
getMsgType()
byte[]
getOptionBytes(byte code)
java.net.InetAddress
getOptionInetAddr(byte code)
byte[]
getOptions()
int
getXid()
protected void
postDeserializeCustomOperation(byte[] data, int startBitOffset)
byte[]
serialize()
DHCP
setChaddr(byte[] chaddr)
DHCP
setCiaddr(byte[] ciaddr)
DHCP
setCiaddr(int dhcpCiaddr)
DHCP
setFile(byte[] file)
DHCP
setFlags(short dhcpFlags)
DHCP
setGiaddr(byte[] giaddr)
DHCP
setGiaddr(int dhcpGiaddr)
void
setHeaderField(java.lang.String headerField, byte[] readValue)
DHCP
setHlen(byte dhcpHlen)
DHCP
setHops(byte dhcpHops)
DHCP
setHtype(byte dhcpHtype)
DHCP
setMcookie(int dhcpMc)
void
setMsgType(byte type)
DHCP
setOp(byte dhcpOp)
void
setOptionBytes(byte code, byte[] opt)
void
setOptionInetAddr(byte code, java.lang.String addr)
void
setOptionInt(byte code, int opt)
DHCP
setOptions(byte[] options)
void
setOptionStrAddrs(byte code, java.util.List<java.lang.String> opt)
void
setOptionString(byte code, java.lang.String str)
DHCP
setSecs(short dhcpSecs)
DHCP
setSiaddr(int dhcpSiaddr)
DHCP
setSiaddr(java.lang.String dhcpSiaddr)
DHCP
setSname(byte[] sname)
DHCP
setXid(int dhcpXid)
DHCP
setYiaddr(int dhcpYiaddr)
DHCP
setYiaddr(java.lang.String dhcpYiaddr)
java.lang.String
toString()
void
unsetOption(byte code)
-
-
-
Method Detail
-
getHtype
public byte getHtype()
-
getHlen
public byte getHlen()
-
getXid
public int getXid()
-
getFlags
public short getFlags()
-
getCiaddr
public byte[] getCiaddr()
-
getGiaddr
public byte[] getGiaddr()
-
getChaddr
public byte[] getChaddr()
-
getOptions
public byte[] getOptions()
-
setHeaderField
public void setHeaderField(java.lang.String headerField, byte[] readValue)
- Overrides:
setHeaderField
in classorg.opendaylight.openflowplugin.libraries.liblldp.Packet
-
setOp
public DHCP setOp(byte dhcpOp)
-
setHtype
public DHCP setHtype(byte dhcpHtype)
-
setHlen
public DHCP setHlen(byte dhcpHlen)
-
setHops
public DHCP setHops(byte dhcpHops)
-
setXid
public DHCP setXid(int dhcpXid)
-
setSecs
public DHCP setSecs(short dhcpSecs)
-
setFlags
public DHCP setFlags(short dhcpFlags)
-
setCiaddr
public DHCP setCiaddr(byte[] ciaddr)
-
setCiaddr
public DHCP setCiaddr(int dhcpCiaddr)
-
setYiaddr
public DHCP setYiaddr(int dhcpYiaddr)
-
setYiaddr
public DHCP setYiaddr(java.lang.String dhcpYiaddr)
-
setSiaddr
public DHCP setSiaddr(int dhcpSiaddr)
-
setSiaddr
public DHCP setSiaddr(java.lang.String dhcpSiaddr)
-
setGiaddr
public DHCP setGiaddr(byte[] giaddr)
-
setGiaddr
public DHCP setGiaddr(int dhcpGiaddr)
-
setChaddr
public DHCP setChaddr(byte[] chaddr)
-
setSname
public DHCP setSname(byte[] sname)
-
setFile
public DHCP setFile(byte[] file)
-
setMcookie
public DHCP setMcookie(int dhcpMc)
-
setOptions
public DHCP setOptions(byte[] options)
-
deserialize
public org.opendaylight.openflowplugin.libraries.liblldp.Packet deserialize(byte[] data, int bitOffset, int size) throws org.opendaylight.openflowplugin.libraries.liblldp.PacketException
This method deserializes the data bits obtained from the wire into the respective header and payload which are of type Packet.- Overrides:
deserialize
in classorg.opendaylight.openflowplugin.libraries.liblldp.Packet
- Parameters:
data
- byte[] data from wire to deserializebitOffset
- int bit position where packet header starts in data arraysize
- int size of packet in bits- Returns:
- Packet
- Throws:
org.opendaylight.openflowplugin.libraries.liblldp.PacketException
- the packet deserialization failedNote: Copied from org.opendaylight.controller.sal.packet.Packet
-
serialize
public byte[] serialize() throws org.opendaylight.openflowplugin.libraries.liblldp.PacketException
- Overrides:
serialize
in classorg.opendaylight.openflowplugin.libraries.liblldp.Packet
- Throws:
org.opendaylight.openflowplugin.libraries.liblldp.PacketException
-
getfieldnumBits
public int getfieldnumBits(java.lang.String fieldName)
- Overrides:
getfieldnumBits
in classorg.opendaylight.openflowplugin.libraries.liblldp.Packet
-
getHeaderSize
public int getHeaderSize()
- Overrides:
getHeaderSize
in classorg.opendaylight.openflowplugin.libraries.liblldp.Packet
-
postDeserializeCustomOperation
protected void postDeserializeCustomOperation(byte[] data, int startBitOffset)
- Overrides:
postDeserializeCustomOperation
in classorg.opendaylight.openflowplugin.libraries.liblldp.Packet
-
setMsgType
public void setMsgType(byte type)
-
getMsgType
public byte getMsgType()
-
setOptionBytes
public void setOptionBytes(byte code, byte[] opt)
-
getOptionBytes
public byte[] getOptionBytes(byte code)
-
setOptionInt
public void setOptionInt(byte code, int opt)
-
getOptionInetAddr
public java.net.InetAddress getOptionInetAddr(byte code)
-
setOptionInetAddr
public void setOptionInetAddr(byte code, java.lang.String addr) throws java.net.UnknownHostException
- Throws:
java.net.UnknownHostException
-
setOptionStrAddrs
public void setOptionStrAddrs(byte code, java.util.List<java.lang.String> opt) throws java.net.UnknownHostException
- Throws:
java.net.UnknownHostException
-
setOptionString
public void setOptionString(byte code, java.lang.String str)
-
containsOption
public boolean containsOption(byte code)
-
unsetOption
public void unsetOption(byte code)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classorg.opendaylight.openflowplugin.libraries.liblldp.Packet
-
-