summaryrefslogtreecommitdiff
path: root/mesh/rpl.h
diff options
context:
space:
mode:
authorBrian Gix <brian.gix@intel.com>2020-01-30 10:59:23 -0800
committerBrian Gix <brian.gix@intel.com>2020-01-30 11:03:47 -0800
commit8457e6a3ad147c1167862f148cbbf281d879e874 (patch)
tree2cb7ae100b8b77089b0503527deb4629e82675fb /mesh/rpl.h
parent17e97efc3fc48116509e97670288af5827b81747 (diff)
downloadbluez-8457e6a3ad147c1167862f148cbbf281d879e874.tar.gz
mesh: Add NVM storage of Replay Protection
Mesh specification requires that Replay Protection be preserved across node restarts. This adds that storage in <node_uuid>/rpl/<iv_index>/<src> Realtime access remains in an l_queue structure, and stored as messages are processed.
Diffstat (limited to 'mesh/rpl.h')
-rw-r--r--mesh/rpl.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/mesh/rpl.h b/mesh/rpl.h
new file mode 100644
index 000000000..17d2e3f05
--- /dev/null
+++ b/mesh/rpl.h
@@ -0,0 +1,30 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2020 Intel Corporation. All rights reserved.
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ */
+
+struct mesh_rpl {
+ uint32_t iv_index;
+ uint32_t seq;
+ uint16_t src;
+};
+
+bool rpl_put_entry(struct mesh_node *node, uint16_t src, uint32_t iv_index,
+ uint32_t seq);
+void rpl_del_entry(struct mesh_node *node, uint16_t src);
+bool rpl_get_list(struct mesh_node *node, struct l_queue *rpl_list);
+void rpl_init(struct mesh_node *node, uint32_t iv_index);