Source: ../../pim/pim_scope_zone_table.hh
|
|
|
|
// -*- c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t -*-
// Copyright (c) 2001,2002 International Computer Science Institute
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software")
// to deal in the Software without restriction, subject to the conditions
// listed in the XORP LICENSE file. These conditions include: you must
// preserve this copyright notice, and you cannot mention the copyright
// holders in advertising related to the Software without their permission.
// The Software is provided WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED. This
// notice is a summary of the XORP LICENSE file; the license in that file is
// legally binding.
// $XORP: xorp/pim/pim_scope_zone_table.hh,v 1.1.1.1 2002/12/11 23:56:12 hodson Exp $
#ifndef __PIM_PIM_SCOPE_ZONE_TABLE_HH__
#define __PIM_PIM_SCOPE_ZONE_TABLE_HH__
//
// PIM scope zone table definition.
//
#include <list>
#include "libxorp/ipvxnet.hh"
#include "mrt/mifset.hh"
//
// Constants definitions
//
//
// Structures/classes, typedefs and macros
//
class PimNode;
class PimScopeZone;
// PIM-specific scope zone table
class PimScopeZoneTable {
public:
PimScopeZoneTable(PimNode& pim_node);
virtual ~PimScopeZoneTable();
void add_scope_zone(const IPvXNet& scope_zone_prefix);
void delete_scope_zone(const IPvXNet& scope_zone_prefix);
bool is_scoped(const IPvX& addr, uint16_t vif_index) const;
PimNode& pim_node() const { return (_pim_node); }
private:
// Private functions
// Private state
PimNode& _pim_node; // The PIM node I belong to
list<PimScopeZone> _pim_scope_zone_list; // The list with scoped zones
};
class PimScopeZone {
public:
PimScopeZone(const IPvXNet& scope_zone_prefix);
PimScopeZone(const IPvXNet& scope_zone_prefix, const Mifset& scoped_vifs);
virtual ~PimScopeZone();
void set_scoped_vif(uint16_t vif_index);
void reset_scoped_vif(uint16_t vif_index);
bool is_set(uint16_t vif_index) const;
bool is_scoped(const IPvX& addr, uint16_t vif_index) const;
bool is_same_scope_zone(const IPvXNet& scope_zone_prefix) const;
private:
IPvXNet _scope_zone_prefix;
Mifset _scoped_vifs;
};
//
// Global variables
//
//
// Global functions prototypes
//
#endif // __PIM_PIM_SCOPE_ZONE_TABLE_HH__
Generated by: pavlin on possum.icir.org on Wed Dec 11 16:50:53 2002, using kdoc 2.0a54+XORP. |