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/address.c | |
parent | 30c72242b0d5c9ee30a08fae7e69b723450e2899 (diff) | |
download | gnunet-e80da3ab091fdaaf65222689d10e73ef210b5f23.tar.gz gnunet-e80da3ab091fdaaf65222689d10e73ef210b5f23.zip |
additional function to check option
Diffstat (limited to 'src/hello/address.c')
-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 736e85eed..d708c73e5 100644 --- a/src/hello/address.c +++ b/src/hello/address.c | |||
@@ -29,6 +29,22 @@ | |||
29 | 29 | ||
30 | 30 | ||
31 | /** | 31 | /** |
32 | * Check if an address has a local option set | ||
33 | * | ||
34 | * @param address the address to check | ||
35 | * @param option the respective option to check for | ||
36 | * @return GNUNET_YES or GNUNET_NO | ||
37 | */ | ||
38 | int | ||
39 | GNUNET_HELLO_address_check_option (const struct GNUNET_HELLO_Address * address, | ||
40 | enum GNUNET_HELLO_AddressInfo option) | ||
41 | { | ||
42 | if (option == (address->local_info & option)) | ||
43 | return GNUNET_YES; | ||
44 | return GNUNET_NO; | ||
45 | } | ||
46 | |||
47 | /** | ||
32 | * Get the size of an address struct. | 48 | * Get the size of an address struct. |
33 | * | 49 | * |
34 | * @param address address | 50 | * @param address address |