diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-09-09 04:15:05 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-09-09 04:15:05 +0200 |
commit | b3b606e7f3e2f8bab7c92e70e8d0e15bf06e3e3b (patch) | |
tree | 408de7c36f52f91b32963cd036d35d047848bf1c /ffd/util.h | |
parent | f22dc0880f1b9348dc8c056cba0bbce223a39e62 (diff) | |
download | ffd-b3b606e7f3e2f8bab7c92e70e8d0e15bf06e3e3b.tar ffd-b3b606e7f3e2f8bab7c92e70e8d0e15bf06e3e3b.zip |
Implement sending of neigh announcements
Diffstat (limited to 'ffd/util.h')
-rw-r--r-- | ffd/util.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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; |