Package org.onlab.packet.pim
Class PIMJoinPrune
- java.lang.Object
 - 
- org.onlab.packet.BasePacket
 - 
- org.onlab.packet.pim.PIMJoinPrune
 
 
 
- 
- All Implemented Interfaces:
 IPacket
public class PIMJoinPrune extends BasePacket
 
- 
- 
Field Summary
- 
Fields inherited from class org.onlab.packet.BasePacket
parent, payload 
 - 
 
- 
Constructor Summary
Constructors Constructor Description PIMJoinPrune() 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddJoin(String saddr, String gaddr)Add a join given strings represending the source and group addresses.voidaddJoinPrune(String saddr, String gaddr, boolean join)Add the specified s,g to join field.voidaddJoinPrune(IpPrefix spfx, IpPrefix gpfx, boolean join)Add the specified S, G to the join field.voidaddPrune(String saddr, String gaddr)Add a prune given strings represending the source and group addresses.static Deserializer<PIMJoinPrune>deserializer()Return the J/P deserializer function.shortgetHoldTime()Get the J/P hold time.Collection<PIMJoinPruneGroup>getJoinPrunes()Get the JoinPrune Group with all the joins and prunes.PIMAddrUnicastgetUpstreamAddr()Get the upstreamAddr for this J/P request.byte[]serialize()Sets all payloads parent packet if applicable, then serializes this packet and all payloads.voidsetHoldTime(short holdTime)Set the J/P holdtime in seconds.voidsetUpstreamAddr(PIMAddrUnicast upstr)Set the upstream address of this PIM J/P request.StringtoString()- 
Methods inherited from class org.onlab.packet.BasePacket
clone, equals, getParent, getPayload, hashCode, resetChecksum, setParent, setPayload 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getHoldTime
public short getHoldTime()
Get the J/P hold time.- Returns:
 - specified in seconds.
 
 
- 
setHoldTime
public void setHoldTime(short holdTime)
Set the J/P holdtime in seconds.- Parameters:
 holdTime- return the holdtime.
 
- 
getUpstreamAddr
public PIMAddrUnicast getUpstreamAddr()
Get the upstreamAddr for this J/P request.- Returns:
 - the upstream address.
 
 
- 
setUpstreamAddr
public void setUpstreamAddr(PIMAddrUnicast upstr)
Set the upstream address of this PIM J/P request.- Parameters:
 upstr- the PIM Upstream unicast address
 
- 
getJoinPrunes
public Collection<PIMJoinPruneGroup> getJoinPrunes()
Get the JoinPrune Group with all the joins and prunes.- Returns:
 - the joinPruneGroup collection
 
 
- 
addJoinPrune
public void addJoinPrune(String saddr, String gaddr, boolean join)
Add the specified s,g to join field.- Parameters:
 saddr- the source address of the routegaddr- the group address of the routejoin- true for a join, false for a prune.
 
- 
addJoinPrune
public void addJoinPrune(IpPrefix spfx, IpPrefix gpfx, boolean join)
Add the specified S, G to the join field.- Parameters:
 spfx- the source prefix of the routegpfx- the group prefix of the routejoin- true for join, false for prune
 
- 
addJoin
public void addJoin(String saddr, String gaddr)
Add a join given strings represending the source and group addresses.- Parameters:
 saddr- source addressgaddr- group address
 
- 
addPrune
public void addPrune(String saddr, String gaddr)
Add a prune given strings represending the source and group addresses.- Parameters:
 saddr- source addressgaddr- group address
 
- 
serialize
public byte[] serialize()
Sets all payloads parent packet if applicable, then serializes this packet and all payloads.- Returns:
 - a byte[] containing this packet and payloads
 
 
- 
deserializer
public static Deserializer<PIMJoinPrune> deserializer()
Return the J/P deserializer function.- Returns:
 - a function that will deserialize a J/P message.
 
 
 - 
 
 -