Connect to the given TCP \fIport\fR on \fIip\fR.
.IP "\fBunix:\fIfile\fR"
Connect to the Unix domain server socket named \fIfile\fR.
+.IP "\fBptcp:\fIport\fR[\fB:\fIip\fR]"
+Listen on the given TCP \fIport\fR for a connection. By default,
+\fB\*(PN\fR listens for connections to any local IP address, but
+\fIip\fR may be specified to listen only for connections to the given
+\fIip\fR.
+.IP "\fBpunix:\fIfile\fR"
+Listen on the Unix domain server socket named \fIfile\fR for a
+connection.
.
.SS "Commands"
The following commands are implemented:
"\n list-columns SERVER [TABLE]\n"
" list columns in TABLE (or all tables) on SERVER\n",
program_name, program_name);
- stream_usage("SERVER", true, false);
+ stream_usage("SERVER", true, true);
printf("\nOutput formatting options:\n"
" -f, --format=FORMAT set output formatting to FORMAT\n"
" (\"table\", \"html\", or \"csv\"\n"
int error;
error = stream_open_block(server, &stream);
- if (error) {
+ if (error == EAFNOSUPPORT) {
+ struct pstream *pstream;
+
+ error = pstream_open(server, &pstream);
+ if (error) {
+ ovs_fatal(error, "failed to connect or listen to \"%s\"", server);
+ }
+
+ VLOG_INFO("%s: waiting for connection...", server);
+ error = pstream_accept_block(pstream, &stream);
+ if (error) {
+ ovs_fatal(error, "failed to accept connection on \"%s\"", server);
+ }
+
+ pstream_close(pstream);
+ } else if (error) {
ovs_fatal(error, "failed to connect to \"%s\"", server);
}