1
// -*- c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t -*-
3
// Copyright (c) 2007-2008 International Computer Science Institute
5
// Permission is hereby granted, free of charge, to any person obtaining a
6
// copy of this software and associated documentation files (the "Software")
7
// to deal in the Software without restriction, subject to the conditions
8
// listed in the XORP LICENSE file. These conditions include: you must
9
// preserve this copyright notice, and you cannot mention the copyright
10
// holders in advertising related to the Software without their permission.
11
// The Software is provided WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED. This
12
// notice is a summary of the XORP LICENSE file; the license in that file is
15
// $XORP: xorp/fea/data_plane/ifconfig/ifconfig_vlan_set_linux.hh,v 1.4 2008/01/04 03:16:12 pavlin Exp $
17
#ifndef __FEA_DATA_PLANE_IFCONFIG_IFCONFIG_VLAN_SET_LINUX_HH__
18
#define __FEA_DATA_PLANE_IFCONFIG_IFCONFIG_VLAN_SET_LINUX_HH__
20
#include "fea/ifconfig_vlan_set.hh"
23
class IfConfigVlanSetLinux : public IfConfigVlanSet {
28
* @param fea_data_plane_manager the corresponding data plane manager
29
* (@ref FeaDataPlaneManager).
31
IfConfigVlanSetLinux(FeaDataPlaneManager& fea_data_plane_manager);
36
virtual ~IfConfigVlanSetLinux();
41
* @param error_msg the error message (if error).
42
* @return XORP_OK on success, otherwise XORP_ERROR.
44
virtual int start(string& error_msg);
49
* @param error_msg the error message (if error).
50
* @return XORP_OK on success, otherwise XORP_ERROR.
52
virtual int stop(string& error_msg);
57
* If an entry for the same VLAN already exists, is is overwritten
58
* with the new information.
60
* @param pulled_ifp pointer to the interface information pulled from
62
* @param pulled_vifp pointer to the vif information pulled from
64
* @param config_iface reference to the interface with the information
66
* @param config_vif reference to the vif with the information
68
* @param error_msg the error message (if error).
69
* @return XORP_OK on success, otherwise XORP_ERROR.
71
virtual int config_add_vlan(const IfTreeInterface* pulled_ifp,
72
const IfTreeVif* pulled_vifp,
73
const IfTreeInterface& config_iface,
74
const IfTreeVif& config_vif,
80
* @param pulled_ifp pointer to the interface information pulled from
82
* @param pulled_vifp pointer to the vif information pulled from
84
* @param config_iface reference to the interface with the information
86
* @param config_vif reference to the vif with the information
88
* @param error_msg the error message (if error).
89
* @return XORP_OK on success, otherwise XORP_ERROR.
91
virtual int config_delete_vlan(const IfTreeInterface* pulled_ifp,
92
const IfTreeVif* pulled_vifp,
93
const IfTreeInterface& config_iface,
94
const IfTreeVif& config_vif,
101
* @param parent_ifname the parent interface name.
102
* @param vlan_name the VLAN vif name.
103
* @param vlan_id the VLAN ID.
104
* @param error_msg the error message (if error).
105
* @return XORP_OK on success, otherwise XORP_ERROR.
107
int add_vlan(const string& parent_ifname,
108
const string& vlan_name,
115
* @param parent_ifname the parent interface name.
116
* @param vlan_name the VLAN vif name.
117
* @param error_msg the error message (if error).
118
* @return XORP_OK on success, otherwise XORP_ERROR.
120
int delete_vlan(const string& parent_ifname,
121
const string& vlan_name,
127
#endif // __FEA_DATA_PLANE_IFCONFIG_IFCONFIG_VLAN_SET_LINUX_HH__