xorp

ifconfig_set_dummy.hh

00001 // -*- c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t -*-
00002 
00003 // Copyright (c) 2001-2009 XORP, Inc.
00004 //
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License, Version 2, June
00007 // 1991 as published by the Free Software Foundation. Redistribution
00008 // and/or modification of this program under the terms of any other
00009 // version of the GNU General Public License is not permitted.
00010 // 
00011 // This program is distributed in the hope that it will be useful, but
00012 // WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For more details,
00014 // see the GNU General Public License, Version 2, a copy of which can be
00015 // found in the XORP LICENSE.gpl file.
00016 // 
00017 // XORP Inc, 2953 Bunker Hill Lane, Suite 204, Santa Clara, CA 95054, USA;
00018 // http://xorp.net
00019 
00020 // $XORP: xorp/fea/data_plane/ifconfig/ifconfig_set_dummy.hh,v 1.15 2008/10/02 21:57:07 bms Exp $
00021 
00022 #ifndef __FEA_DATA_PLANE_IFCONFIG_IFCONFIG_SET_DUMMY_HH__
00023 #define __FEA_DATA_PLANE_IFCONFIG_IFCONFIG_SET_DUMMY_HH__
00024 
00025 #include "fea/ifconfig_set.hh"
00026 
00027 
00028 class IfConfigSetDummy : public IfConfigSet {
00029 public:
00036     IfConfigSetDummy(FeaDataPlaneManager& fea_data_plane_manager);
00037 
00041     virtual ~IfConfigSetDummy();
00042 
00049     virtual int start(string& error_msg);
00050     
00057     virtual int stop(string& error_msg);
00058 
00064     const IfTree& iftree() const { return _iftree; }
00065 
00075     virtual int push_config(const IfTree& iftree);
00076 
00077 private:
00085     virtual bool is_discard_emulated(const IfTreeInterface& i) const;
00086 
00094     virtual bool is_unreachable_emulated(const IfTreeInterface& i) const;
00095 
00102     virtual int config_begin(string& error_msg);
00103 
00110     virtual int config_end(string& error_msg);
00111 
00122     virtual int config_interface_begin(const IfTreeInterface* pulled_ifp,
00123                        IfTreeInterface& config_iface,
00124                        string& error_msg);
00125 
00136     virtual int config_interface_end(const IfTreeInterface* pulled_ifp,
00137                      const IfTreeInterface& config_iface,
00138                      string& error_msg);
00139 
00154     virtual int config_vif_begin(const IfTreeInterface* pulled_ifp,
00155                  const IfTreeVif* pulled_vifp,
00156                  const IfTreeInterface& config_iface,
00157                  const IfTreeVif& config_vif,
00158                  string& error_msg);
00159 
00174     virtual int config_vif_end(const IfTreeInterface* pulled_ifp,
00175                    const IfTreeVif* pulled_vifp,
00176                    const IfTreeInterface& config_iface,
00177                    const IfTreeVif& config_vif,
00178                    string& error_msg);
00179 
00201     virtual int config_add_address(const IfTreeInterface* pulled_ifp,
00202                    const IfTreeVif* pulled_vifp,
00203                    const IfTreeAddr4* pulled_addrp,
00204                    const IfTreeInterface& config_iface,
00205                    const IfTreeVif& config_vif,
00206                    const IfTreeAddr4& config_addr,
00207                    string& error_msg);
00208 
00227     virtual int config_delete_address(const IfTreeInterface* pulled_ifp,
00228                       const IfTreeVif* pulled_vifp,
00229                       const IfTreeAddr4* pulled_addrp,
00230                       const IfTreeInterface& config_iface,
00231                       const IfTreeVif& config_vif,
00232                       const IfTreeAddr4& config_addr,
00233                       string& error_msg);
00234 
00256     virtual int config_add_address(const IfTreeInterface* pulled_ifp,
00257                    const IfTreeVif* pulled_vifp,
00258                    const IfTreeAddr6* pulled_addrp,
00259                    const IfTreeInterface& config_iface,
00260                    const IfTreeVif& config_vif,
00261                    const IfTreeAddr6& config_addr,
00262                    string& error_msg);
00263 
00282     virtual int config_delete_address(const IfTreeInterface* pulled_ifp,
00283                       const IfTreeVif* pulled_vifp,
00284                       const IfTreeAddr6* pulled_addrp,
00285                       const IfTreeInterface& config_iface,
00286                       const IfTreeVif& config_vif,
00287                       const IfTreeAddr6& config_addr,
00288                       string& error_msg);
00289 
00290     IfTree      _iftree;        // The configured IfTree
00291 };
00292 
00293 #endif // __FEA_DATA_PLANE_IFCONFIG_IFCONFIG_SET_DUMMY_HH__
 All Classes Namespaces Functions Variables Typedefs Enumerations