public abstract class IGMP extends BasePacket
Modifier and Type | Class and Description |
---|---|
static class |
IGMP.IGMPv2 |
static class |
IGMP.IGMPv3 |
Modifier and Type | Field and Description |
---|---|
protected short |
checksum |
protected byte |
igmpType |
protected static org.slf4j.Logger |
log |
protected byte |
resField |
static byte |
TYPE_IGMPV1_MEMBERSHIP_REPORT |
static byte |
TYPE_IGMPV2_LEAVE_GROUP |
static byte |
TYPE_IGMPV2_MEMBERSHIP_REPORT |
static byte |
TYPE_IGMPV3_MEMBERSHIP_QUERY |
static byte |
TYPE_IGMPV3_MEMBERSHIP_REPORT |
parent, payload
Constructor and Description |
---|
IGMP() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
addGroup(IGMPGroup group)
Add a multicast group to this IGMP message.
|
static Deserializer<IGMP> |
deserializer()
Deserializer function for IPv4 packets.
|
boolean |
equals(java.lang.Object obj) |
short |
getChecksum()
Get the checksum of this message.
|
java.util.List<IGMPGroup> |
getGroups()
Get the list of IGMPGroups.
|
byte |
getIgmpType()
Get the IGMP message type.
|
byte |
getMaxRespField()
get the Max Resp Code.
|
int |
hashCode() |
byte[] |
serialize()
Serialize this IGMP packet.
|
void |
setIgmpType(byte msgType)
Set the IGMP message type.
|
abstract void |
setMaxRespCode(byte respCode)
Set the Max Resp Code.
|
java.lang.String |
toString() |
protected abstract boolean |
validChecksum()
Validates the message's checksum.
|
clone, getParent, getPayload, resetChecksum, setParent, setPayload
protected static final org.slf4j.Logger log
public static final byte TYPE_IGMPV3_MEMBERSHIP_QUERY
public static final byte TYPE_IGMPV1_MEMBERSHIP_REPORT
public static final byte TYPE_IGMPV2_MEMBERSHIP_REPORT
public static final byte TYPE_IGMPV2_LEAVE_GROUP
public static final byte TYPE_IGMPV3_MEMBERSHIP_REPORT
protected byte igmpType
protected byte resField
protected short checksum
public byte getIgmpType()
public void setIgmpType(byte msgType)
msgType
- IGMP message typepublic short getChecksum()
public byte getMaxRespField()
public abstract void setMaxRespCode(byte respCode)
respCode
- the Maximum Response Code.public java.util.List<IGMPGroup> getGroups()
public abstract boolean addGroup(IGMPGroup group)
group
- the IGMPGroup will be IGMPQuery or IGMPMembership depending on the message type.public byte[] serialize()
public static Deserializer<IGMP> deserializer()
protected abstract boolean validChecksum()
public boolean equals(java.lang.Object obj)
equals
in class BasePacket
public int hashCode()
hashCode
in class BasePacket
public java.lang.String toString()
toString
in class java.lang.Object