15084Sjohnlev /* 25084Sjohnlev * CDDL HEADER START 35084Sjohnlev * 45084Sjohnlev * The contents of this file are subject to the terms of the 55084Sjohnlev * Common Development and Distribution License (the "License"). 65084Sjohnlev * You may not use this file except in compliance with the License. 75084Sjohnlev * 85084Sjohnlev * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 95084Sjohnlev * or http://www.opensolaris.org/os/licensing. 105084Sjohnlev * See the License for the specific language governing permissions 115084Sjohnlev * and limitations under the License. 125084Sjohnlev * 135084Sjohnlev * When distributing Covered Code, include this CDDL HEADER in each 145084Sjohnlev * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 155084Sjohnlev * If applicable, add the following below this CDDL HEADER, with the 165084Sjohnlev * fields enclosed by brackets "[]" replaced with your own identifying 175084Sjohnlev * information: Portions Copyright [yyyy] [name of copyright owner] 185084Sjohnlev * 195084Sjohnlev * CDDL HEADER END 205084Sjohnlev */ 215084Sjohnlev /* 22*11878SVenu.Iyer@Sun.COM * Copyright 2010 Sun Microsystems, Inc. All rights reserved. 235084Sjohnlev * Use is subject to license terms. 245084Sjohnlev */ 255084Sjohnlev 265084Sjohnlev #ifndef _LIBDLVNIC_H 275084Sjohnlev #define _LIBDLVNIC_H 285084Sjohnlev 295084Sjohnlev #include <sys/types.h> 305084Sjohnlev #include <netinet/in.h> 315084Sjohnlev #include <libdladm.h> 328275SEric Cheng #include <libdladm_impl.h> 338275SEric Cheng #include <sys/mac_flow.h> 345084Sjohnlev #include <sys/vnic.h> 355084Sjohnlev 365084Sjohnlev #ifdef __cplusplus 375084Sjohnlev extern "C" { 385084Sjohnlev #endif 395084Sjohnlev 408275SEric Cheng typedef struct dladm_vnic_attr { 415895Syz147064 datalink_id_t va_vnic_id; 425895Syz147064 datalink_id_t va_link_id; 435084Sjohnlev vnic_mac_addr_type_t va_mac_addr_type; 445084Sjohnlev uint_t va_mac_len; 458275SEric Cheng uchar_t va_mac_addr[MAXMACADDRLEN]; 468275SEric Cheng int va_mac_slot; 478275SEric Cheng uint_t va_mac_prefix_len; 488275SEric Cheng uint16_t va_vid; 498275SEric Cheng boolean_t va_force; 5011076SCathy.Zhou@Sun.COM vrid_t va_vrid; 5111076SCathy.Zhou@Sun.COM int va_af; 528275SEric Cheng mac_resource_props_t va_resource_props; 538275SEric Cheng } dladm_vnic_attr_t; 545084Sjohnlev 558453SAnurag.Maskey@Sun.COM extern dladm_status_t dladm_vnic_create(dladm_handle_t, const char *, 568453SAnurag.Maskey@Sun.COM datalink_id_t, vnic_mac_addr_type_t, uchar_t *, 5711076SCathy.Zhou@Sun.COM uint_t, int *, uint_t, uint16_t, vrid_t, int, 5811076SCathy.Zhou@Sun.COM datalink_id_t *, dladm_arg_list_t *, uint32_t); 598275SEric Cheng 608453SAnurag.Maskey@Sun.COM extern dladm_status_t dladm_vnic_delete(dladm_handle_t, datalink_id_t, 618275SEric Cheng uint32_t); 628453SAnurag.Maskey@Sun.COM extern dladm_status_t dladm_vnic_info(dladm_handle_t, datalink_id_t, 638453SAnurag.Maskey@Sun.COM dladm_vnic_attr_t *, uint32_t); 648275SEric Cheng 658453SAnurag.Maskey@Sun.COM extern dladm_status_t dladm_vnic_up(dladm_handle_t, datalink_id_t, uint32_t); 668275SEric Cheng extern dladm_status_t dladm_vnic_str2macaddrtype(const char *, 678275SEric Cheng vnic_mac_addr_type_t *); 685084Sjohnlev #ifdef __cplusplus 695084Sjohnlev } 705084Sjohnlev #endif 715084Sjohnlev 725084Sjohnlev #endif /* _LIBDLVNIC_H */ 73