aboutsummaryrefslogtreecommitdiff
path: root/src/hello/address.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2014-01-14 13:07:25 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2014-01-14 13:07:25 +0000
commite80da3ab091fdaaf65222689d10e73ef210b5f23 (patch)
treed69c693908593982a0ff9df152dc07c5211257f5 /src/hello/address.c
parent30c72242b0d5c9ee30a08fae7e69b723450e2899 (diff)
downloadgnunet-e80da3ab091fdaaf65222689d10e73ef210b5f23.tar.gz
gnunet-e80da3ab091fdaaf65222689d10e73ef210b5f23.zip
additional function to check option
Diffstat (limited to 'src/hello/address.c')
-rw-r--r--src/hello/address.c16
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 */
38int
39GNUNET_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