/***************************************************************************
* Copyright 2013 VMware, Inc. All rights reserved.
***************************************************************************/
/*
* @VMKAPIMOD_LICENSE@
*/
/*
***********************************************************************
* Port */ /**
* \addtogroup Network
* @{
* \defgroup Networking Port APIs
*
* The ports on virtual switch provide logical connection points
* among virtual devices and between virtual and physical devices.
*
* In vSphere platform, virtual switch implementation manages ports
* connected to virtual ethernet adapters in guest OSes (vNICs),
* virtual device in vmkernel (vmknic), physical adapters (uplinks),
* and internal ports (i.e. switch management port).
*
* Uplink ports are ports associated with physical adapters, providing
* a connection between a virtual network and a physical network.
* Physical adapters connect to uplink ports when they are initialized
* by a device driver or when the teaming policies for virtual switches
* are reconfigured. Vmkernel and physical adapters provide additional
* features on uplink ports, e.g. netqueue load balancer, IO resource
* management, hardware offloading.
*
* With vmk_SwitchPortID, switch implementation can call port APIs to
* control states and operations of ports, including uplinks.
*/
#ifndef _VMKAPI_NET_PORT_H_
#define _VMKAPI_NET_PORT_H_
/** \cond never */
#ifndef VMK_HEADER_INCLUDED_FROM_VMKAPI_H
#error This vmkapi file should never be included directly but only via vmkapi.h
#endif
/** \endcond never */
/**
* \brief Client Type for port connected to a vSwitch.
*/
typedef enum {
/** Unknown type **/
VMK_PORT_CLIENT_UNKNOWN = 0,
/** Port connect to a TCPIP stack **/
VMK_PORT_CLIENT_TCPIP = 1,
/** Port connected to a vNIC **/
VMK_PORT_CLIENT_VNIC = 2,
/** Port connected to a uplink **/
VMK_PORT_CLIENT_UPLINK = 3,
} vmk_PortClientType;
/*
***********************************************************************
* vmk_PortGetClientType -- */ /**
*
* \brief Get port client type
*
* \note The caller must hold a handle for the portset
* associated with the specified portID.
*
* \note This function will not block.
*
* \note The client type is only available when port connect is
* completed. Query the client during PortConnect callback may
* not return proper value.
*
* \param[in] portID Port identifier
* \param[out] type will contain vmk_PortClientType
* if return VMK_OK.
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM type is NULL.
* \retval VMK_NOT_FOUND Couldn't find a port with a matching
* port identifier.
***********************************************************************
*/
VMK_ReturnStatus
vmk_PortGetClientType(vmk_SwitchPortID portID,
vmk_PortClientType *type);
#endif /* _VMKAPI_NET_PORT_H_ */
/** @} */
/** @} */