Class DHCP


  • public class DHCP
    extends org.opendaylight.openflowplugin.libraries.liblldp.Packet
    • Constructor Detail

      • DHCP

        public DHCP()
      • DHCP

        public DHCP​(boolean writeAccess)
    • 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 class org.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 class org.opendaylight.openflowplugin.libraries.liblldp.Packet
        Parameters:
        data - byte[] data from wire to deserialize
        bitOffset - int bit position where packet header starts in data array
        size - int size of packet in bits
        Returns:
        Packet
        Throws:
        org.opendaylight.openflowplugin.libraries.liblldp.PacketException - the packet deserialization failed

        Note: Copied from org.opendaylight.controller.sal.packet.Packet

      • serialize

        public byte[] serialize()
                         throws org.opendaylight.openflowplugin.libraries.liblldp.PacketException
        Overrides:
        serialize in class org.opendaylight.openflowplugin.libraries.liblldp.Packet
        Throws:
        org.opendaylight.openflowplugin.libraries.liblldp.PacketException
      • getfieldnumBits

        public int getfieldnumBits​(java.lang.String fieldName)
        Overrides:
        getfieldnumBits in class org.opendaylight.openflowplugin.libraries.liblldp.Packet
      • getHeaderSize

        public int getHeaderSize()
        Overrides:
        getHeaderSize in class org.opendaylight.openflowplugin.libraries.liblldp.Packet
      • postDeserializeCustomOperation

        protected void postDeserializeCustomOperation​(byte[] data,
                                                      int startBitOffset)
        Overrides:
        postDeserializeCustomOperation in class org.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 class org.opendaylight.openflowplugin.libraries.liblldp.Packet