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