Improve infrastructure for Unix socket-based local management.
authorBen Pfaff <blp@nicira.com>
Thu, 9 Apr 2009 21:32:12 +0000 (14:32 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 9 Apr 2009 21:32:12 +0000 (14:32 -0700)
commit928ef32e0c8497833d37b509c8128637a6a63c16
treeeff44301341ce185e3de5aacdc9ad9fbcf236202
parentddba16a7f4ce63117f10feb256f907bae29c1cad
Improve infrastructure for Unix socket-based local management.

"vlog_socket" was essentially a framework for management of a process
over a simple Unix domain socket interface.  Unfortunately it was a little
too simple:

    * It was not extensible for use by clients other than vlog.

    * It was not reliable, since it was based on datagram sockets.

    * It tried to hide itself using poll_fd_callback(), instead of exposing
      itself through the poll loop as does almost every other entity in
      the build tree.

This commit replaces vlog_socket by unixctl, which fixes these problems:

    * Arbitrary commands may now be registered.

    * Use of stream sockets makes it reliable.

    * The interface is exposed to clients.
16 files changed:
controller/controller.c
lib/automake.mk
lib/socket-util.c
lib/socket-util.h
lib/unixctl.c [new file with mode: 0644]
lib/unixctl.h [new file with mode: 0644]
lib/vlog-modules.def
lib/vlog-socket.c [deleted file]
lib/vlog-socket.h [deleted file]
lib/vlog.c
secchan/main.c
utilities/ofp-discover.c
utilities/vlogconf.8.in
utilities/vlogconf.c
vswitchd/brcompatd.c
vswitchd/vswitchd.c