Versions in this module Expand all Collapse all v0 v0.1.1 Jun 9, 2026 v0.1.0 Jun 9, 2026 Changes in this version + const AcceptedFeatures + const CfgOffsetMAC + const CfgOffsetMTU + const CfgOffsetMaxVirtqueuePairs + const CfgOffsetStatus + const FeatureCSUM + const FeatureGuestCSUM + const FeatureGuestTSO4 + const FeatureGuestTSO6 + const FeatureHostTSO4 + const FeatureHostTSO6 + const FeatureMAC + const FeatureMQ + const FeatureMTU + const FeatureMrgRxbuf + const FeatureStatus + const GSOECN + const GSONone + const GSOTCPv4 + const GSOTCPv6 + const GSOUDP + const HdrFDataValid + const HdrFNeedsCsum + const MACLen + const MaxFrameSize + const RxQueueIdx + const RxRingSize + const TxPollIterations + const TxQueueIdx + const TxRingSize + const VirtioNetHdrSize + var ErrBufferTooSmall = commonNetError(...) + var ErrFeaturesNotOK = commonNetError("go-virtio/net: FEATURES_OK status bit didn't stick after DriverFeature write") + var ErrFrameTooShort = commonNetError("go-virtio/net: RX buffer shorter than virtio_net_hdr (12 bytes)") + var ErrInitWrongDeviceID = commonNetError("go-virtio/net: PCI device ID is not 0x1041 (modern net device)") + var ErrMACReadFailed = commonNetError(...) + var ErrNoMACFeature = commonNetError("go-virtio/net: device doesn't offer VIRTIO_NET_F_MAC") + var ErrNotModernDevice = commonNetError("go-virtio/net: device doesn't offer VIRTIO_F_VERSION_1 (legacy-only)") + var ErrQueueNotAvailable = commonNetError("go-virtio/net: device reports QueueSize=0 for required queue") + var ErrReceiveTimeout = commonNetError("go-virtio/net: RX poll timeout (no frame received within budget)") + var ErrTransmitTimeout = commonNetError("go-virtio/net: TX poll timeout (device did not return descriptor)") + func AcceptFeatures(deviceFeatures uint64) (uint64, error) + func PrependVirtioNetHdr(frame []byte) []byte + func StripVirtioNetHdr(buf []byte) ([]byte, error) + type MAC6 [6]byte + func (m MAC6) IsZero() bool + func (m MAC6) String() string + type VirtioNet struct + Cfg *common.ModernConfig + MAC MAC6 + NegotiatedFeatures uint64 + func OpenVirtioNet(t common.Transport) (*VirtioNet, error) + func OpenVirtioNetWithFeatures(t common.Transport, acceptedFeatures uint64) (*VirtioNet, error) + func (v *VirtioNet) ReceiveFrame(pollIterations int) ([]byte, error) + func (v *VirtioNet) RxQueue() *common.Virtqueue + func (v *VirtioNet) TransmitFrame(frame []byte) error + func (v *VirtioNet) TxQueue() *common.Virtqueue + type VirtioNetHdr struct + CsumOffset uint16 + CsumStart uint16 + Flags uint8 + GSOSize uint16 + GSOType uint8 + HdrLen uint16 + NumBuffers uint16