/*
- * Copyright (c) 2009, 2010, 2012 Nicira, Inc.
+ * Copyright (c) 2009, 2010, 2012, 2013 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
const struct stream_class *class;
int state;
int error;
- ovs_be32 remote_ip;
- ovs_be16 remote_port;
- ovs_be32 local_ip;
- ovs_be16 local_port;
char *name;
};
void stream_init(struct stream *, const struct stream_class *,
int connect_status, const char *name);
-void stream_set_remote_ip(struct stream *, ovs_be32 remote_ip);
-void stream_set_remote_port(struct stream *, ovs_be16 remote_port);
-void stream_set_local_ip(struct stream *, ovs_be32 local_ip);
-void stream_set_local_port(struct stream *, ovs_be16 local_port);
static inline void stream_assert_class(const struct stream *stream,
const struct stream_class *class)
{
struct pstream {
const struct pstream_class *class;
char *name;
+ ovs_be16 bound_port;
};
void pstream_init(struct pstream *, const struct pstream_class *, const char *name);
+void pstream_set_bound_port(struct pstream *, ovs_be16 bound_port);
static inline void pstream_assert_class(const struct pstream *pstream,
const struct pstream_class *class)
{
/* Active and passive stream classes. */
extern const struct stream_class tcp_stream_class;
extern const struct pstream_class ptcp_pstream_class;
+#ifndef _WIN32
extern const struct stream_class unix_stream_class;
extern const struct pstream_class punix_pstream_class;
+#else
+extern const struct stream_class windows_stream_class;
+extern const struct pstream_class pwindows_pstream_class;
+#endif
#ifdef HAVE_OPENSSL
extern const struct stream_class ssl_stream_class;
extern const struct pstream_class pssl_pstream_class;