1/*
2 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
3 * Permission to use, copy, modify, and/or distribute this software for
4 * any purpose with or without fee is hereby granted, provided that the
5 * above copyright notice and this permission notice appear in all copies.
6 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
7 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
8 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
9 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
10 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
11 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
12 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
13 */
14
15
16/**
17 * @defgroup horus_vlan HORUS_VLAN
18 * @{
19 */
20#ifndef _HORUS_VLAN_H_
21#define _HORUS_VLAN_H_
22
23#ifdef __cplusplus
24extern "C" {
25#endif /* __cplusplus */
26
27#include "fal/fal_vlan.h"
28
29    sw_error_t
30    horus_vlan_init(a_uint32_t dev_id);
31
32#ifdef IN_VLAN
33#define HORUS_VLAN_INIT(rv, dev_id) \
34    { \
35        rv = horus_vlan_init(dev_id); \
36        SW_RTN_ON_ERROR(rv); \
37    }
38#else
39#define HORUS_VLAN_INIT(rv, dev_id)
40#endif
41
42#ifdef HSL_STANDALONG
43
44
45    HSL_LOCAL sw_error_t
46    horus_vlan_entry_append(a_uint32_t dev_id, const fal_vlan_t * vlan_entry);
47
48
49    HSL_LOCAL sw_error_t
50    horus_vlan_create(a_uint32_t dev_id, a_uint32_t vlan_id);
51
52
53    HSL_LOCAL sw_error_t
54    horus_vlan_next(a_uint32_t dev_id, a_uint32_t vlan_id, fal_vlan_t * p_vlan);
55
56
57    HSL_LOCAL sw_error_t
58    horus_vlan_find(a_uint32_t dev_id, a_uint32_t vlan_id, fal_vlan_t * p_vlan);
59
60
61    HSL_LOCAL sw_error_t
62    horus_vlan_member_update(a_uint32_t dev_id, a_uint32_t vlan_id,
63                             fal_pbmp_t member, fal_pbmp_t u_member);
64
65
66    HSL_LOCAL sw_error_t
67    horus_vlan_delete(a_uint32_t dev_id, a_uint32_t vlan_id);
68
69#endif
70
71#ifdef __cplusplus
72}
73#endif /* __cplusplus */
74
75#endif /* _HORUS_VLAN_H_ */
76/**
77 * @}
78 */
79