xref: /onnv-gate/usr/src/uts/common/net/simnet.h (revision 9815:5d50ee5359bc)
1*9815SRishi.Srivatsavai@Sun.COM /*
2*9815SRishi.Srivatsavai@Sun.COM  * CDDL HEADER START
3*9815SRishi.Srivatsavai@Sun.COM  *
4*9815SRishi.Srivatsavai@Sun.COM  * The contents of this file are subject to the terms of the
5*9815SRishi.Srivatsavai@Sun.COM  * Common Development and Distribution License (the "License").
6*9815SRishi.Srivatsavai@Sun.COM  * You may not use this file except in compliance with the License.
7*9815SRishi.Srivatsavai@Sun.COM  *
8*9815SRishi.Srivatsavai@Sun.COM  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*9815SRishi.Srivatsavai@Sun.COM  * or http://www.opensolaris.org/os/licensing.
10*9815SRishi.Srivatsavai@Sun.COM  * See the License for the specific language governing permissions
11*9815SRishi.Srivatsavai@Sun.COM  * and limitations under the License.
12*9815SRishi.Srivatsavai@Sun.COM  *
13*9815SRishi.Srivatsavai@Sun.COM  * When distributing Covered Code, include this CDDL HEADER in each
14*9815SRishi.Srivatsavai@Sun.COM  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*9815SRishi.Srivatsavai@Sun.COM  * If applicable, add the following below this CDDL HEADER, with the
16*9815SRishi.Srivatsavai@Sun.COM  * fields enclosed by brackets "[]" replaced with your own identifying
17*9815SRishi.Srivatsavai@Sun.COM  * information: Portions Copyright [yyyy] [name of copyright owner]
18*9815SRishi.Srivatsavai@Sun.COM  *
19*9815SRishi.Srivatsavai@Sun.COM  * CDDL HEADER END
20*9815SRishi.Srivatsavai@Sun.COM  */
21*9815SRishi.Srivatsavai@Sun.COM /*
22*9815SRishi.Srivatsavai@Sun.COM  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23*9815SRishi.Srivatsavai@Sun.COM  * Use is subject to license terms.
24*9815SRishi.Srivatsavai@Sun.COM  */
25*9815SRishi.Srivatsavai@Sun.COM 
26*9815SRishi.Srivatsavai@Sun.COM #ifndef	_SYS_SIMNET_H
27*9815SRishi.Srivatsavai@Sun.COM #define	_SYS_SIMNET_H
28*9815SRishi.Srivatsavai@Sun.COM 
29*9815SRishi.Srivatsavai@Sun.COM #include <sys/types.h>
30*9815SRishi.Srivatsavai@Sun.COM #include <sys/mac.h>
31*9815SRishi.Srivatsavai@Sun.COM #include <sys/dld_ioc.h>
32*9815SRishi.Srivatsavai@Sun.COM 
33*9815SRishi.Srivatsavai@Sun.COM #ifdef	__cplusplus
34*9815SRishi.Srivatsavai@Sun.COM extern "C" {
35*9815SRishi.Srivatsavai@Sun.COM #endif
36*9815SRishi.Srivatsavai@Sun.COM 
37*9815SRishi.Srivatsavai@Sun.COM /* Simnet IOCTL commands handled via DLD driver */
38*9815SRishi.Srivatsavai@Sun.COM #define	SIMNET_IOC_CREATE	SIMNETIOC(1)
39*9815SRishi.Srivatsavai@Sun.COM #define	SIMNET_IOC_DELETE	SIMNETIOC(2)
40*9815SRishi.Srivatsavai@Sun.COM #define	SIMNET_IOC_INFO		SIMNETIOC(3)
41*9815SRishi.Srivatsavai@Sun.COM #define	SIMNET_IOC_MODIFY	SIMNETIOC(4)
42*9815SRishi.Srivatsavai@Sun.COM 
43*9815SRishi.Srivatsavai@Sun.COM typedef struct simnet_ioc_create {
44*9815SRishi.Srivatsavai@Sun.COM 	datalink_id_t	sic_link_id;
45*9815SRishi.Srivatsavai@Sun.COM 	uint_t		sic_type;	/* DL_ETHER or DL_WiFi */
46*9815SRishi.Srivatsavai@Sun.COM 	uint_t		sic_mac_len;
47*9815SRishi.Srivatsavai@Sun.COM 	uint_t		sic_flags;
48*9815SRishi.Srivatsavai@Sun.COM 	uchar_t		sic_mac_addr[MAXMACADDRLEN];
49*9815SRishi.Srivatsavai@Sun.COM } simnet_ioc_create_t;
50*9815SRishi.Srivatsavai@Sun.COM 
51*9815SRishi.Srivatsavai@Sun.COM typedef struct simnet_ioc_delete {
52*9815SRishi.Srivatsavai@Sun.COM 	datalink_id_t	sid_link_id;
53*9815SRishi.Srivatsavai@Sun.COM 	uint_t		sid_flags;
54*9815SRishi.Srivatsavai@Sun.COM } simnet_ioc_delete_t;
55*9815SRishi.Srivatsavai@Sun.COM 
56*9815SRishi.Srivatsavai@Sun.COM typedef struct simnet_ioc_info {
57*9815SRishi.Srivatsavai@Sun.COM 	datalink_id_t	sii_link_id;
58*9815SRishi.Srivatsavai@Sun.COM 	datalink_id_t	sii_peer_link_id;
59*9815SRishi.Srivatsavai@Sun.COM 	uint_t		sii_type;	/* DL_ETHER or DL_WiFi */
60*9815SRishi.Srivatsavai@Sun.COM 	uint_t		sii_mac_len;
61*9815SRishi.Srivatsavai@Sun.COM 	uint_t		sii_flags;
62*9815SRishi.Srivatsavai@Sun.COM 	uchar_t		sii_mac_addr[MAXMACADDRLEN];
63*9815SRishi.Srivatsavai@Sun.COM } simnet_ioc_info_t;
64*9815SRishi.Srivatsavai@Sun.COM 
65*9815SRishi.Srivatsavai@Sun.COM typedef struct simnet_ioc_modify {
66*9815SRishi.Srivatsavai@Sun.COM 	datalink_id_t	sim_link_id;
67*9815SRishi.Srivatsavai@Sun.COM 	datalink_id_t	sim_peer_link_id;
68*9815SRishi.Srivatsavai@Sun.COM 	uint_t		sim_flags;
69*9815SRishi.Srivatsavai@Sun.COM } simnet_ioc_modify_t;
70*9815SRishi.Srivatsavai@Sun.COM 
71*9815SRishi.Srivatsavai@Sun.COM #ifdef	__cplusplus
72*9815SRishi.Srivatsavai@Sun.COM }
73*9815SRishi.Srivatsavai@Sun.COM #endif
74*9815SRishi.Srivatsavai@Sun.COM 
75*9815SRishi.Srivatsavai@Sun.COM #endif /* _SYS_SIMNET_H */
76