X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fats%2Fats.h;h=6fae406324ab0b6195e8875ce4f9111b90c203c4;hb=bace3fe85e0dccc59a1d2352e028021e528608b5;hp=a45714f53a74bd1ef700e17fe3d10dbd495fa837;hpb=aa320056c5fbf5899c0f2d57bbaa41268e2e8f19;p=oweals%2Fgnunet.git diff --git a/src/ats/ats.h b/src/ats/ats.h index a45714f53..6fae40632 100644 --- a/src/ats/ats.h +++ b/src/ats/ats.h @@ -31,15 +31,15 @@ enum StartFlag { - + START_FLAG_SCHEDULING = 0, START_FLAG_PERFORMANCE_WITH_PIC = 1, START_FLAG_PERFORMANCE_NO_PIC = 2 - }; +GNUNET_NETWORK_STRUCT_BEGIN struct ClientStartMessage { @@ -55,7 +55,16 @@ struct ClientStartMessage struct RequestAddressMessage { struct GNUNET_MessageHeader header; - + + uint32_t reserved GNUNET_PACKED; + + struct GNUNET_PeerIdentity peer; +}; + +struct ResetBackoffMessage +{ + struct GNUNET_MessageHeader header; + uint32_t reserved GNUNET_PACKED; struct GNUNET_PeerIdentity peer; @@ -77,10 +86,31 @@ struct AddressUpdateMessage uint32_t session_id GNUNET_PACKED; /* followed by: - - struct GNUNET_ATS_Information [ats_count]; - - char address[address_length] - - char plugin_name[plugin_name_length] (including '\0'-termination). - */ + * - struct GNUNET_ATS_Information [ats_count]; + * - char address[address_length] + * - char plugin_name[plugin_name_length] (including '\0'-termination). + */ + +}; + +struct AddressUseMessage +{ + struct GNUNET_MessageHeader header; + + struct GNUNET_PeerIdentity peer; + + uint16_t in_use GNUNET_PACKED; + + uint16_t address_length GNUNET_PACKED; + + uint16_t plugin_name_length GNUNET_PACKED; + + uint32_t session_id GNUNET_PACKED; + + /* followed by: + * - char address[address_length] + * - char plugin_name[plugin_name_length] (including '\0'-termination). + */ }; @@ -100,9 +130,9 @@ struct AddressDestroyedMessage uint32_t session_id GNUNET_PACKED; /* followed by: - - char address[address_length] - - char plugin_name[plugin_name_length] (including '\0'-termination). - */ + * - char address[address_length] + * - char plugin_name[plugin_name_length] (including '\0'-termination). + */ }; @@ -122,14 +152,14 @@ struct AddressSuggestionMessage uint32_t session_id GNUNET_PACKED; struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out; - + struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in; /* followed by: - - struct GNUNET_ATS_Information [ats_count]; - - char address[address_length] - - char plugin_name[plugin_name_length] (including '\0'-termination). - */ + * - struct GNUNET_ATS_Information [ats_count]; + * - char address[address_length] + * - char plugin_name[plugin_name_length] (including '\0'-termination). + */ }; @@ -140,6 +170,10 @@ struct PeerInformationMessage uint32_t ats_count GNUNET_PACKED; + uint32_t address_active GNUNET_PACKED; + + uint32_t id GNUNET_PACKED; + struct GNUNET_PeerIdentity peer; uint16_t address_length GNUNET_PACKED; @@ -147,15 +181,27 @@ struct PeerInformationMessage uint16_t plugin_name_length GNUNET_PACKED; struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out; - + struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in; - /* followed by: - - struct GNUNET_ATS_Information [ats_count]; - - char address[address_length] - - char plugin_name[plugin_name_length] (including '\0'-termination). - */ + /* followed by: + * - struct GNUNET_ATS_Information [ats_count]; + * - char address[address_length] + * - char plugin_name[plugin_name_length] (including '\0'-termination). + */ + +}; + + +struct AddressListRequestMessage +{ + struct GNUNET_MessageHeader header; + + uint32_t id GNUNET_PACKED; + + int32_t all GNUNET_PACKED; + struct GNUNET_PeerIdentity peer; }; @@ -194,14 +240,13 @@ struct ReservationResultMessage struct GNUNET_TIME_RelativeNBO res_delay; }; - struct PreferenceInformation { uint32_t preference_kind GNUNET_PACKED; float preference_value GNUNET_PACKED; - + }; @@ -213,9 +258,10 @@ struct ChangePreferenceMessage struct GNUNET_PeerIdentity peer; - /* followed by 'num_preferences' - struct PreferenceInformation values */ + /* followed by 'num_preferences' + * struct PreferenceInformation values */ }; +GNUNET_NETWORK_STRUCT_END