Package org.onlab.packet.pim
Class PIMAddrGroup
- java.lang.Object
-
- org.onlab.packet.pim.PIMAddrGroup
-
public class PIMAddrGroup extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
ENC_GROUP_IPV4_BYTE_LENGTH
static int
ENC_GROUP_IPV6_BYTE_LENGTH
-
Constructor Summary
Constructors Constructor Description PIMAddrGroup()
PIM Encoded Group Address.PIMAddrGroup(java.lang.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 PIMAddrGroup
deserialize(java.nio.ByteBuffer bb)
Deserialze from a ByteBuffer.boolean
equals(java.lang.Object obj)
IpAddress
getAddr()
Get the address of this encoded address.boolean
getBBit()
Return the bBit.int
getByteSize()
The size in bytes of a serialized address.int
getFamily()
Get the IP family of this address: 4 or 6.int
getMasklen()
Get the masklen of the group address.boolean
getZBit()
Return the z bit for admin scoping.int
hashCode()
byte[]
serialize()
Serialize this group address.void
setAddr(java.lang.String addr)
PIM encoded source address.void
setAddr(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(java.lang.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(java.lang.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(java.nio.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
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-