Function

vmnet_read

Attempts to read a specified number of packets from an interface.

Declaration

vmnet_return_t vmnet_read(interface_ref interface, struct vmpktdesc *packets, int *pktcnt);

Parameters

interface

The interface reference.

packets

On return, this parameter is populated with an array of packets read.

pktcnt

The number of packets to read.

On return, this parameter is populated with the number of packets read, or 0 no packets are available to be read.

Return Value

Returns vmnet on success, or an error code on failure. See vmnet for possible values.

Discussion

Each packet buffer passed should be at least as large as the value of vmnet_max_packet_size_key for the interface.

See Also

Reading and Writing Packets

vmnet_write

Attempts to write specified packets to an interface.