diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-01-14 13:07:25 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-01-14 13:07:25 +0000 |
commit | e80da3ab091fdaaf65222689d10e73ef210b5f23 (patch) | |
tree | d69c693908593982a0ff9df152dc07c5211257f5 /src/hello | |
parent | 30c72242b0d5c9ee30a08fae7e69b723450e2899 (diff) |
additional function to check option
Diffstat (limited to 'src/hello')
-rw-r--r-- | src/hello/address.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/hello/address.c b/src/hello/address.c index 736e85eedd..d708c73e55 100644 --- a/src/hello/address.c +++ b/src/hello/address.c @@ -29,6 +29,22 @@ /** + * Check if an address has a local option set + * + * @param address the address to check + * @param option the respective option to check for + * @return GNUNET_YES or GNUNET_NO + */ +int +GNUNET_HELLO_address_check_option (const struct GNUNET_HELLO_Address * address, + enum GNUNET_HELLO_AddressInfo option) +{ + if (option == (address->local_info & option)) + return GNUNET_YES; + return GNUNET_NO; +} + +/** * Get the size of an address struct. * * @param address address |