stream: Introduce [p]windows_[p]stream_class.
authorGurucharan Shetty <gshetty@nicira.com>
Fri, 4 Apr 2014 21:13:32 +0000 (14:13 -0700)
committerGurucharan Shetty <gshetty@nicira.com>
Tue, 22 Apr 2014 22:16:40 +0000 (15:16 -0700)
commite3f512b07c11de6b297050bb969fd0d8a07f9357
treed70b8266ed6e928e5356566c618286532b6ac0e4
parentc7c1bdf355d8885a61363f39a759baa96621f0f2
stream: Introduce [p]windows_[p]stream_class.

On Linux, we heavily use --remote=punix:* to listen for
connections through unix domain sockets. We also use, unix:*
to connect to a daemon that is listening on unix domain sockets.
Many times, we create default unix domain sockets for listening
and many utilities connect to these sockets by default.

Windows does not have unix domain sockets. So far, we could just use
ptcp:* and tcp:* for listening and initiating connections respectively.
The drawback here is that one has to provide a specific TCP port.

For unit tests, it looks useful to let kernel choose that port.
As such, we can let that chosen kernel port be stored in the
file specified with punix:* and unix:*. For this purpose, introduce
a new [p]windows_[p]stream_class. Since it is just a wrapper around
[p]tcp_[p]stream_class, add it to stream-tcp.c.

commit cb54a8c (unixctl: Add support for Windows.) used the above concept
for only control channel connections (i.e., --unixctl for daemons and its
interaction with ovs-appctl). This commit adds the same support for
all unix domain sockets.  Now that we have a separate class
[p]stream_class for hiding kernel assigned TCP port inside a file meant for
unix domain sockets in windows, make unixctl use it.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/stream-provider.h
lib/stream-tcp.c
lib/stream.c
lib/unixctl.c
lib/vconn-active.man
ovsdb/remote-active.man
ovsdb/remote-passive.man