X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fstream.c;h=1dfecf060a43a22a79bb16d8e577a11b08133f85;hb=3ba9c6a5a5468626dcfeb1f9a750bb0efc8c6a7a;hp=354245574814edfd5e37f0c6c4c50a93e705d60f;hpb=a8d819675f3525a5416ea355382b2e9c47cb2e74;p=sliver-openvswitch.git diff --git a/lib/stream.c b/lib/stream.c index 354245574..1dfecf060 100644 --- a/lib/stream.c +++ b/lib/stream.c @@ -51,7 +51,9 @@ enum stream_state { static const struct stream_class *stream_classes[] = { &tcp_stream_class, +#ifndef _WIN32 &unix_stream_class, +#endif #ifdef HAVE_OPENSSL &ssl_stream_class, #endif @@ -59,7 +61,9 @@ static const struct stream_class *stream_classes[] = { static const struct pstream_class *pstream_classes[] = { &ptcp_pstream_class, +#ifndef _WIN32 &punix_pstream_class, +#endif #ifdef HAVE_OPENSSL &pssl_pstream_class, #endif @@ -720,18 +724,18 @@ pstream_open_with_default_port(const char *name_, /* * This function extracts IP address and port from the target string. * - * - On success, function returns true and fills *sin structure with port + * - On success, function returns true and fills *ss structure with port * and IP address. If port was absent in target string then it will use * corresponding default port value. - * - On error, function returns false and *sin contains garbage. + * - On error, function returns false and *ss contains garbage. */ bool stream_parse_target_with_default_port(const char *target, uint16_t default_port, - struct sockaddr_in *sin) + struct sockaddr_storage *ss) { return ((!strncmp(target, "tcp:", 4) || !strncmp(target, "ssl:", 4)) - && inet_parse_active(target + 4, default_port, sin)); + && inet_parse_active(target + 4, default_port, ss)); } /* Attempts to guess the content type of a stream whose first few bytes were