/*
* 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
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _BRIDGED_GLOBAL_H
#define _BRIDGED_GLOBAL_H
/*
* Globally visible symbols within the "bridged" bridging daemon
*/
#include <sys/ethernet.h>
#include <libdlpi.h>
#include <libdladm.h>
#include <libdlbridge.h>
#ifdef __cplusplus
extern "C" {
#endif
struct portdata {
int vlan_id;
int port_index;
unsigned int speed;
const char *name;
};
/* Number of reserved (internal) fdarray entries */
/* main.c */
extern int lock_engine(void);
extern void unlock_engine(void);
extern void get_dladm_speed(struct portdata *);
extern void enable_forwarding(struct portdata *);
extern const char *instance_name;
extern dladm_handle_t dlhandle;
extern boolean_t shutting_down;
/* door.c */
extern void init_door(void);
/* dlpi.c */
/* rstp.c */
extern void rstp_init(void);
extern void rstp_refresh(void);
extern void rstp_change_mac(struct portdata *, const unsigned char *);
/* events.c */
extern void open_bridge_control(void);
extern void event_loop(void);
extern int refresh_count;
extern dladm_bridge_prot_t protect;
extern int control_fd;
#ifdef __cplusplus
}
#endif
#endif /* _BRIDGED_GLOBAL_H */