]> git.proxmox.com Git - qemu.git/commit - nbd.h
NBD: Use qemu_socket functions to open TCP and UNIX sockets
authorNick Thomas <nick@bytemark.co.uk>
Tue, 22 Feb 2011 15:44:53 +0000 (15:44 +0000)
committerKevin Wolf <kwolf@redhat.com>
Thu, 7 Apr 2011 11:51:48 +0000 (13:51 +0200)
commitc12504ceef999c80b82c69c0154205ca23247fd5
tree3702d59560a42ecf0a559e8ddb1543f52b1c767e
parentb82eac92ac69a22243d341dde0213b7d15d7ba24
NBD: Use qemu_socket functions to open TCP and UNIX sockets

This commit has the side-effect of making the qemu-nbd binary
capable of binding to IPv6 addresses. ("-b ::1", for instance).
block/nbd.c fails to parse IPv6 IP addresses correctly at this
point, but will work over IPv6 when given a hostname. It still
works over IPv4 as before.

We move the qemu-sockets object from the 'common' to the 'block'
list in the Makefile. The common list includes the block list,
so this is effectively a no-op for the rest of the code.

We also add 32-bit 'magic' attributes to nbd_(request|reply) to
facilitate calculating maximum request/response sizes later.

Signed-off-by: Nick Thomas <nick@bytemark.co.uk>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Makefile.objs
nbd.c
nbd.h