git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
coverage: Reimplement the "ovs-appctl coverage/show" command.
[sliver-openvswitch.git]
/
lib
/
stream.c
diff --git
a/lib/stream.c
b/lib/stream.c
index
0c6a8c1
..
bba6308
100644
(file)
--- a/
lib/stream.c
+++ b/
lib/stream.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira, Inc.
+ * Copyright (c) 2008, 2009, 2010, 2011, 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-34,9
+34,6
@@
#include "poll-loop.h"
#include "random.h"
#include "util.h"
#include "poll-loop.h"
#include "random.h"
#include "util.h"
-#include "vlog.h"
-
-VLOG_DEFINE_THIS_MODULE(stream);
COVERAGE_DEFINE(pstream_open);
COVERAGE_DEFINE(stream_open);
COVERAGE_DEFINE(pstream_open);
COVERAGE_DEFINE(stream_open);
@@
-621,6
+618,14
@@
pstream_set_dscp(struct pstream *pstream, uint8_t dscp)
}
return 0;
}
}
return 0;
}
+
+/* Returns the transport port on which 'pstream' is listening, or 0 if the
+ * concept doesn't apply. */
+ovs_be16
+pstream_get_bound_port(const struct pstream *pstream)
+{
+ return pstream->bound_port;
+}
\f
/* Initializes 'stream' as a new stream named 'name', implemented via 'class'.
* The initial connection status, supplied as 'connect_status', is interpreted
\f
/* Initializes 'stream' as a new stream named 'name', implemented via 'class'.
* The initial connection status, supplied as 'connect_status', is interpreted
@@
-681,9
+686,16
@@
void
pstream_init(struct pstream *pstream, const struct pstream_class *class,
const char *name)
{
pstream_init(struct pstream *pstream, const struct pstream_class *class,
const char *name)
{
+ memset(pstream, 0, sizeof *pstream);
pstream->class = class;
pstream->name = xstrdup(name);
}
pstream->class = class;
pstream->name = xstrdup(name);
}
+
+void
+pstream_set_bound_port(struct pstream *pstream, ovs_be16 port)
+{
+ pstream->bound_port = port;
+}
\f
static int
count_fields(const char *s_)
\f
static int
count_fields(const char *s_)