Hi list,

I've just implemented a "list exports" command for nbd-client, which
allows clients to list available exports on a server. Usage:

wouter@carillon:~/code/c/nbd$ cat /tmp/tmp.04gPZ0eJFQ/nbd.conf 
[generic]
        allowlist = true
[export1]
        exportname = /tmp/tmp.04gPZ0eJFQ/nbd.dd
        flush = true
        fua = true
        rotational = true
        filesize = 52428800
        temporary = true
wouter@carillon:~/code/c/nbd$ ./nbd-server -C /tmp/tmp.04gPZ0eJFQ/nbd.conf 
wouter@carillon:~/code/c/nbd$ ./nbd-client -l localhost
Negotiation: ..
export1
export1

The export is listed twice, because of the way we currently implement
IPv6 support. This may change in a future version, but not now.

I'd appreciate some review of this implementation, on two counts:
- First, I used this option as a way to change the protocol so that it's
  now future-compatible (if the server sees an option it doesn't
  understand, it will just say so, rather than close the connection). I
  *think* that should be enough to allow it to support future
  extensions, but I'd like to be sure.
- Second, I'd like to know from anyone if there's anything I overlooked
  in the implementation of this particular feature.

Thanks,

-- 
The volume of a pizza of thickness a and radius z can be described by
the following formula:

pi zz a

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Nbd-general mailing list
Nbd-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nbd-general

Reply via email to