public class DHCP
extends org.opendaylight.openflowplugin.libraries.liblldp.Packet
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
LOG |
Modifier and Type | Method and 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(String fieldName) |
byte[] |
getFile() |
short |
getFlags() |
byte[] |
getGiaddr() |
int |
getHeaderSize() |
byte |
getHlen() |
byte |
getHops() |
byte |
getHtype() |
int |
getMCookie() |
byte |
getMsgType() |
byte |
getOp() |
byte |
getOptionByte(byte code) |
byte[] |
getOptionBytes(byte code) |
InetAddress |
getOptionInetAddr(byte code) |
int |
getOptionInt(byte code) |
byte[] |
getOptions() |
short |
getOptionShort(byte code) |
String |
getOptionStrAddr(byte code) |
short |
getSecs() |
byte[] |
getSiaddr() |
InetAddress |
getSiaddrAsInetAddr() |
byte[] |
getSname() |
int |
getXid() |
byte[] |
getYiaddr() |
protected void |
postDeserializeCustomOperation(byte[] data,
int startBitOffset) |
byte[] |
serialize() |
DHCP |
setChaddr(byte[] chaddr) |
DHCP |
setCiaddr(byte[] ciaddr) |
DHCP |
setCiaddr(InetAddress dhcpCiaddr) |
DHCP |
setCiaddr(int dhcpCiaddr) |
DHCP |
setCiaddr(String dhcpCiaddr) |
DHCP |
setFile(byte[] file) |
DHCP |
setFlags(short dhcpFlags) |
DHCP |
setGiaddr(byte[] giaddr) |
DHCP |
setGiaddr(InetAddress dhcpGiaddr) |
DHCP |
setGiaddr(int dhcpGiaddr) |
DHCP |
setGiaddr(String dhcpGiaddr) |
void |
setHeaderField(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 |
setOptionByte(byte code,
byte opt) |
void |
setOptionBytes(byte code,
byte[] opt) |
void |
setOptionInetAddr(byte code,
InetAddress addr) |
void |
setOptionInetAddr(byte code,
String addr) |
void |
setOptionInt(byte code,
int opt) |
DHCP |
setOptions(byte[] options) |
void |
setOptionShort(byte code,
short opt) |
void |
setOptionStrAddrs(byte code,
List<String> opt) |
void |
setOptionString(byte code,
String str) |
DHCP |
setSecs(short dhcpSecs) |
DHCP |
setSiaddr(byte[] siaddr) |
DHCP |
setSiaddr(InetAddress dhcpSiaddr) |
DHCP |
setSiaddr(int dhcpSiaddr) |
DHCP |
setSiaddr(String dhcpSiaddr) |
DHCP |
setSname(byte[] sname) |
DHCP |
setXid(int dhcpXid) |
DHCP |
setYiaddr(byte[] yiaddr) |
DHCP |
setYiaddr(InetAddress dhcpYiaddr) |
DHCP |
setYiaddr(int dhcpYiaddr) |
DHCP |
setYiaddr(String dhcpYiaddr) |
String |
toString() |
void |
unsetOption(byte code) |
public byte getOp()
public byte getHtype()
public byte getHlen()
public byte getHops()
public int getXid()
public short getSecs()
public short getFlags()
public byte[] getCiaddr()
public byte[] getYiaddr()
public byte[] getSiaddr()
public InetAddress getSiaddrAsInetAddr()
public byte[] getGiaddr()
public byte[] getChaddr()
public byte[] getSname()
public byte[] getFile()
public int getMCookie()
public byte[] getOptions()
public void setHeaderField(String headerField, byte[] readValue)
setHeaderField
in class org.opendaylight.openflowplugin.libraries.liblldp.Packet
public DHCP setOp(byte dhcpOp)
public DHCP setHtype(byte dhcpHtype)
public DHCP setHlen(byte dhcpHlen)
public DHCP setHops(byte dhcpHops)
public DHCP setXid(int dhcpXid)
public DHCP setSecs(short dhcpSecs)
public DHCP setFlags(short dhcpFlags)
public DHCP setCiaddr(byte[] ciaddr)
public DHCP setCiaddr(int dhcpCiaddr)
public DHCP setCiaddr(InetAddress dhcpCiaddr)
public DHCP setYiaddr(byte[] yiaddr)
public DHCP setYiaddr(int dhcpYiaddr)
public DHCP setYiaddr(InetAddress dhcpYiaddr)
public DHCP setSiaddr(byte[] siaddr)
public DHCP setSiaddr(int dhcpSiaddr)
public DHCP setSiaddr(InetAddress dhcpSiaddr)
public DHCP setGiaddr(byte[] giaddr)
public DHCP setGiaddr(int dhcpGiaddr)
public DHCP setGiaddr(InetAddress dhcpGiaddr)
public DHCP setChaddr(byte[] chaddr)
public DHCP setSname(byte[] sname)
public DHCP setFile(byte[] file)
public DHCP setMcookie(int dhcpMc)
public DHCP setOptions(byte[] options)
public org.opendaylight.openflowplugin.libraries.liblldp.Packet deserialize(byte[] data, int bitOffset, int size) throws org.opendaylight.openflowplugin.libraries.liblldp.PacketException
deserialize
in class org.opendaylight.openflowplugin.libraries.liblldp.Packet
data
- byte[] data from wire to deserializebitOffset
- int bit position where packet header starts in data
arraysize
- int size of packet in bitsorg.opendaylight.openflowplugin.libraries.liblldp.PacketException
- the packet deserialization failed
Note: Copied from org.opendaylight.controller.sal.packet.Packet
public byte[] serialize() throws org.opendaylight.openflowplugin.libraries.liblldp.PacketException
serialize
in class org.opendaylight.openflowplugin.libraries.liblldp.Packet
org.opendaylight.openflowplugin.libraries.liblldp.PacketException
public int getfieldnumBits(String fieldName)
getfieldnumBits
in class org.opendaylight.openflowplugin.libraries.liblldp.Packet
public int getHeaderSize()
getHeaderSize
in class org.opendaylight.openflowplugin.libraries.liblldp.Packet
protected void postDeserializeCustomOperation(byte[] data, int startBitOffset)
postDeserializeCustomOperation
in class org.opendaylight.openflowplugin.libraries.liblldp.Packet
public void setMsgType(byte type)
public byte getMsgType()
public void setOptionByte(byte code, byte opt)
public byte getOptionByte(byte code)
public void setOptionBytes(byte code, byte[] opt)
public byte[] getOptionBytes(byte code)
public void setOptionShort(byte code, short opt)
public short getOptionShort(byte code)
public void setOptionInt(byte code, int opt)
public int getOptionInt(byte code)
public InetAddress getOptionInetAddr(byte code)
public void setOptionInetAddr(byte code, InetAddress addr)
public void setOptionInetAddr(byte code, String addr) throws UnknownHostException
UnknownHostException
public String getOptionStrAddr(byte code)
public void setOptionStrAddrs(byte code, List<String> opt) throws UnknownHostException
UnknownHostException
public void setOptionString(byte code, String str)
public boolean containsOption(byte code)
public void unsetOption(byte code)
public String toString()
toString
in class org.opendaylight.openflowplugin.libraries.liblldp.Packet
Copyright © 2019 OpenDaylight. All rights reserved.