Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
virtio_net.h File Reference
#include <linux/types.h>
#include <linux/virtio_ids.h>
#include <linux/virtio_config.h>
#include <linux/if_ether.h>

Go to the source code of this file.

Data Structures

struct  virtio_net_config
 
struct  virtio_net_hdr
 
struct  virtio_net_hdr_mrg_rxbuf
 
struct  virtio_net_ctrl_hdr
 
struct  virtio_net_ctrl_mac
 

Macros

#define VIRTIO_NET_F_CSUM   0 /* Host handles pkts w/ partial csum */
 
#define VIRTIO_NET_F_GUEST_CSUM   1 /* Guest handles pkts w/ partial csum */
 
#define VIRTIO_NET_F_MAC   5 /* Host has given MAC address. */
 
#define VIRTIO_NET_F_GSO   6 /* Host handles pkts w/ any GSO type */
 
#define VIRTIO_NET_F_GUEST_TSO4   7 /* Guest can handle TSOv4 in. */
 
#define VIRTIO_NET_F_GUEST_TSO6   8 /* Guest can handle TSOv6 in. */
 
#define VIRTIO_NET_F_GUEST_ECN   9 /* Guest can handle TSO[6] w/ ECN in. */
 
#define VIRTIO_NET_F_GUEST_UFO   10 /* Guest can handle UFO in. */
 
#define VIRTIO_NET_F_HOST_TSO4   11 /* Host can handle TSOv4 in. */
 
#define VIRTIO_NET_F_HOST_TSO6   12 /* Host can handle TSOv6 in. */
 
#define VIRTIO_NET_F_HOST_ECN   13 /* Host can handle TSO[6] w/ ECN in. */
 
#define VIRTIO_NET_F_HOST_UFO   14 /* Host can handle UFO in. */
 
#define VIRTIO_NET_F_MRG_RXBUF   15 /* Host can merge receive buffers. */
 
#define VIRTIO_NET_F_STATUS   16 /* virtio_net_config.status available */
 
#define VIRTIO_NET_F_CTRL_VQ   17 /* Control channel available */
 
#define VIRTIO_NET_F_CTRL_RX   18 /* Control channel RX mode support */
 
#define VIRTIO_NET_F_CTRL_VLAN   19 /* Control channel VLAN filtering */
 
#define VIRTIO_NET_F_CTRL_RX_EXTRA   20 /* Extra RX mode control support */
 
#define VIRTIO_NET_F_GUEST_ANNOUNCE
 
#define VIRTIO_NET_S_LINK_UP   1 /* Link is up */
 
#define VIRTIO_NET_S_ANNOUNCE   2 /* Announcement is needed */
 
#define VIRTIO_NET_HDR_F_NEEDS_CSUM   1
 
#define VIRTIO_NET_HDR_F_DATA_VALID   2
 
#define VIRTIO_NET_HDR_GSO_NONE   0
 
#define VIRTIO_NET_HDR_GSO_TCPV4   1
 
#define VIRTIO_NET_HDR_GSO_UDP   3
 
#define VIRTIO_NET_HDR_GSO_TCPV6   4
 
#define VIRTIO_NET_HDR_GSO_ECN   0x80
 
#define VIRTIO_NET_OK   0
 
#define VIRTIO_NET_ERR   1
 
#define VIRTIO_NET_CTRL_RX   0
 
#define VIRTIO_NET_CTRL_RX_PROMISC   0
 
#define VIRTIO_NET_CTRL_RX_ALLMULTI   1
 
#define VIRTIO_NET_CTRL_RX_ALLUNI   2
 
#define VIRTIO_NET_CTRL_RX_NOMULTI   3
 
#define VIRTIO_NET_CTRL_RX_NOUNI   4
 
#define VIRTIO_NET_CTRL_RX_NOBCAST   5
 
#define VIRTIO_NET_CTRL_MAC   1
 
#define VIRTIO_NET_CTRL_MAC_TABLE_SET   0
 
#define VIRTIO_NET_CTRL_VLAN   2
 
#define VIRTIO_NET_CTRL_VLAN_ADD   0
 
#define VIRTIO_NET_CTRL_VLAN_DEL   1
 
#define VIRTIO_NET_CTRL_ANNOUNCE   3
 
#define VIRTIO_NET_CTRL_ANNOUNCE_ACK   0
 

Typedefs

typedef __u8 virtio_net_ctrl_ack
 

Functions

struct virtio_net_config __attribute__ ((packed))
 

Variables

__u8 mac [6]
 
__u16 status
 
struct virtio_net_hdr __attribute__
 
__u8 class
 
__u8 cmd
 
__u32 entries
 
__u8 macs [][ETH_ALEN]
 

Macro Definition Documentation

#define VIRTIO_NET_CTRL_ANNOUNCE   3

Definition at line 165 of file virtio_net.h.

#define VIRTIO_NET_CTRL_ANNOUNCE_ACK   0

Definition at line 166 of file virtio_net.h.

#define VIRTIO_NET_CTRL_MAC   1

Definition at line 141 of file virtio_net.h.

#define VIRTIO_NET_CTRL_MAC_TABLE_SET   0

Definition at line 142 of file virtio_net.h.

#define VIRTIO_NET_CTRL_RX   0

Definition at line 113 of file virtio_net.h.

#define VIRTIO_NET_CTRL_RX_ALLMULTI   1

Definition at line 115 of file virtio_net.h.

#define VIRTIO_NET_CTRL_RX_ALLUNI   2

Definition at line 116 of file virtio_net.h.

#define VIRTIO_NET_CTRL_RX_NOBCAST   5

Definition at line 119 of file virtio_net.h.

#define VIRTIO_NET_CTRL_RX_NOMULTI   3

Definition at line 117 of file virtio_net.h.

#define VIRTIO_NET_CTRL_RX_NOUNI   4

Definition at line 118 of file virtio_net.h.

#define VIRTIO_NET_CTRL_RX_PROMISC   0

Definition at line 114 of file virtio_net.h.

#define VIRTIO_NET_CTRL_VLAN   2

Definition at line 153 of file virtio_net.h.

#define VIRTIO_NET_CTRL_VLAN_ADD   0

Definition at line 154 of file virtio_net.h.

#define VIRTIO_NET_CTRL_VLAN_DEL   1

Definition at line 155 of file virtio_net.h.

#define VIRTIO_NET_ERR   1

Definition at line 104 of file virtio_net.h.

#define VIRTIO_NET_F_CSUM   0 /* Host handles pkts w/ partial csum */

Definition at line 34 of file virtio_net.h.

#define VIRTIO_NET_F_CTRL_RX   18 /* Control channel RX mode support */

Definition at line 49 of file virtio_net.h.

#define VIRTIO_NET_F_CTRL_RX_EXTRA   20 /* Extra RX mode control support */

Definition at line 51 of file virtio_net.h.

#define VIRTIO_NET_F_CTRL_VLAN   19 /* Control channel VLAN filtering */

Definition at line 50 of file virtio_net.h.

#define VIRTIO_NET_F_CTRL_VQ   17 /* Control channel available */

Definition at line 48 of file virtio_net.h.

#define VIRTIO_NET_F_GSO   6 /* Host handles pkts w/ any GSO type */

Definition at line 37 of file virtio_net.h.

#define VIRTIO_NET_F_GUEST_ANNOUNCE
Value:
21 /* Guest can announce device on the
* network */

Definition at line 52 of file virtio_net.h.

#define VIRTIO_NET_F_GUEST_CSUM   1 /* Guest handles pkts w/ partial csum */

Definition at line 35 of file virtio_net.h.

#define VIRTIO_NET_F_GUEST_ECN   9 /* Guest can handle TSO[6] w/ ECN in. */

Definition at line 40 of file virtio_net.h.

#define VIRTIO_NET_F_GUEST_TSO4   7 /* Guest can handle TSOv4 in. */

Definition at line 38 of file virtio_net.h.

#define VIRTIO_NET_F_GUEST_TSO6   8 /* Guest can handle TSOv6 in. */

Definition at line 39 of file virtio_net.h.

#define VIRTIO_NET_F_GUEST_UFO   10 /* Guest can handle UFO in. */

Definition at line 41 of file virtio_net.h.

#define VIRTIO_NET_F_HOST_ECN   13 /* Host can handle TSO[6] w/ ECN in. */

Definition at line 44 of file virtio_net.h.

#define VIRTIO_NET_F_HOST_TSO4   11 /* Host can handle TSOv4 in. */

Definition at line 42 of file virtio_net.h.

#define VIRTIO_NET_F_HOST_TSO6   12 /* Host can handle TSOv6 in. */

Definition at line 43 of file virtio_net.h.

#define VIRTIO_NET_F_HOST_UFO   14 /* Host can handle UFO in. */

Definition at line 45 of file virtio_net.h.

#define VIRTIO_NET_F_MAC   5 /* Host has given MAC address. */

Definition at line 36 of file virtio_net.h.

#define VIRTIO_NET_F_MRG_RXBUF   15 /* Host can merge receive buffers. */

Definition at line 46 of file virtio_net.h.

#define VIRTIO_NET_F_STATUS   16 /* virtio_net_config.status available */

Definition at line 47 of file virtio_net.h.

#define VIRTIO_NET_HDR_F_DATA_VALID   2

Definition at line 68 of file virtio_net.h.

#define VIRTIO_NET_HDR_F_NEEDS_CSUM   1

Definition at line 67 of file virtio_net.h.

#define VIRTIO_NET_HDR_GSO_ECN   0x80

Definition at line 74 of file virtio_net.h.

#define VIRTIO_NET_HDR_GSO_NONE   0

Definition at line 70 of file virtio_net.h.

#define VIRTIO_NET_HDR_GSO_TCPV4   1

Definition at line 71 of file virtio_net.h.

#define VIRTIO_NET_HDR_GSO_TCPV6   4

Definition at line 73 of file virtio_net.h.

#define VIRTIO_NET_HDR_GSO_UDP   3

Definition at line 72 of file virtio_net.h.

#define VIRTIO_NET_OK   0

Definition at line 103 of file virtio_net.h.

#define VIRTIO_NET_S_ANNOUNCE   2 /* Announcement is needed */

Definition at line 55 of file virtio_net.h.

#define VIRTIO_NET_S_LINK_UP   1 /* Link is up */

Definition at line 54 of file virtio_net.h.

Typedef Documentation

Definition at line 101 of file virtio_net.h.

Function Documentation

struct virtio_net_config __attribute__ ( (packed)  )
read

mcontroller : adapter info structure for old mimd_t apps

: base address : irq number : number of logical drives : pci bus : pci device : pci function : pci id : vendor id : slot number : unique id

Definition at line 171 of file esd_usb2.c.

Variable Documentation

Definition at line 100 of file virtio_net.h.

Definition at line 101 of file virtio_net.h.

__u32 entries

Definition at line 140 of file virtio_net.h.

__u8 mac[6]

Definition at line 64 of file virtio_net.h.

__u8 macs[][ETH_ALEN]

Definition at line 141 of file virtio_net.h.

Definition at line 66 of file virtio_net.h.