Package org.onlab.packet.pim
Class PIMAddrSource
- java.lang.Object
-
- org.onlab.packet.pim.PIMAddrSource
-
public class PIMAddrSource extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
ENC_SOURCE_IPV4_BYTE_LENGTH
static int
ENC_SOURCE_IPV6_BYTE_LENGTH
-
Constructor Summary
Constructors Constructor Description PIMAddrSource()
PIM Encoded Group Address.PIMAddrSource(String addr)
PIM Encoded Source Address.PIMAddrSource(IpPrefix spfx)
PIM Encoded Source Address.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PIMAddrSource
deserialize(byte[] data, int offset, int length)
PIMAddrSource
deserialize(ByteBuffer bb)
boolean
equals(Object obj)
IpAddress
getAddr()
Get the address of this encoded address.int
getByteSize()
The size in bytes of a serialized address.byte
getFamily()
Get the IP family of this address: 4 or 6.int
getMasklen()
Get the masklen of the group address.boolean
getRBit()
Return the rBit.boolean
getSBit()
Return the sparse bit.boolean
getWBit()
Return the wBit, used in Join/Prune messages.int
hashCode()
byte[]
serialize()
void
setAddr(String addr)
PIM Encoded Source Address.void
setAddr(IpPrefix spfx)
PIM Encoded Source Address.
-
-
-
Field Detail
-
ENC_SOURCE_IPV4_BYTE_LENGTH
public static final int ENC_SOURCE_IPV4_BYTE_LENGTH
- See Also:
- Constant Field Values
-
ENC_SOURCE_IPV6_BYTE_LENGTH
public static final int ENC_SOURCE_IPV6_BYTE_LENGTH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PIMAddrSource
public PIMAddrSource(String addr)
PIM Encoded Source Address.- Parameters:
addr
- IPv4 or IPv6
-
PIMAddrSource
public PIMAddrSource(IpPrefix spfx)
PIM Encoded Source Address.- Parameters:
spfx
- IPv4 or IPv6
-
PIMAddrSource
public PIMAddrSource()
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 spfx)
PIM Encoded Source Address.- Parameters:
spfx
- IPv4 or IPv6 address prefix
-
getFamily
public byte 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
-
getSBit
public boolean getSBit()
Return the sparse bit.- Returns:
- true or false
-
getWBit
public boolean getWBit()
Return the wBit, used in Join/Prune messages.- Returns:
- return true or false.
-
getRBit
public boolean getRBit()
Return the rBit. Used by Rendezvous Point.- Returns:
- the rBit.
-
getByteSize
public int getByteSize()
The size in bytes of a serialized address.- Returns:
- the number of bytes when serialized
-
serialize
public byte[] serialize()
-
deserialize
public PIMAddrSource deserialize(byte[] data, int offset, int length) throws DeserializationException
- Throws:
DeserializationException
-
deserialize
public PIMAddrSource deserialize(ByteBuffer bb) throws DeserializationException
- Throws:
DeserializationException
-
-