From c4e9ba925ffd758aaa3feee2ccfc0b76f26fe207 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 5 Oct 2019 15:09:28 +0200 Subject: global reindent, now with uncrustify hook enabled --- src/include/gnunet_hello_lib.h | 107 +++++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 52 deletions(-) (limited to 'src/include/gnunet_hello_lib.h') diff --git a/src/include/gnunet_hello_lib.h b/src/include/gnunet_hello_lib.h index 9fe158852..fff0045aa 100644 --- a/src/include/gnunet_hello_lib.h +++ b/src/include/gnunet_hello_lib.h @@ -65,7 +65,8 @@ extern "C" { * These information are only valid for the local peer and are not serialized * when a #GNUNET_HELLO_Message is created */ -enum GNUNET_HELLO_AddressInfo { +enum GNUNET_HELLO_AddressInfo +{ /** * No additional information */ @@ -85,7 +86,8 @@ enum GNUNET_HELLO_AddressInfo { * separated. This is NOT the format that would be used * on the wire. */ -struct GNUNET_HELLO_Address { +struct GNUNET_HELLO_Address +{ /** * For which peer is this an address? */ @@ -132,11 +134,11 @@ struct GNUNET_HELLO_Address { * @return the address struct */ struct GNUNET_HELLO_Address * -GNUNET_HELLO_address_allocate(const struct GNUNET_PeerIdentity *peer, - const char *transport_name, - const void *address, - size_t address_length, - enum GNUNET_HELLO_AddressInfo local_info); +GNUNET_HELLO_address_allocate (const struct GNUNET_PeerIdentity *peer, + const char *transport_name, + const void *address, + size_t address_length, + enum GNUNET_HELLO_AddressInfo local_info); /** @@ -146,7 +148,7 @@ GNUNET_HELLO_address_allocate(const struct GNUNET_PeerIdentity *peer, * @return a copy of the address struct */ struct GNUNET_HELLO_Address * -GNUNET_HELLO_address_copy(const struct GNUNET_HELLO_Address *address); +GNUNET_HELLO_address_copy (const struct GNUNET_HELLO_Address *address); /** @@ -158,8 +160,8 @@ GNUNET_HELLO_address_copy(const struct GNUNET_HELLO_Address *address); * @return 0 if the addresses are equal, -1 if @a a1< @a a2, 1 if @a a1> @a a2. */ int -GNUNET_HELLO_address_cmp(const struct GNUNET_HELLO_Address *a1, - const struct GNUNET_HELLO_Address *a2); +GNUNET_HELLO_address_cmp (const struct GNUNET_HELLO_Address *a1, + const struct GNUNET_HELLO_Address *a2); /** @@ -169,7 +171,7 @@ GNUNET_HELLO_address_cmp(const struct GNUNET_HELLO_Address *a1, * @return the size */ size_t -GNUNET_HELLO_address_get_size(const struct GNUNET_HELLO_Address *address); +GNUNET_HELLO_address_get_size (const struct GNUNET_HELLO_Address *address); /** @@ -180,8 +182,8 @@ GNUNET_HELLO_address_get_size(const struct GNUNET_HELLO_Address *address); * @return #GNUNET_YES or #GNUNET_NO */ int -GNUNET_HELLO_address_check_option(const struct GNUNET_HELLO_Address *address, - enum GNUNET_HELLO_AddressInfo option); +GNUNET_HELLO_address_check_option (const struct GNUNET_HELLO_Address *address, + enum GNUNET_HELLO_AddressInfo option); /** @@ -189,7 +191,7 @@ GNUNET_HELLO_address_check_option(const struct GNUNET_HELLO_Address *address, * * @param addr address to free */ -#define GNUNET_HELLO_address_free(addr) GNUNET_free(addr) +#define GNUNET_HELLO_address_free(addr) GNUNET_free (addr) GNUNET_NETWORK_STRUCT_BEGIN @@ -207,7 +209,8 @@ GNUNET_NETWORK_STRUCT_BEGIN * unaligned!) * 4) address (address-length bytes; possibly unaligned!) */ -struct GNUNET_HELLO_Message { +struct GNUNET_HELLO_Message +{ /** * Type will be #GNUNET_MESSAGE_TYPE_HELLO. */ @@ -233,7 +236,7 @@ GNUNET_NETWORK_STRUCT_END * @return #GNUNET_YES for friend-only or #GNUNET_NO otherwise */ int -GNUNET_HELLO_is_friend_only(const struct GNUNET_HELLO_Message *h); +GNUNET_HELLO_is_friend_only (const struct GNUNET_HELLO_Message *h); /** @@ -248,10 +251,10 @@ GNUNET_HELLO_is_friend_only(const struct GNUNET_HELLO_Message *h); * the target buffer was not big enough. */ size_t -GNUNET_HELLO_add_address(const struct GNUNET_HELLO_Address *address, - struct GNUNET_TIME_Absolute expiration, - char *target, - size_t max); +GNUNET_HELLO_add_address (const struct GNUNET_HELLO_Address *address, + struct GNUNET_TIME_Absolute expiration, + char *target, + size_t max); /** @@ -285,10 +288,10 @@ typedef ssize_t (*GNUNET_HELLO_GenerateAddressListCallback) (void *cls, * @return the hello message */ struct GNUNET_HELLO_Message * -GNUNET_HELLO_create(const struct GNUNET_CRYPTO_EddsaPublicKey *public_key, - GNUNET_HELLO_GenerateAddressListCallback addrgen, - void *addrgen_cls, - int friend_only); +GNUNET_HELLO_create (const struct GNUNET_CRYPTO_EddsaPublicKey *public_key, + GNUNET_HELLO_GenerateAddressListCallback addrgen, + void *addrgen_cls, + int friend_only); /** @@ -298,7 +301,7 @@ GNUNET_HELLO_create(const struct GNUNET_CRYPTO_EddsaPublicKey *public_key, * @return the size, 0 if HELLO is invalid */ uint16_t -GNUNET_HELLO_size(const struct GNUNET_HELLO_Message *hello); +GNUNET_HELLO_size (const struct GNUNET_HELLO_Message *hello); /** @@ -311,8 +314,8 @@ GNUNET_HELLO_size(const struct GNUNET_HELLO_Message *hello); * @return the combined hello message */ struct GNUNET_HELLO_Message * -GNUNET_HELLO_merge(const struct GNUNET_HELLO_Message *h1, - const struct GNUNET_HELLO_Message *h2); +GNUNET_HELLO_merge (const struct GNUNET_HELLO_Message *h1, + const struct GNUNET_HELLO_Message *h2); /** @@ -332,9 +335,9 @@ GNUNET_HELLO_merge(const struct GNUNET_HELLO_Message *h1, * do not match at all */ struct GNUNET_TIME_Absolute -GNUNET_HELLO_equals(const struct GNUNET_HELLO_Message *h1, - const struct GNUNET_HELLO_Message *h2, - struct GNUNET_TIME_Absolute now); +GNUNET_HELLO_equals (const struct GNUNET_HELLO_Message *h1, + const struct GNUNET_HELLO_Message *h2, + struct GNUNET_TIME_Absolute now); /** @@ -360,7 +363,7 @@ typedef int (*GNUNET_HELLO_AddressIterator) ( * @return time the last address expires, 0 if there are no addresses in the HELLO */ struct GNUNET_TIME_Absolute -GNUNET_HELLO_get_last_expiration(const struct GNUNET_HELLO_Message *msg); +GNUNET_HELLO_get_last_expiration (const struct GNUNET_HELLO_Message *msg); /** @@ -376,10 +379,10 @@ GNUNET_HELLO_get_last_expiration(const struct GNUNET_HELLO_Message *msg); * @return the modified HELLO or NULL */ struct GNUNET_HELLO_Message * -GNUNET_HELLO_iterate_addresses(const struct GNUNET_HELLO_Message *msg, - int return_modified, - GNUNET_HELLO_AddressIterator it, - void *it_cls); +GNUNET_HELLO_iterate_addresses (const struct GNUNET_HELLO_Message *msg, + int return_modified, + GNUNET_HELLO_AddressIterator it, + void *it_cls); /** @@ -396,7 +399,7 @@ GNUNET_HELLO_iterate_addresses(const struct GNUNET_HELLO_Message *msg, * @param it_cls closure for @a it */ void -GNUNET_HELLO_iterate_new_addresses( +GNUNET_HELLO_iterate_new_addresses ( const struct GNUNET_HELLO_Message *new_hello, const struct GNUNET_HELLO_Message *old_hello, struct GNUNET_TIME_Absolute expiration_limit, @@ -412,8 +415,8 @@ GNUNET_HELLO_iterate_new_addresses( * @return #GNUNET_SYSERR if the HELLO was malformed */ int -GNUNET_HELLO_get_id(const struct GNUNET_HELLO_Message *hello, - struct GNUNET_PeerIdentity *peer); +GNUNET_HELLO_get_id (const struct GNUNET_HELLO_Message *hello, + struct GNUNET_PeerIdentity *peer); /** @@ -425,7 +428,7 @@ GNUNET_HELLO_get_id(const struct GNUNET_HELLO_Message *hello, * @return header or NULL if the HELLO was malformed */ struct GNUNET_MessageHeader * -GNUNET_HELLO_get_header(struct GNUNET_HELLO_Message *hello); +GNUNET_HELLO_get_header (struct GNUNET_HELLO_Message *hello); /** @@ -447,8 +450,8 @@ typedef struct GNUNET_TRANSPORT_PluginFunctions *( * @return Hello URI string */ char * -GNUNET_HELLO_compose_uri(const struct GNUNET_HELLO_Message *hello, - GNUNET_HELLO_TransportPluginsFind plugins_find); +GNUNET_HELLO_compose_uri (const struct GNUNET_HELLO_Message *hello, + GNUNET_HELLO_TransportPluginsFind plugins_find); /** @@ -461,10 +464,10 @@ GNUNET_HELLO_compose_uri(const struct GNUNET_HELLO_Message *hello, * @return #GNUNET_OK on success, #GNUNET_SYSERR if the URI was invalid, #GNUNET_NO on other errors */ int -GNUNET_HELLO_parse_uri(const char *uri, - struct GNUNET_CRYPTO_EddsaPublicKey *pubkey, - struct GNUNET_HELLO_Message **hello, - GNUNET_HELLO_TransportPluginsFind plugins_find); +GNUNET_HELLO_parse_uri (const char *uri, + struct GNUNET_CRYPTO_EddsaPublicKey *pubkey, + struct GNUNET_HELLO_Message **hello, + GNUNET_HELLO_TransportPluginsFind plugins_find); /* NG API */ @@ -482,7 +485,7 @@ GNUNET_HELLO_parse_uri(const char *uri, * @param result_size[out] set to size of @a result */ void -GNUNET_HELLO_sign_address( +GNUNET_HELLO_sign_address ( const char *address, enum GNUNET_NetworkType nt, struct GNUNET_TIME_Absolute mono_time, @@ -502,11 +505,11 @@ GNUNET_HELLO_sign_address( * @return NULL on error, otherwise the address */ char * -GNUNET_HELLO_extract_address(const void *raw, - size_t raw_size, - const struct GNUNET_PeerIdentity *pid, - enum GNUNET_NetworkType *nt, - struct GNUNET_TIME_Absolute *mono_time); +GNUNET_HELLO_extract_address (const void *raw, + size_t raw_size, + const struct GNUNET_PeerIdentity *pid, + enum GNUNET_NetworkType *nt, + struct GNUNET_TIME_Absolute *mono_time); /** @@ -517,7 +520,7 @@ GNUNET_HELLO_extract_address(const void *raw, * @return NULL if the address is mal-formed, otherwise the prefix */ char * -GNUNET_HELLO_address_to_prefix(const char *address); +GNUNET_HELLO_address_to_prefix (const char *address); #if 0 /* keep Emacsens' auto-indent happy */ -- cgit v1.2.3