|
xorp
|
00001 // -*- c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t -*- 00002 00003 // Copyright (c) 2007-2012 XORP, Inc and Others 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 #ifndef __FEA_DATA_PLANE_IFCONFIG_IFCONFIG_VLAN_SET_LINUX_HH__ 00021 #define __FEA_DATA_PLANE_IFCONFIG_IFCONFIG_VLAN_SET_LINUX_HH__ 00022 00023 #include "fea/ifconfig_vlan_set.hh" 00024 00025 00026 class IfConfigVlanSetLinux : public IfConfigVlanSet { 00027 public: 00034 IfConfigVlanSetLinux(FeaDataPlaneManager& fea_data_plane_manager, 00035 bool is_dummy); 00036 00040 virtual ~IfConfigVlanSetLinux(); 00041 00048 virtual int start(string& error_msg); 00049 00056 virtual int stop(string& error_msg); 00057 00070 virtual int config_add_vlan(const IfTreeInterface* system_ifp, 00071 const IfTreeInterface& config_if, 00072 bool& created_if, 00073 string& error_msg); 00074 00083 virtual int config_delete_vlan(const IfTreeInterface& config_iface, 00084 string& error_msg); 00085 00086 private: 00097 int add_vlan(const string& parent_ifname, 00098 const string& vlan_name, 00099 uint16_t vlan_id, 00100 bool& created_if, 00101 string& error_msg); 00102 00110 int delete_vlan(const string& ifname, 00111 string& error_msg); 00112 bool _is_dummy; 00113 int _s4; 00114 }; 00115 00116 #endif // __FEA_DATA_PLANE_IFCONFIG_IFCONFIG_VLAN_SET_LINUX_HH__