summaryrefslogtreecommitdiffstats
path: root/ffd/util.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-09-09 04:15:05 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-09-09 04:15:05 +0200
commitb3b606e7f3e2f8bab7c92e70e8d0e15bf06e3e3b (patch)
tree408de7c36f52f91b32963cd036d35d047848bf1c /ffd/util.h
parentf22dc0880f1b9348dc8c056cba0bbce223a39e62 (diff)
downloadffd-b3b606e7f3e2f8bab7c92e70e8d0e15bf06e3e3b.tar
ffd-b3b606e7f3e2f8bab7c92e70e8d0e15bf06e3e3b.zip
Implement sending of neigh announcements
Diffstat (limited to 'ffd/util.h')
-rw-r--r--ffd/util.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/ffd/util.h b/ffd/util.h
index 8020381..9fd6d66 100644
--- a/ffd/util.h
+++ b/ffd/util.h
@@ -30,11 +30,21 @@
#include "types.h"
#include <stdarg.h>
+#include <stdlib.h>
#include <time.h>
bool file_readv(const char *file, const char *format, va_list ap);
+void random_bytes(void *buffer, size_t len);
+static inline bool is_eth_addr_unspec(const eth_addr_t *address) {
+ const uint8_t *a = address->d;
+
+ if (a[0]||a[1]||a[2]||a[3]||a[4]||a[5])
+ return false;
+ else
+ return true;
+}
static inline bool are_eth_addrs_equal(const eth_addr_t *address1, const eth_addr_t *address2) {
const uint8_t *a = address1->d;