dls.h revision da14cebe459d3275048785f25bd869cb09b5307f
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_DLS_H
#define _SYS_DLS_H
#include <sys/mac_client.h>
#include <sys/dls_mgmt.h>
/*
* Data-Link Services Module
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* Module name.
*/
#define DLS_MODULE_NAME "dls"
/*
* Data-Link Services Information (text emitted by modinfo(1m))
*/
#define DLS_INFO "Data-Link Services"
/*
* Macros for converting ppas to instance #s, Vlan ID, or minor.
*/
/*
* Maps a (VID, INST) pair to ppa
*/
/*
* Converts a minor to an instance#; makes sense only when minor <= 1000.
*/
#ifdef _KERNEL
#define DLS_MAX_PPA 999
typedef struct dls_devnet_s *dls_dl_handle_t;
typedef struct dls_dev_t *dls_dev_handle_t;
typedef struct dls_link_s dls_link_t;
#define DLS_SAP_LLC 0
#define DLS_PROMISC_SAP 0x00000001
#define DLS_PROMISC_MULTI 0x00000002
#define DLS_PROMISC_PHYS 0x00000004
extern int dls_unbind(dld_str_t *);
extern void str_notify(void *, mac_notify_type_t);
extern int dls_devnet_open(const char *,
dls_dl_handle_t *, dev_t *);
extern void dls_devnet_close(dls_dl_handle_t);
extern boolean_t dls_devnet_rebuild();
const char *);
extern void dls_devnet_rele_tmp(dls_dl_handle_t);
extern void dls_devnet_rele(dls_dl_handle_t);
extern void dls_devnet_prop_task_wait(dls_dl_handle_t);
extern const char *dls_devnet_mac(dls_dl_handle_t);
extern int dls_devnet_setzid(const char *, zoneid_t);
extern int dls_mgmt_door_set(boolean_t);
uint32_t *, datalink_id_t *);
extern int dls_mgmt_get_linkinfo(datalink_id_t, char *,
extern int dls_mgmt_get_linkid(const char *, datalink_id_t *);
extern int dls_devnet_macname2linkid(const char *,
datalink_id_t *);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_DLS_H */