summaryrefslogtreecommitdiffstats
path: root/proto/pipe/pipe.h
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-03-11 18:55:59 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2010-03-11 18:55:59 +0100
commit54305181f6ee3af57dd3d15d53ea2e851b36ed23 (patch)
treea5aed631b68df033cba372f841d47a0cba5d7021 /proto/pipe/pipe.h
parente7b76b976084006e430543f4b872f624326dbfe6 (diff)
parentafa9f66c27e2f96b92059131def53cc7b2497705 (diff)
downloadbird-54305181f6ee3af57dd3d15d53ea2e851b36ed23.tar
bird-54305181f6ee3af57dd3d15d53ea2e851b36ed23.zip
Merge branch 'new' into socket2
Diffstat (limited to 'proto/pipe/pipe.h')
-rw-r--r--proto/pipe/pipe.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/proto/pipe/pipe.h b/proto/pipe/pipe.h
index 368ba41..fbd2129 100644
--- a/proto/pipe/pipe.h
+++ b/proto/pipe/pipe.h
@@ -21,8 +21,20 @@ struct pipe_config {
struct pipe_proto {
struct proto p;
struct rtable *peer;
+ struct proto_stats peer_stats; /* Statistics for the direction peer->primary */
int mode; /* PIPE_OPAQUE or PIPE_TRANSPARENT */
- struct pipe_proto *phantom;
};
+
+extern struct protocol proto_pipe;
+
+static inline int proto_is_pipe(struct proto *p)
+{ return p->proto == &proto_pipe; }
+
+static inline struct rtable * pipe_get_peer_table(struct proto *P)
+{ return ((struct pipe_proto *) P)->peer; }
+
+static inline struct proto_stats * pipe_get_peer_stats(struct proto *P)
+{ return &((struct pipe_proto *) P)->peer_stats; }
+
#endif