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 intENC_SOURCE_IPV4_BYTE_LENGTHstatic intENC_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 PIMAddrSourcedeserialize(byte[] data, int offset, int length)PIMAddrSourcedeserialize(ByteBuffer bb)booleanequals(Object obj)IpAddressgetAddr()Get the address of this encoded address.intgetByteSize()The size in bytes of a serialized address.bytegetFamily()Get the IP family of this address: 4 or 6.intgetMasklen()Get the masklen of the group address.booleangetRBit()Return the rBit.booleangetSBit()Return the sparse bit.booleangetWBit()Return the wBit, used in Join/Prune messages.inthashCode()byte[]serialize()voidsetAddr(String addr)PIM Encoded Source Address.voidsetAddr(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
 
 - 
 
 -