net: add an API for 'raw' packets

In the case where a NIC and backend agree on a packet header format,
this API allows injecting packets which lack the agreed upon header.

We need this for sending our gratuitous ARP.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Mark McLoughlin 2009-10-22 17:43:41 +01:00 committed by Anthony Liguori
parent c0b8e49c69
commit ca77d17591
3 changed files with 32 additions and 8 deletions

View file

@ -44,6 +44,7 @@ typedef ssize_t (NetPacketDeliverIOV) (VLANClientState *sender,
void *opaque);
#define QEMU_NET_PACKET_FLAG_NONE 0
#define QEMU_NET_PACKET_FLAG_RAW (1<<0)
NetQueue *qemu_new_net_queue(NetPacketDeliver *deliver,
NetPacketDeliverIOV *deliver_iov,