1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * CDDL HEADER START
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * The contents of this file are subject to the terms of the
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * Common Development and Distribution License (the "License").
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * You may not use this file except in compliance with the License.
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * See the License for the specific language governing permissions
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * and limitations under the License.
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * When distributing Covered Code, include this CDDL HEADER in each
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * If applicable, add the following below this CDDL HEADER, with the
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * fields enclosed by brackets "[]" replaced with your own identifying
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * information: Portions Copyright [yyyy] [name of copyright owner]
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * CDDL HEADER END
7bd3a2e26cc8569257b88c1691d559138e1d32d0Sriharsha Basavapatna * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * Use is subject to license terms.
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoextern "C" {
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * VNET specific Control envelopes: 0x0100 - 0x01FF
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * type == VIO_TYPE_CTRL
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * subtype == VIO_SUBTYPE_{INFO|ACK|NACK}
1107ea9346159bcc8ea154084897667347c4e6d5Sriharsha Basavapatna#define VNET_PHYSLINK_INFO 0x0103 /* Physical Link Information */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * Vnet/Vswitch device attributes information message.
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * tag.msgtype == VIO_TYPE_CTRL
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * tag.submsgtype = VIO_SUBTYPE_{INFO|ACK|NACK}
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * tag.subtype_env == VIO_ATTR_INFO
17cadca83cc82e37ff517ea2783eb4bfcc07b950lm/* Value for 'addr_type' in vnet attribute message */
1107ea9346159bcc8ea154084897667347c4e6d5Sriharsha Basavapatna * Physical link property updates to be negotiated as part of attribute message
1107ea9346159bcc8ea154084897667347c4e6d5Sriharsha Basavapatna * exchange, in protocol versions >= 1.5. This is only valid between a vnet
1107ea9346159bcc8ea154084897667347c4e6d5Sriharsha Basavapatna * client and the corresponding vswitch service; and not between peer vnets. A
1107ea9346159bcc8ea154084897667347c4e6d5Sriharsha Basavapatna * vnet device could negotiate with vswitch to obtain updates about certain
1107ea9346159bcc8ea154084897667347c4e6d5Sriharsha Basavapatna * physical link properties. Only 'physical link status' updates are supported
1107ea9346159bcc8ea154084897667347c4e6d5Sriharsha Basavapatna * for now. A vnet device that desires to get physical link status updates,
1107ea9346159bcc8ea154084897667347c4e6d5Sriharsha Basavapatna * sets the appropriate bit(s) in its ATTR/INFO message to the vswitch; the
1107ea9346159bcc8ea154084897667347c4e6d5Sriharsha Basavapatna * vswitch sets the relevant ack/nack bits in its response message. Whenever
1107ea9346159bcc8ea154084897667347c4e6d5Sriharsha Basavapatna * there is a change in the physical link props for which the vnet device has
1107ea9346159bcc8ea154084897667347c4e6d5Sriharsha Basavapatna * negotiated, vswitch updates it by sending a message with updated values
1107ea9346159bcc8ea154084897667347c4e6d5Sriharsha Basavapatna * of the relevant physical link properties (see vnet_physlink_msg_t below).
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo /* Common tag */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo /* attributes specific payload */
1107ea9346159bcc8ea154084897667347c4e6d5Sriharsha Basavapatna uint8_t physlink_update; /* physlink updates(s)? */
7bd3a2e26cc8569257b88c1691d559138e1d32d0Sriharsha Basavapatna uint8_t options; /* options - dring mode */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo /* padding to align things */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * tag.msgtype == VIO_TYPE_CTRL
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * tag.subtype == VIO_SUBTYPE_{INFO|ACK|NACK}
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * tag.subtype_env == VNET_MCAST_INFO
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#define VNET_NUM_MCAST 7 /* max # of multicast addresses in the msg */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo /* Common tag */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo /* multicast address information */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo struct ether_addr mca[VNET_NUM_MCAST]; /* mcast addrs */
1107ea9346159bcc8ea154084897667347c4e6d5Sriharsha Basavapatna * Values of the various physical link properties. We
1107ea9346159bcc8ea154084897667347c4e6d5Sriharsha Basavapatna * support only 'link state' property updates for now.
1107ea9346159bcc8ea154084897667347c4e6d5Sriharsha Basavapatna * Vnet/Vswitch physical link info message.
1107ea9346159bcc8ea154084897667347c4e6d5Sriharsha Basavapatna * We only support link state information for now.
1107ea9346159bcc8ea154084897667347c4e6d5Sriharsha Basavapatna * tag.msgtype == VIO_TYPE_CTRL
1107ea9346159bcc8ea154084897667347c4e6d5Sriharsha Basavapatna * tag.subtype == VIO_SUBTYPE_{INFO|ACK|NACK}
1107ea9346159bcc8ea154084897667347c4e6d5Sriharsha Basavapatna * tag.subtype_env == VNET_PHYSLINK_INFO
1107ea9346159bcc8ea154084897667347c4e6d5Sriharsha Basavapatna /* Common tag */
1107ea9346159bcc8ea154084897667347c4e6d5Sriharsha Basavapatna /* physical link information */
1107ea9346159bcc8ea154084897667347c4e6d5Sriharsha Basavapatna /* padding to align things */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#endif /* _SYS_VNET_MAILBOX_H */