/* This is just the same as stream_open() except that it uses the default * JSONRPC ports if none is specified. */ int jsonrpc_stream_open(const char *name, struct stream **streamp, uint8_t dscp) { return stream_open_with_default_ports(name, JSONRPC_TCP_PORT, JSONRPC_SSL_PORT, streamp, dscp); }
return CONTAINER_OF(vconn, struct vconn_stream, vconn); } /* Creates a new vconn that will send and receive data on a stream named 'name' * * and stores a pointer to the vconn in '*vconnp'. * * * * Returns 0 if successful, otherwise a positive errno value. */ static int vconn_stream_open(const char *name, char *suffix OVS_UNUSED, struct vconn **vconnp, uint8_t dscp) { struct stream *stream; int error; error = stream_open_with_default_ports(name, RFP_TCP_PORT, RFP_SSL_PORT, &stream, dscp); if (!error) { error = stream_connect(stream); if (!error || error == EAGAIN) { *vconnp = vconn_stream_new(stream, error); return 0; } } stream_close(stream); return error; } static void vconn_stream_close(struct vconn *vconn) {
s->vconn.local_port = stream_get_local_port(stream); return &s->vconn; } /* Creates a new vconn that will send and receive data on a stream named 'name' * and stores a pointer to the vconn in '*vconnp'. * * Returns 0 if successful, otherwise a positive errno value. */ static int vconn_stream_open(const char *name, char *suffix OVS_UNUSED, struct vconn **vconnp) { struct stream *stream; int error; error = stream_open_with_default_ports(name, OFP_TCP_PORT, OFP_SSL_PORT, &stream); if (!error) { error = stream_connect(stream); if (!error || error == EAGAIN) { *vconnp = vconn_stream_new(stream, error); return 0; } } stream_close(stream); return error; } static struct vconn_stream * vconn_stream_cast(struct vconn *vconn) {