Class IGMPMembership


  • public class IGMPMembership
    extends IGMPGroup
    • Field Detail

      • CHANGE_TO_INCLUDE_MODE

        public static final byte CHANGE_TO_INCLUDE_MODE
        See Also:
        Constant Field Values
      • CHANGE_TO_EXCLUDE_MODE

        public static final byte CHANGE_TO_EXCLUDE_MODE
        See Also:
        Constant Field Values
      • recordType

        protected byte recordType
      • auxDataLength

        protected byte auxDataLength
      • auxData

        protected byte[] auxData
    • Constructor Detail

      • IGMPMembership

        public IGMPMembership​(Ip4Address gaddr)
        Constructor initialized with a multicast group address.
        Parameters:
        gaddr - A multicast group address.
      • IGMPMembership

        public IGMPMembership()
        Default constructor.
    • Method Detail

      • getRecordType

        public byte getRecordType()
        Gets the IGMP record type.
        Returns:
        record type
      • setRecordType

        public void setRecordType​(byte type)
        Sets the IGMP record type.
        Parameters:
        type - A multicast record type, like MODE_IS_INCLUDE or MODE_IS_EXCLUDE.
      • serialize

        public byte[] serialize​(java.nio.ByteBuffer bb)
        Serialize this Membership Report.
        Specified by:
        serialize in class IGMPGroup
        Parameters:
        bb - the ByteBuffer to write into, positioned at the next spot to be written to.
        Returns:
        serialized IGMP message.
      • deserialize

        public IGMPGroup deserialize​(java.nio.ByteBuffer bb)
                              throws DeserializationException
        Deserialize the IGMP Membership report packet.
        Specified by:
        deserialize in class IGMPGroup
        Parameters:
        bb - the ByteBuffer wrapping the serialized message. The position of the ByteBuffer should be pointing at the head of either message type.
        Returns:
        IGMP Group
        Throws:
        DeserializationException - if deserialization fails
      • equals

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

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object