iPXE
Data Structures | Macros | Functions | Variables
virtio-net.h File Reference

Go to the source code of this file.

Data Structures

struct  virtio_net_config
 
struct  virtio_net_hdr
 
struct  virtio_net_hdr_modern
 

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_MTU   3 /* Initial MTU advice */
 
#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 /* Driver can merge receive buffers. */
 
#define VIRTIO_NET_F_STATUS   16 /* Configuration status field is available. */
 
#define VIRTIO_NET_F_CTRL_VQ   17 /* Control channel is 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_GUEST_ANNOUNCE   21 /* Driver can send gratuitous packets. */
 
#define VIRTIO_NET_HDR_F_NEEDS_CSUM   1
 
#define VIRTIO_NET_HDR_GSO_NONE   0
 
#define VIRTIO_NET_HDR_GSO_TCPV4   1
 
#define VIRTIO_NET_HDR_GSO_TCPV4_ECN   2
 
#define VIRTIO_NET_HDR_GSO_UDP   3
 
#define VIRTIO_NET_HDR_GSO_TCPV6   4
 
#define VIRTIO_NET_HDR_GSO_ECN   0x80
 

Functions

struct virtio_net_config __attribute__ ((packed))
 

Variables

u8 mac [6]
 
u16 status
 
u16 max_virtqueue_pairs
 
u16 mtu
 
struct virtio_net_hdr __attribute__
 

Macro Definition Documentation

◆ VIRTIO_NET_F_CSUM

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

Definition at line 5 of file virtio-net.h.

◆ VIRTIO_NET_F_GUEST_CSUM

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

Definition at line 6 of file virtio-net.h.

◆ VIRTIO_NET_F_MTU

#define VIRTIO_NET_F_MTU   3 /* Initial MTU advice */

Definition at line 7 of file virtio-net.h.

◆ VIRTIO_NET_F_MAC

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

Definition at line 8 of file virtio-net.h.

◆ VIRTIO_NET_F_GSO

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

Definition at line 9 of file virtio-net.h.

◆ VIRTIO_NET_F_GUEST_TSO4

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

Definition at line 10 of file virtio-net.h.

◆ VIRTIO_NET_F_GUEST_TSO6

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

Definition at line 11 of file virtio-net.h.

◆ VIRTIO_NET_F_GUEST_ECN

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

Definition at line 12 of file virtio-net.h.

◆ VIRTIO_NET_F_GUEST_UFO

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

Definition at line 13 of file virtio-net.h.

◆ VIRTIO_NET_F_HOST_TSO4

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

Definition at line 14 of file virtio-net.h.

◆ VIRTIO_NET_F_HOST_TSO6

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

Definition at line 15 of file virtio-net.h.

◆ VIRTIO_NET_F_HOST_ECN

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

Definition at line 16 of file virtio-net.h.

◆ VIRTIO_NET_F_HOST_UFO

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

Definition at line 17 of file virtio-net.h.

◆ VIRTIO_NET_F_MRG_RXBUF

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

Definition at line 18 of file virtio-net.h.

◆ VIRTIO_NET_F_STATUS

#define VIRTIO_NET_F_STATUS   16 /* Configuration status field is available. */

Definition at line 19 of file virtio-net.h.

◆ VIRTIO_NET_F_CTRL_VQ

#define VIRTIO_NET_F_CTRL_VQ   17 /* Control channel is available. */

Definition at line 20 of file virtio-net.h.

◆ VIRTIO_NET_F_CTRL_RX

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

Definition at line 21 of file virtio-net.h.

◆ VIRTIO_NET_F_CTRL_VLAN

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

Definition at line 22 of file virtio-net.h.

◆ VIRTIO_NET_F_GUEST_ANNOUNCE

#define VIRTIO_NET_F_GUEST_ANNOUNCE   21 /* Driver can send gratuitous packets. */

Definition at line 23 of file virtio-net.h.

◆ VIRTIO_NET_HDR_F_NEEDS_CSUM

#define VIRTIO_NET_HDR_F_NEEDS_CSUM   1

Definition at line 45 of file virtio-net.h.

◆ VIRTIO_NET_HDR_GSO_NONE

#define VIRTIO_NET_HDR_GSO_NONE   0

Definition at line 47 of file virtio-net.h.

◆ VIRTIO_NET_HDR_GSO_TCPV4

#define VIRTIO_NET_HDR_GSO_TCPV4   1

Definition at line 48 of file virtio-net.h.

◆ VIRTIO_NET_HDR_GSO_TCPV4_ECN

#define VIRTIO_NET_HDR_GSO_TCPV4_ECN   2

Definition at line 50 of file virtio-net.h.

◆ VIRTIO_NET_HDR_GSO_UDP

#define VIRTIO_NET_HDR_GSO_UDP   3

Definition at line 51 of file virtio-net.h.

◆ VIRTIO_NET_HDR_GSO_TCPV6

#define VIRTIO_NET_HDR_GSO_TCPV6   4

Definition at line 52 of file virtio-net.h.

◆ VIRTIO_NET_HDR_GSO_ECN

#define VIRTIO_NET_HDR_GSO_ECN   0x80

Definition at line 53 of file virtio-net.h.

Function Documentation

◆ __attribute__()

struct virtio_net_config __attribute__ ( (packed)  )

Variable Documentation

◆ mac

u8 mac[6]

Definition at line 106 of file virtio-net.h.

◆ status

u16 status

Definition at line 108 of file virtio-net.h.

◆ max_virtqueue_pairs

u16 max_virtqueue_pairs

Definition at line 113 of file virtio-net.h.

◆ mtu

u16 mtu

Definition at line 115 of file virtio-net.h.

◆ __attribute__