diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-11-14 14:35:49 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-11-14 14:35:49 +0100 |
commit | 2f3c9c69f7b6cea83930e8c927d35b519a5655a0 (patch) | |
tree | ea14909067617f9d6e50a430239a17d567f8401b /src/transport/transport.h | |
parent | 291828d5f645106866ef5dbcef847672f6fa47ba (diff) | |
download | gnunet-2f3c9c69f7b6cea83930e8c927d35b519a5655a0.tar.gz gnunet-2f3c9c69f7b6cea83930e8c927d35b519a5655a0.zip |
add first sketch of libgnunettransportmonitor.so implementation
Diffstat (limited to 'src/transport/transport.h')
-rw-r--r-- | src/transport/transport.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/src/transport/transport.h b/src/transport/transport.h index 1b46213cf..c5191a5ce 100644 --- a/src/transport/transport.h +++ b/src/transport/transport.h | |||
@@ -936,6 +936,89 @@ struct GNUNET_TRANSPORT_SendMessageToAck | |||
936 | 936 | ||
937 | 937 | ||
938 | 938 | ||
939 | |||
940 | /** | ||
941 | * Request to start monitoring. | ||
942 | */ | ||
943 | struct GNUNET_TRANSPORT_MonitorStart | ||
944 | { | ||
945 | |||
946 | /** | ||
947 | * Type will be #GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_START. | ||
948 | */ | ||
949 | struct GNUNET_MessageHeader header; | ||
950 | |||
951 | /** | ||
952 | * #GNUNET_YES for one-shot montoring, #GNUNET_NO for continuous monitoring. | ||
953 | */ | ||
954 | uint32_t one_shot; | ||
955 | |||
956 | /** | ||
957 | * Target identifier to monitor, all zeros for "all peers". | ||
958 | */ | ||
959 | struct GNUNET_PeerIdentity peer; | ||
960 | |||
961 | }; | ||
962 | |||
963 | |||
964 | /** | ||
965 | * Monitoring data. | ||
966 | */ | ||
967 | struct GNUNET_TRANSPORT_MonitorData | ||
968 | { | ||
969 | |||
970 | /** | ||
971 | * Type will be #GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_DATA. | ||
972 | */ | ||
973 | struct GNUNET_MessageHeader header; | ||
974 | |||
975 | /** | ||
976 | * Network type (an `enum GNUNET_ATS_Network_Type` in NBO). | ||
977 | */ | ||
978 | uint32_t nt GNUNET_PACKED; | ||
979 | |||
980 | /** | ||
981 | * Target identifier. | ||
982 | */ | ||
983 | struct GNUNET_PeerIdentity peer; | ||
984 | |||
985 | /** | ||
986 | * @deprecated To be discussed if we keep these... | ||
987 | */ | ||
988 | struct GNUNET_TIME_AbsoluteNBO last_validation; | ||
989 | struct GNUNET_TIME_AbsoluteNBO valid_until; | ||
990 | struct GNUNET_TIME_AbsoluteNBO next_validation; | ||
991 | |||
992 | /** | ||
993 | * Current round-trip time estimate. | ||
994 | */ | ||
995 | struct GNUNET_TIME_RelativeNBO rtt; | ||
996 | |||
997 | /** | ||
998 | * Is inbound (in NBO). | ||
999 | */ | ||
1000 | uint32_t is_inbound GNUNET_PACKED; | ||
1001 | |||
1002 | /** | ||
1003 | * Messages pending (in NBO). | ||
1004 | */ | ||
1005 | uint32_t num_msg_pending GNUNET_PACKED; | ||
1006 | |||
1007 | /** | ||
1008 | * Bytes pending (in NBO). | ||
1009 | */ | ||
1010 | uint32_t num_bytes_pending GNUNET_PACKED; | ||
1011 | |||
1012 | /* Followed by 0-terminated address of the peer | ||
1013 | (TODO: do we allow no address? If so, | ||
1014 | adjust transport_api2_monitor!) */ | ||
1015 | |||
1016 | }; | ||
1017 | |||
1018 | |||
1019 | |||
1020 | |||
1021 | |||
939 | GNUNET_NETWORK_STRUCT_END | 1022 | GNUNET_NETWORK_STRUCT_END |
940 | 1023 | ||
941 | /* end of transport.h */ | 1024 | /* end of transport.h */ |