Package org.onlab.packet.pim
Class PIMAddrGroup
- java.lang.Object
 - 
- org.onlab.packet.pim.PIMAddrGroup
 
 
- 
public class PIMAddrGroup extends Object
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static intENC_GROUP_IPV4_BYTE_LENGTHstatic intENC_GROUP_IPV6_BYTE_LENGTH 
- 
Constructor Summary
Constructors Constructor Description PIMAddrGroup()PIM Encoded Group Address.PIMAddrGroup(String addr)PIM Encoded Source Address.PIMAddrGroup(IpPrefix gpfx)PIM Encoded Group Address. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PIMAddrGroupdeserialize(ByteBuffer bb)Deserialze from a ByteBuffer.booleanequals(Object obj)IpAddressgetAddr()Get the address of this encoded address.booleangetBBit()Return the bBit.intgetByteSize()The size in bytes of a serialized address.intgetFamily()Get the IP family of this address: 4 or 6.intgetMasklen()Get the masklen of the group address.booleangetZBit()Return the z bit for admin scoping.inthashCode()byte[]serialize()Serialize this group address.voidsetAddr(String addr)PIM encoded source address.voidsetAddr(IpPrefix pfx)Set the encoded source address. 
 - 
 
- 
- 
Field Detail
- 
ENC_GROUP_IPV4_BYTE_LENGTH
public static final int ENC_GROUP_IPV4_BYTE_LENGTH
- See Also:
 - Constant Field Values
 
 
- 
ENC_GROUP_IPV6_BYTE_LENGTH
public static final int ENC_GROUP_IPV6_BYTE_LENGTH
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Constructor Detail
- 
PIMAddrGroup
public PIMAddrGroup()
PIM Encoded Group Address. 
- 
PIMAddrGroup
public PIMAddrGroup(String addr)
PIM Encoded Source Address.- Parameters:
 addr- IPv4 or IPv6
 
- 
PIMAddrGroup
public PIMAddrGroup(IpPrefix gpfx)
PIM Encoded Group Address.- Parameters:
 gpfx- PIM encoded group address.
 
 - 
 
- 
Method Detail
- 
setAddr
public void setAddr(String addr)
PIM encoded source address.- Parameters:
 addr- IPv4 or IPv6
 
- 
setAddr
public void setAddr(IpPrefix pfx)
Set the encoded source address.- Parameters:
 pfx- address prefix
 
- 
getFamily
public int getFamily()
Get the IP family of this address: 4 or 6.- Returns:
 - the IP address family
 
 
- 
getAddr
public IpAddress getAddr()
Get the address of this encoded address.- Returns:
 - source address
 
 
- 
getMasklen
public int getMasklen()
Get the masklen of the group address.- Returns:
 - the masklen
 
 
- 
getZBit
public boolean getZBit()
Return the z bit for admin scoping. Only used for the Bootstrap router.- Returns:
 - true or false
 
 
- 
getBBit
public boolean getBBit()
Return the bBit. Used to indicate this is a bidir- Returns:
 - return true or false.
 
 
- 
getByteSize
public int getByteSize()
The size in bytes of a serialized address.- Returns:
 - the number of bytes when serialized
 
 
- 
serialize
public byte[] serialize()
Serialize this group address.- Returns:
 - the serialized address in a buffer
 
 
- 
deserialize
public PIMAddrGroup deserialize(ByteBuffer bb) throws DeserializationException
Deserialze from a ByteBuffer.- Parameters:
 bb- the ByteBuffer- Returns:
 - an encoded PIM group address
 - Throws:
 DeserializationException- if unable to deserialize the packet data
 
 - 
 
 -