xref: /titanic_41/usr/src/lib/libdladm/common/libdlsim.h (revision b509e89b2befbaa42939abad9da1d7f5a8c6aaae)
1*b509e89bSRishi Srivatsavai /*
2*b509e89bSRishi Srivatsavai  * CDDL HEADER START
3*b509e89bSRishi Srivatsavai  *
4*b509e89bSRishi Srivatsavai  * The contents of this file are subject to the terms of the
5*b509e89bSRishi Srivatsavai  * Common Development and Distribution License (the "License").
6*b509e89bSRishi Srivatsavai  * You may not use this file except in compliance with the License.
7*b509e89bSRishi Srivatsavai  *
8*b509e89bSRishi Srivatsavai  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*b509e89bSRishi Srivatsavai  * or http://www.opensolaris.org/os/licensing.
10*b509e89bSRishi Srivatsavai  * See the License for the specific language governing permissions
11*b509e89bSRishi Srivatsavai  * and limitations under the License.
12*b509e89bSRishi Srivatsavai  *
13*b509e89bSRishi Srivatsavai  * When distributing Covered Code, include this CDDL HEADER in each
14*b509e89bSRishi Srivatsavai  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*b509e89bSRishi Srivatsavai  * If applicable, add the following below this CDDL HEADER, with the
16*b509e89bSRishi Srivatsavai  * fields enclosed by brackets "[]" replaced with your own identifying
17*b509e89bSRishi Srivatsavai  * information: Portions Copyright [yyyy] [name of copyright owner]
18*b509e89bSRishi Srivatsavai  *
19*b509e89bSRishi Srivatsavai  * CDDL HEADER END
20*b509e89bSRishi Srivatsavai  */
21*b509e89bSRishi Srivatsavai /*
22*b509e89bSRishi Srivatsavai  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23*b509e89bSRishi Srivatsavai  * Use is subject to license terms.
24*b509e89bSRishi Srivatsavai  */
25*b509e89bSRishi Srivatsavai 
26*b509e89bSRishi Srivatsavai #ifndef _LIBDLSIM_H
27*b509e89bSRishi Srivatsavai #define	_LIBDLSIM_H
28*b509e89bSRishi Srivatsavai 
29*b509e89bSRishi Srivatsavai #include <sys/mac.h>
30*b509e89bSRishi Srivatsavai #include <libdladm_impl.h>
31*b509e89bSRishi Srivatsavai #include <net/simnet.h>
32*b509e89bSRishi Srivatsavai 
33*b509e89bSRishi Srivatsavai #ifdef	__cplusplus
34*b509e89bSRishi Srivatsavai extern "C" {
35*b509e89bSRishi Srivatsavai #endif
36*b509e89bSRishi Srivatsavai 
37*b509e89bSRishi Srivatsavai typedef struct dladm_simnet_attr {
38*b509e89bSRishi Srivatsavai 	datalink_id_t		sna_link_id;
39*b509e89bSRishi Srivatsavai 	datalink_id_t		sna_peer_link_id;
40*b509e89bSRishi Srivatsavai 	uchar_t			sna_mac_addr[MAXMACADDRLEN];
41*b509e89bSRishi Srivatsavai 	uint_t			sna_mac_len;
42*b509e89bSRishi Srivatsavai 	uint_t			sna_type;
43*b509e89bSRishi Srivatsavai } dladm_simnet_attr_t;
44*b509e89bSRishi Srivatsavai 
45*b509e89bSRishi Srivatsavai dladm_status_t dladm_simnet_create(dladm_handle_t, const char *,
46*b509e89bSRishi Srivatsavai     uint_t, uint32_t);
47*b509e89bSRishi Srivatsavai dladm_status_t dladm_simnet_delete(dladm_handle_t, datalink_id_t, uint32_t);
48*b509e89bSRishi Srivatsavai dladm_status_t dladm_simnet_modify(dladm_handle_t, datalink_id_t,
49*b509e89bSRishi Srivatsavai     datalink_id_t, uint32_t);
50*b509e89bSRishi Srivatsavai dladm_status_t dladm_simnet_info(dladm_handle_t, datalink_id_t,
51*b509e89bSRishi Srivatsavai     dladm_simnet_attr_t *, uint32_t);
52*b509e89bSRishi Srivatsavai dladm_status_t dladm_simnet_up(dladm_handle_t, datalink_id_t, uint32_t);
53*b509e89bSRishi Srivatsavai 
54*b509e89bSRishi Srivatsavai #ifdef	__cplusplus
55*b509e89bSRishi Srivatsavai }
56*b509e89bSRishi Srivatsavai #endif
57*b509e89bSRishi Srivatsavai 
58*b509e89bSRishi Srivatsavai #endif /* _LIBDLSIM_H */
59