]> git.ipfire.org Git - people/ms/rstp.git/blame - ctl_functions.h
RSTP testing - PATCH: source MAC address of BPDU
[people/ms/rstp.git] / ctl_functions.h
CommitLineData
ad02a0eb
SH
1/*****************************************************************************
2 Copyright (c) 2006 EMC Corporation.
3
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2 of the License, or (at your option)
7 any later version.
8
9 This program is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 more details.
13
14 You should have received a copy of the GNU General Public License along with
15 this program; if not, write to the Free Software Foundation, Inc., 59
16 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
18 The full GNU General Public License is included in this distribution in the
19 file called LICENSE.
20
21 Authors: Srinivas Aji <Aji_Srinivas@emc.com>
22
23******************************************************************************/
24
25#ifndef CTL_FUNCTIONS_H
26#define CTL_FUNCTIONS_H
27
28#include <bitmap.h>
29#include <uid_stp.h>
30
31int CTL_enable_bridge_rstp(int br_index, int enable);
32
33int CTL_get_bridge_state(int br_index,
11904a35 34 UID_STP_CFG_T * cfg, UID_STP_STATE_T * state);
ad02a0eb 35
11904a35 36int CTL_set_bridge_config(int br_index, UID_STP_CFG_T * cfg);
ad02a0eb
SH
37
38int CTL_get_port_state(int br_index, int port_index,
11904a35 39 UID_STP_PORT_CFG_T * cfg, UID_STP_PORT_STATE_T * state);
ad02a0eb 40
11904a35 41int CTL_set_port_config(int br_index, int port_index, UID_STP_PORT_CFG_T * cfg);
ad02a0eb
SH
42
43int CTL_set_debug_level(int level);
44
45#define CTL_ERRORS \
46 CHOOSE(Err_Interface_not_a_bridge), \
47 CHOOSE(Err_Bridge_RSTP_not_enabled), \
48 CHOOSE(Err_Bridge_is_down), \
49 CHOOSE(Err_Port_does_not_belong_to_bridge), \
50
51#define CHOOSE(a) a
52
53enum Errors {
11904a35
SH
54 Err_Dummy_Start = 1000,
55 CTL_ERRORS Err_Dummy_End
ad02a0eb
SH
56};
57
58#undef CHOOSE
59
60const char *CTL_error_explanation(int err);
61
62#endif