Class NeighborDiscoveryOptions

  • All Implemented Interfaces:
    IPacket

    public class NeighborDiscoveryOptions
    extends BasePacket
    Neighbor Discovery Protocol packet options.
    • Constructor Detail

      • NeighborDiscoveryOptions

        public NeighborDiscoveryOptions()
    • Method Detail

      • addOption

        public NeighborDiscoveryOptions addOption​(byte type,
                                                  byte[] data)
        Adds a Neighbor Discovery Protocol packet option.
        Parameters:
        type - the option type
        data - the option data
        Returns:
        this
      • options

        public java.util.List<NeighborDiscoveryOptions.Option> options()
        Gets the Neighbor Discovery Protocol packet options.
        Returns:
        the Neighbor Discovery Protocol packet options
      • hasOptions

        public boolean hasOptions()
        Checks whether any options are included.
        Returns:
        true if options are included, otherwise false
      • serialize

        public byte[] serialize()
        Description copied from interface: IPacket
        Sets all payloads parent packet if applicable, then serializes this packet and all payloads.
        Returns:
        a byte[] containing this packet and payloads
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class BasePacket
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object