public class DHCP
extends org.opendaylight.openflowplugin.libraries.liblldp.Packet
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) |
short |
getFlags() |
byte[] |
getGiaddr() |
int |
getHeaderSize() |
byte |
getHlen() |
byte |
getHtype() |
byte |
getMsgType() |
byte[] |
getOptionBytes(byte code) |
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(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,
String addr) |
void |
setOptionInt(byte code,
int opt) |
DHCP |
setOptions(byte[] options) |
void |
setOptionStrAddrs(byte code,
List<String> opt) |
void |
setOptionString(byte code,
String str) |
DHCP |
setSecs(short dhcpSecs) |
DHCP |
setSiaddr(int dhcpSiaddr) |
DHCP |
setSiaddr(String dhcpSiaddr) |
DHCP |
setSname(byte[] sname) |
DHCP |
setXid(int dhcpXid) |
DHCP |
setYiaddr(int dhcpYiaddr) |
DHCP |
setYiaddr(String dhcpYiaddr) |
String |
toString() |
void |
unsetOption(byte code) |
public byte getHtype()
public byte getHlen()
public int getXid()
public short getFlags()
public byte[] getCiaddr()
public byte[] getGiaddr()
public byte[] getChaddr()
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 setYiaddr(int dhcpYiaddr)
public DHCP setSiaddr(int dhcpSiaddr)
public DHCP setGiaddr(byte[] giaddr)
public DHCP setGiaddr(int 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 setOptionBytes(byte code, byte[] opt)
public byte[] getOptionBytes(byte code)
public void setOptionInt(byte code, int opt)
public InetAddress getOptionInetAddr(byte code)
public void setOptionInetAddr(byte code, String addr) throws UnknownHostException
UnknownHostException
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 © 2020 OpenDaylight. All rights reserved.