public class IGMP extends BasePacket
| Modifier and Type | Field and Description |
|---|---|
static int |
MINIMUM_HEADER_LEN |
static Map<Byte,Deserializer<? extends IPacket>> |
PROTOCOL_DESERIALIZER_MAP |
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 |
|---|---|
boolean |
addGroup(IGMPGroup group)
Add a multicast group to this IGMP message.
|
IPacket |
deserialize(byte[] data,
int offset,
int length)
Deserialize an IGMP message.
|
static Deserializer<IGMP> |
deserializer()
Deserializer function for IPv4 packets.
|
boolean |
equals(Object obj) |
short |
getChecksum()
Get the checksum of this message.
|
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.
|
void |
setMaxRespCode(byte respCode)
Set the Max Resp Code.
|
String |
toString() |
clone, getParent, getPayload, resetChecksum, setParent, setPayloadpublic 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
public static final Map<Byte,Deserializer<? extends IPacket>> PROTOCOL_DESERIALIZER_MAP
public static final int MINIMUM_HEADER_LEN
public byte getIgmpType()
public void setIgmpType(byte msgType)
msgType - IGMP message typepublic short getChecksum()
public byte getMaxRespField()
public void setMaxRespCode(byte respCode)
respCode - the Maximum Response Code.public List<IGMPGroup> getGroups()
public boolean addGroup(IGMPGroup group)
group - the IGMPGroup will be IGMPQuery or IGMPMembership depending on the message type.public byte[] serialize()
public IPacket deserialize(byte[] data, int offset, int length)
data - bytes to deserializeoffset - offset to start deserializing fromlength - length of the data to deserializepublic static Deserializer<IGMP> deserializer()
public boolean equals(Object obj)
equals in class BasePacketpublic int hashCode()
hashCode in class BasePacketCopyright © 2016. All rights reserved.