Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
hyperv_net.h File Reference
#include <linux/list.h>
#include <linux/hyperv.h>
#include <linux/rndis.h>

Go to the source code of this file.

Data Structures

struct  xferpage_packet
 
struct  hv_netvsc_packet
 
struct  netvsc_device_info
 
struct  rndis_device
 
struct  nvsp_message_header
 
struct  nvsp_message_init
 
struct  nvsp_message_init_complete
 
union  nvsp_message_init_uber
 
struct  nvsp_1_message_send_ndis_version
 
struct  nvsp_1_message_send_receive_buffer
 
struct  nvsp_1_receive_buffer_section
 
struct  nvsp_1_message_send_receive_buffer_complete
 
struct  nvsp_1_message_revoke_receive_buffer
 
struct  nvsp_1_message_send_send_buffer
 
struct  nvsp_1_message_send_send_buffer_complete
 
struct  nvsp_1_message_revoke_send_buffer
 
struct  nvsp_1_message_send_rndis_packet
 
struct  nvsp_1_message_send_rndis_packet_complete
 
union  nvsp_1_message_uber
 
struct  nvsp_2_vsc_capability
 
struct  nvsp_2_send_ndis_config
 
struct  nvsp_2_alloc_rxbuf
 
struct  nvsp_2_alloc_rxbuf_comp
 
struct  nvsp_2_free_rxbuf
 
union  nvsp_2_message_uber
 
union  nvsp_all_messages
 
struct  nvsp_message
 
struct  netvsc_device
 
struct  rndis_initialize_request
 
struct  rndis_initialize_complete
 
struct  rndis_co_address_family
 
struct  rndis_halt_request
 
struct  rndis_query_request
 
struct  rndis_query_complete
 
struct  rndis_set_request
 
struct  rndis_set_complete
 
struct  rndis_reset_request
 
struct  rndis_reset_complete
 
struct  rndis_indicate_status
 
struct  rndis_diagnostic_info
 
struct  rndis_keepalive_request
 
struct  rndis_keepalive_complete
 
struct  rndis_packet
 
struct  rndis_oobd
 
struct  rndis_per_packet_info
 
struct  ndis_pkt_8021q_info
 
struct  rndis_config_parameter_info
 
struct  rcondis_mp_create_vc
 
struct  rcondis_mp_create_vc_complete
 
struct  rcondis_mp_delete_vc
 
struct  rcondis_mp_delete_vc_complete
 
struct  rcondis_mp_query_request
 
struct  rcondis_mp_set_request
 
struct  rcondis_indicate_status
 
struct  rcondis_specific_parameters
 
struct  rcondis_media_parameters
 
struct  rndis_flowspec
 
struct  rcondis_call_manager_parameters
 
struct  rcondis_mp_activate_vc_request
 
struct  rcondis_mp_activate_vc_complete
 
struct  rcondis_mp_deactivate_vc_request
 
struct  rcondis_mp_deactivate_vc_complete
 
union  rndis_message_container
 
struct  rndis_message
 
struct  rndis_filter_packet
 

Macros

#define NVSP_INVALID_PROTOCOL_VERSION   ((u32)0xFFFFFFFF)
 
#define NVSP_PROTOCOL_VERSION_1   2
 
#define NVSP_PROTOCOL_VERSION_2   0x30002
 
#define NETVSC_MTU   65536
 
#define NETVSC_RECEIVE_BUFFER_SIZE   (1024*1024*2) /* 2MB */
 
#define NETVSC_RECEIVE_BUFFER_ID   0xcafe
 
#define NETVSC_RECEIVE_PACKETLIST_COUNT   256
 
#define NETVSC_PACKET_SIZE   2048
 
#define NDIS_VLAN_PPI_SIZE
 
#define RNDIS_CONFIG_PARAM_TYPE_INTEGER   0
 
#define RNDIS_CONFIG_PARAM_TYPE_STRING   2
 
#define RNDIS_MESSAGE_SIZE(msg)
 
#define MESSAGE_TO_INFO_BUFFER(msg)   (((unsigned char *)(msg)) + msg->info_buf_offset)
 
#define MESSAGE_TO_STATUS_BUFFER(msg)   (((unsigned char *)(msg)) + msg->status_buf_offset)
 
#define MESSAGE_TO_OOBD_BUFFER(msg)   (((unsigned char *)(msg)) + msg->oob_data_offset)
 
#define MESSAGE_TO_DATA_BUFFER(msg)   (((unsigned char *)(msg)) + msg->per_pkt_info_offset)
 
#define RNDIS_MESSAGE_PTR_TO_MESSAGE_PTR(rndis_msg)   ((void *) &rndis_msg->msg)
 
#define RNDIS_MESSAGE_RAW_PTR_TO_MESSAGE_PTR(rndis_msg)   ((void *) rndis_msg)
 
#define __struct_bcount(x)
 
#define RNDIS_HEADER_SIZE
 
#define NDIS_PACKET_TYPE_DIRECTED   0x00000001
 
#define NDIS_PACKET_TYPE_MULTICAST   0x00000002
 
#define NDIS_PACKET_TYPE_ALL_MULTICAST   0x00000004
 
#define NDIS_PACKET_TYPE_BROADCAST   0x00000008
 
#define NDIS_PACKET_TYPE_SOURCE_ROUTING   0x00000010
 
#define NDIS_PACKET_TYPE_PROMISCUOUS   0x00000020
 
#define NDIS_PACKET_TYPE_SMT   0x00000040
 
#define NDIS_PACKET_TYPE_ALL_LOCAL   0x00000080
 
#define NDIS_PACKET_TYPE_GROUP   0x00000100
 
#define NDIS_PACKET_TYPE_ALL_FUNCTIONAL   0x00000200
 
#define NDIS_PACKET_TYPE_FUNCTIONAL   0x00000400
 
#define NDIS_PACKET_TYPE_MAC_FRAME   0x00000800
 

Enumerations

enum  rndis_device_state { RNDIS_DEV_UNINITIALIZED = 0, RNDIS_DEV_INITIALIZING, RNDIS_DEV_INITIALIZED, RNDIS_DEV_DATAINITIALIZED }
 
enum  {
  NVSP_MSG_TYPE_NONE = 0, NVSP_MSG_TYPE_INIT = 1, NVSP_MSG_TYPE_INIT_COMPLETE = 2, NVSP_VERSION_MSG_START = 100,
  NVSP_MSG1_TYPE_SEND_NDIS_VER = NVSP_VERSION_MSG_START, NVSP_MSG1_TYPE_SEND_RECV_BUF, NVSP_MSG1_TYPE_SEND_RECV_BUF_COMPLETE, NVSP_MSG1_TYPE_REVOKE_RECV_BUF,
  NVSP_MSG1_TYPE_SEND_SEND_BUF, NVSP_MSG1_TYPE_SEND_SEND_BUF_COMPLETE, NVSP_MSG1_TYPE_REVOKE_SEND_BUF, NVSP_MSG1_TYPE_SEND_RNDIS_PKT,
  NVSP_MSG1_TYPE_SEND_RNDIS_PKT_COMPLETE, NVSP_MSG2_TYPE_SEND_CHIMNEY_DELEGATED_BUF, NVSP_MSG2_TYPE_SEND_CHIMNEY_DELEGATED_BUF_COMP, NVSP_MSG2_TYPE_REVOKE_CHIMNEY_DELEGATED_BUF,
  NVSP_MSG2_TYPE_RESUME_CHIMNEY_RX_INDICATION, NVSP_MSG2_TYPE_TERMINATE_CHIMNEY, NVSP_MSG2_TYPE_TERMINATE_CHIMNEY_COMP, NVSP_MSG2_TYPE_INDICATE_CHIMNEY_EVENT,
  NVSP_MSG2_TYPE_SEND_CHIMNEY_PKT, NVSP_MSG2_TYPE_SEND_CHIMNEY_PKT_COMP, NVSP_MSG2_TYPE_POST_CHIMNEY_RECV_REQ, NVSP_MSG2_TYPE_POST_CHIMNEY_RECV_REQ_COMP,
  NVSP_MSG2_TYPE_ALLOC_RXBUF, NVSP_MSG2_TYPE_ALLOC_RXBUF_COMP, NVSP_MSG2_TYPE_FREE_RXBUF, NVSP_MSG2_TYPE_SEND_VMQ_RNDIS_PKT,
  NVSP_MSG2_TYPE_SEND_VMQ_RNDIS_PKT_COMP, NVSP_MSG2_TYPE_SEND_NDIS_CONFIG, NVSP_MSG2_TYPE_ALLOC_CHIMNEY_HANDLE, NVSP_MSG2_TYPE_ALLOC_CHIMNEY_HANDLE_COMP
}
 
enum  {
  NVSP_STAT_NONE = 0, NVSP_STAT_SUCCESS, NVSP_STAT_FAIL, NVSP_STAT_PROTOCOL_TOO_NEW,
  NVSP_STAT_PROTOCOL_TOO_OLD, NVSP_STAT_INVALID_RNDIS_PKT, NVSP_STAT_BUSY, NVSP_STAT_PROTOCOL_UNSUPPORTED,
  NVSP_STAT_MAX
}
 
enum  ndis_per_pkt_info_type {
  TCPIP_CHKSUM_PKTINFO, IPSEC_PKTINFO, TCP_LARGESEND_PKTINFO, CLASSIFICATION_HANDLE_PKTINFO,
  NDIS_RESERVED, SG_LIST_PKTINFO, IEEE_8021Q_INFO, ORIGINAL_PKTINFO,
  PACKET_CANCEL_ID, ORIGINAL_NET_BUFLIST, CACHED_NET_BUFLIST, SHORT_PKT_PADINFO,
  MAX_PER_PKT_INFO
}
 

Functions

int netvsc_device_add (struct hv_device *device, void *additional_info)
 
int netvsc_device_remove (struct hv_device *device)
 
int netvsc_send (struct hv_device *device, struct hv_netvsc_packet *packet)
 
void netvsc_linkstatus_callback (struct hv_device *device_obj, unsigned int status)
 
int netvsc_recv_callback (struct hv_device *device_obj, struct hv_netvsc_packet *packet)
 
int rndis_filter_open (struct hv_device *dev)
 
int rndis_filter_close (struct hv_device *dev)
 
int rndis_filter_device_add (struct hv_device *dev, void *additional_info)
 
void rndis_filter_device_remove (struct hv_device *dev)
 
int rndis_filter_receive (struct hv_device *dev, struct hv_netvsc_packet *pkt)
 
int rndis_filter_send (struct hv_device *dev, struct hv_netvsc_packet *pkt)
 
int rndis_filter_set_packet_filter (struct rndis_device *dev, u32 new_filter)
 
int rndis_filter_set_device_mac (struct hv_device *hdev, char *mac)
 

Variables

struct nvsp_message_init __packed
 

Macro Definition Documentation

#define __struct_bcount (   x)

Definition at line 889 of file hyperv_net.h.

#define MESSAGE_TO_DATA_BUFFER (   msg)    (((unsigned char *)(msg)) + msg->per_pkt_info_offset)

Definition at line 877 of file hyperv_net.h.

#define MESSAGE_TO_INFO_BUFFER (   msg)    (((unsigned char *)(msg)) + msg->info_buf_offset)

Definition at line 865 of file hyperv_net.h.

#define MESSAGE_TO_OOBD_BUFFER (   msg)    (((unsigned char *)(msg)) + msg->oob_data_offset)

Definition at line 873 of file hyperv_net.h.

#define MESSAGE_TO_STATUS_BUFFER (   msg)    (((unsigned char *)(msg)) + msg->status_buf_offset)

Definition at line 869 of file hyperv_net.h.

#define NDIS_PACKET_TYPE_ALL_FUNCTIONAL   0x00000200

Definition at line 905 of file hyperv_net.h.

#define NDIS_PACKET_TYPE_ALL_LOCAL   0x00000080

Definition at line 903 of file hyperv_net.h.

#define NDIS_PACKET_TYPE_ALL_MULTICAST   0x00000004

Definition at line 898 of file hyperv_net.h.

#define NDIS_PACKET_TYPE_BROADCAST   0x00000008

Definition at line 899 of file hyperv_net.h.

#define NDIS_PACKET_TYPE_DIRECTED   0x00000001

Definition at line 896 of file hyperv_net.h.

#define NDIS_PACKET_TYPE_FUNCTIONAL   0x00000400

Definition at line 906 of file hyperv_net.h.

#define NDIS_PACKET_TYPE_GROUP   0x00000100

Definition at line 904 of file hyperv_net.h.

#define NDIS_PACKET_TYPE_MAC_FRAME   0x00000800

Definition at line 907 of file hyperv_net.h.

#define NDIS_PACKET_TYPE_MULTICAST   0x00000002

Definition at line 897 of file hyperv_net.h.

#define NDIS_PACKET_TYPE_PROMISCUOUS   0x00000020

Definition at line 901 of file hyperv_net.h.

#define NDIS_PACKET_TYPE_SMT   0x00000040

Definition at line 902 of file hyperv_net.h.

#define NDIS_PACKET_TYPE_SOURCE_ROUTING   0x00000010

Definition at line 900 of file hyperv_net.h.

#define NDIS_VLAN_PPI_SIZE
Value:

Definition at line 675 of file hyperv_net.h.

#define NETVSC_MTU   65536

Definition at line 464 of file hyperv_net.h.

#define NETVSC_PACKET_SIZE   2048

Definition at line 473 of file hyperv_net.h.

#define NETVSC_RECEIVE_BUFFER_ID   0xcafe

Definition at line 468 of file hyperv_net.h.

#define NETVSC_RECEIVE_BUFFER_SIZE   (1024*1024*2) /* 2MB */

Definition at line 466 of file hyperv_net.h.

#define NETVSC_RECEIVE_PACKETLIST_COUNT   256

Definition at line 471 of file hyperv_net.h.

#define NVSP_INVALID_PROTOCOL_VERSION   ((u32)0xFFFFFFFF)

Definition at line 139 of file hyperv_net.h.

#define NVSP_PROTOCOL_VERSION_1   2

Definition at line 141 of file hyperv_net.h.

#define NVSP_PROTOCOL_VERSION_2   0x30002

Definition at line 142 of file hyperv_net.h.

#define RNDIS_CONFIG_PARAM_TYPE_INTEGER   0

Definition at line 689 of file hyperv_net.h.

#define RNDIS_CONFIG_PARAM_TYPE_STRING   2

Definition at line 690 of file hyperv_net.h.

#define RNDIS_HEADER_SIZE
Value:
(sizeof(struct rndis_message) - \

Definition at line 893 of file hyperv_net.h.

#define RNDIS_MESSAGE_PTR_TO_MESSAGE_PTR (   rndis_msg)    ((void *) &rndis_msg->msg)

Definition at line 881 of file hyperv_net.h.

#define RNDIS_MESSAGE_RAW_PTR_TO_MESSAGE_PTR (   rndis_msg)    ((void *) rndis_msg)

Definition at line 885 of file hyperv_net.h.

#define RNDIS_MESSAGE_SIZE (   msg)
Value:
(sizeof(msg) + (sizeof(struct rndis_message) - \
sizeof(union rndis_message_container)))

Definition at line 860 of file hyperv_net.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
NVSP_MSG_TYPE_NONE 
NVSP_MSG_TYPE_INIT 
NVSP_MSG_TYPE_INIT_COMPLETE 
NVSP_VERSION_MSG_START 
NVSP_MSG1_TYPE_SEND_NDIS_VER 
NVSP_MSG1_TYPE_SEND_RECV_BUF 
NVSP_MSG1_TYPE_SEND_RECV_BUF_COMPLETE 
NVSP_MSG1_TYPE_REVOKE_RECV_BUF 
NVSP_MSG1_TYPE_SEND_SEND_BUF 
NVSP_MSG1_TYPE_SEND_SEND_BUF_COMPLETE 
NVSP_MSG1_TYPE_REVOKE_SEND_BUF 
NVSP_MSG1_TYPE_SEND_RNDIS_PKT 
NVSP_MSG1_TYPE_SEND_RNDIS_PKT_COMPLETE 
NVSP_MSG2_TYPE_SEND_CHIMNEY_DELEGATED_BUF 
NVSP_MSG2_TYPE_SEND_CHIMNEY_DELEGATED_BUF_COMP 
NVSP_MSG2_TYPE_REVOKE_CHIMNEY_DELEGATED_BUF 
NVSP_MSG2_TYPE_RESUME_CHIMNEY_RX_INDICATION 
NVSP_MSG2_TYPE_TERMINATE_CHIMNEY 
NVSP_MSG2_TYPE_TERMINATE_CHIMNEY_COMP 
NVSP_MSG2_TYPE_INDICATE_CHIMNEY_EVENT 
NVSP_MSG2_TYPE_SEND_CHIMNEY_PKT 
NVSP_MSG2_TYPE_SEND_CHIMNEY_PKT_COMP 
NVSP_MSG2_TYPE_POST_CHIMNEY_RECV_REQ 
NVSP_MSG2_TYPE_POST_CHIMNEY_RECV_REQ_COMP 
NVSP_MSG2_TYPE_ALLOC_RXBUF 
NVSP_MSG2_TYPE_ALLOC_RXBUF_COMP 
NVSP_MSG2_TYPE_FREE_RXBUF 
NVSP_MSG2_TYPE_SEND_VMQ_RNDIS_PKT 
NVSP_MSG2_TYPE_SEND_VMQ_RNDIS_PKT_COMP 
NVSP_MSG2_TYPE_SEND_NDIS_CONFIG 
NVSP_MSG2_TYPE_ALLOC_CHIMNEY_HANDLE 
NVSP_MSG2_TYPE_ALLOC_CHIMNEY_HANDLE_COMP 

Definition at line 144 of file hyperv_net.h.

anonymous enum
Enumerator:
NVSP_STAT_NONE 
NVSP_STAT_SUCCESS 
NVSP_STAT_FAIL 
NVSP_STAT_PROTOCOL_TOO_NEW 
NVSP_STAT_PROTOCOL_TOO_OLD 
NVSP_STAT_INVALID_RNDIS_PKT 
NVSP_STAT_BUSY 
NVSP_STAT_PROTOCOL_UNSUPPORTED 
NVSP_STAT_MAX 

Definition at line 199 of file hyperv_net.h.

Enumerator:
TCPIP_CHKSUM_PKTINFO 
IPSEC_PKTINFO 
TCP_LARGESEND_PKTINFO 
CLASSIFICATION_HANDLE_PKTINFO 
NDIS_RESERVED 
SG_LIST_PKTINFO 
IEEE_8021Q_INFO 
ORIGINAL_PKTINFO 
PACKET_CANCEL_ID 
ORIGINAL_NET_BUFLIST 
CACHED_NET_BUFLIST 
SHORT_PKT_PADINFO 
MAX_PER_PKT_INFO 

Definition at line 647 of file hyperv_net.h.

Enumerator:
RNDIS_DEV_UNINITIALIZED 
RNDIS_DEV_INITIALIZING 
RNDIS_DEV_INITIALIZED 
RNDIS_DEV_DATAINITIALIZED 

Definition at line 92 of file hyperv_net.h.

Function Documentation

int netvsc_device_add ( struct hv_device *  device,
void additional_info 
)

Definition at line 881 of file netvsc.c.

int netvsc_device_remove ( struct hv_device *  device)

Definition at line 379 of file netvsc.c.

void netvsc_linkstatus_callback ( struct hv_device *  device_obj,
unsigned int  status 
)

Definition at line 226 of file netvsc_drv.c.

int netvsc_recv_callback ( struct hv_device *  device_obj,
struct hv_netvsc_packet packet 
)

Definition at line 258 of file netvsc_drv.c.

int netvsc_send ( struct hv_device *  device,
struct hv_netvsc_packet packet 
)

Definition at line 494 of file netvsc.c.

int rndis_filter_close ( struct hv_device *  dev)

Definition at line 897 of file rndis_filter.c.

int rndis_filter_device_add ( struct hv_device *  dev,
void additional_info 
)

Definition at line 815 of file rndis_filter.c.

void rndis_filter_device_remove ( struct hv_device *  dev)

Definition at line 872 of file rndis_filter.c.

int rndis_filter_open ( struct hv_device *  dev)

Definition at line 887 of file rndis_filter.c.

int rndis_filter_receive ( struct hv_device *  dev,
struct hv_netvsc_packet pkt 
)

Definition at line 409 of file rndis_filter.c.

int rndis_filter_send ( struct hv_device *  dev,
struct hv_netvsc_packet pkt 
)

Definition at line 907 of file rndis_filter.c.

int rndis_filter_set_device_mac ( struct hv_device *  hdev,
char mac 
)

Definition at line 549 of file rndis_filter.c.

int rndis_filter_set_packet_filter ( struct rndis_device dev,
u32  new_filter 
)

Definition at line 637 of file rndis_filter.c.

Variable Documentation