summaryrefslogtreecommitdiffstats
path: root/src/babel.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-07-29 23:50:39 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-07-29 23:50:39 +0200
commit45a3ff5a4f41ca861a57fc9e14d4ac8a4905af95 (patch)
tree1945f5180f9f7763c7695d959c32a9a77ced2a73 /src/babel.h
parent94e334a1fecc30b538d4551c035bf913927b21ae (diff)
downloadbabel-45a3ff5a4f41ca861a57fc9e14d4ac8a4905af95.tar
babel-45a3ff5a4f41ca861a57fc9e14d4ac8a4905af95.zip
Implement handling of seqno requests
Diffstat (limited to 'src/babel.h')
-rw-r--r--src/babel.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/babel.h b/src/babel.h
index 0d64e9c..41db13d 100644
--- a/src/babel.h
+++ b/src/babel.h
@@ -154,6 +154,12 @@ static inline bool gp_babel_node_id_is_unspec(const gp_babel_node_id_t *id) {
return gp_babel_node_id_equal(id, &gp_babel_node_id_unspec);
};
+static inline bool gp_babel_less(uint16_t a, uint16_t b) {
+ int16_t diff = a - b;
+
+ return (diff < 0);
+}
+
static inline bool gp_babel_is_metric_better(gp_babel_metric_seqno_t ms1, gp_babel_metric_seqno_t ms2) {
if (ms1.metric == GP_BABEL_INFINITY)
return false;