Search in sources :

Example 1 with PIMJoinPruneGroup

use of org.onlab.packet.pim.PIMJoinPruneGroup in project onos by opennetworkinglab.

the class PimInterface method processJoinPrune.

/**
 * Process an incoming PIM JoinPrune message.
 *
 * @param ethPkt the Ethernet packet header.
 */
public void processJoinPrune(Ethernet ethPkt) {
    IPv4 ip = (IPv4) ethPkt.getPayload();
    checkNotNull(ip);
    PIM pim = (PIM) ip.getPayload();
    checkNotNull(pim);
    PIMJoinPrune jpHdr = (PIMJoinPrune) pim.getPayload();
    checkNotNull(jpHdr);
    /*
         * The Join/Prune messages are grouped by Group address. We'll walk each group address
         * where we will possibly have to walk a list of source address for the joins and prunes.
         */
    Collection<PIMJoinPruneGroup> jpgs = jpHdr.getJoinPrunes();
    for (PIMJoinPruneGroup jpg : jpgs) {
        IpPrefix gpfx = jpg.getGroup();
        // Walk the joins first.
        for (IpPrefix spfx : jpg.getJoins().values()) {
        // We may need
        }
        for (IpPrefix spfx : jpg.getPrunes().values()) {
        // TODO: this is where we many need to remove multi-cast state and possibly intents.
        }
    }
}
Also used : PIMJoinPrune(org.onlab.packet.pim.PIMJoinPrune) IpPrefix(org.onlab.packet.IpPrefix) PIM(org.onlab.packet.PIM) PIMJoinPruneGroup(org.onlab.packet.pim.PIMJoinPruneGroup) IPv4(org.onlab.packet.IPv4)

Aggregations

IPv4 (org.onlab.packet.IPv4)1 IpPrefix (org.onlab.packet.IpPrefix)1 PIM (org.onlab.packet.PIM)1 PIMJoinPrune (org.onlab.packet.pim.PIMJoinPrune)1 PIMJoinPruneGroup (org.onlab.packet.pim.PIMJoinPruneGroup)1