/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#ifndef _LIBDLBRIDGE_H
#define _LIBDLBRIDGE_H
/*
* This file includes structures, macros and routines used by bridge
* administration.
*/
#include <libdladm.h>
#include <uid_stp.h>
#include <paths.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
/* Utility functions to accept bridge protection options */
extern dladm_status_t dladm_bridge_str2prot(const char *,
extern const char *dladm_bridge_prot2str(dladm_bridge_prot_t);
/* Retrieve bridge properties from SMF */
extern dladm_status_t dladm_bridge_get_properties(const char *,
UID_STP_CFG_T *, dladm_bridge_prot_t *);
extern dladm_status_t dladm_bridge_run_properties(const char *,
UID_STP_CFG_T *, dladm_bridge_prot_t *);
/* Create new bridge and configure SMF properties */
/* Enable a newly created bridge in SMF */
extern dladm_status_t dladm_bridge_enable(const char *);
/* Delete a previously created bridge */
uint32_t);
/* Bring up a persistently created bridge */
/* Bring down a running bridge */
/* Retrieve bridge state from running bridge daemon and get bridge port list */
extern void dladm_bridge_free_portlist(datalink_id_t *);
const char *);
char *, size_t);
/* Retrieve bridge port status */
/* Check valid bridge name */
extern boolean_t dladm_valid_bridgename(const char *);
/* Convert bridge observability node name to bridge name */
extern boolean_t dladm_observe_to_bridge(char *);
/* Retrieve bridge forwarding table entries */
uint_t *);
extern void dladm_bridge_free_fwdtable(bridge_listfwd_t *);
/* Retrive TRILL nicknames list */
extern void dladm_bridge_free_trillnick(trill_listnick_t *);
/* Store and retrieve TRILL nickname from TRILL SMF service configuration */
extern uint16_t dladm_bridge_get_nick(const char *);
extern void dladm_bridge_set_nick(const char *, uint16_t);
/* Retrieve undocumented private properties from bridge SMF service config */
extern dladm_status_t dladm_bridge_get_privprop(const char *,
/* Internal to libdladm */
int, int *);
datalink_id_t, uint_t *);
/* Bridge connection; used only between libdladm and bridged for status */
typedef enum bridge_door_type_e {
typedef struct bridge_door_cmd_s {
typedef struct bridge_door_cfg_s {
#ifdef __cplusplus
}
#endif
#endif /* _LIBDLBRIDGE_H */