diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-11-22 22:04:48 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-11-22 22:04:48 +0100 |
commit | c87f73a07df468eccedbe1fdfa82bdd5b633a0d5 (patch) | |
tree | 0bb3f63e727a65dc84c33a03229b6760edee82ee /src/include/gnunet_mq_lib.h | |
parent | dd7379052f3749d87d8c35969ec94b4580e998b5 (diff) | |
download | gnunet-c87f73a07df468eccedbe1fdfa82bdd5b633a0d5.tar.gz gnunet-c87f73a07df468eccedbe1fdfa82bdd5b633a0d5.zip |
move network type logic out of ATS code, move performance preferences into MQ
Diffstat (limited to 'src/include/gnunet_mq_lib.h')
-rw-r--r-- | src/include/gnunet_mq_lib.h | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/src/include/gnunet_mq_lib.h b/src/include/gnunet_mq_lib.h index 226b3389f..3d3a74e3b 100644 --- a/src/include/gnunet_mq_lib.h +++ b/src/include/gnunet_mq_lib.h | |||
@@ -11,7 +11,7 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 15 | You should have received a copy of the GNU Affero General Public License |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | */ | 17 | */ |
@@ -875,6 +875,51 @@ const struct GNUNET_MessageHeader * | |||
875 | GNUNET_MQ_impl_current (struct GNUNET_MQ_Handle *mq); | 875 | GNUNET_MQ_impl_current (struct GNUNET_MQ_Handle *mq); |
876 | 876 | ||
877 | 877 | ||
878 | |||
879 | /** | ||
880 | * Enum defining all known preference categories. | ||
881 | */ | ||
882 | enum GNUNET_MQ_PreferenceKind | ||
883 | { | ||
884 | |||
885 | /** | ||
886 | * No preference was expressed. | ||
887 | */ | ||
888 | GNUNET_MQ_PREFERENCE_NONE = 0, | ||
889 | |||
890 | /** | ||
891 | * The preferred transmission for this envelope focuses on | ||
892 | * maximizing bandwidth. | ||
893 | */ | ||
894 | GNUNET_MQ_PREFERENCE_BANDWIDTH = 1, | ||
895 | |||
896 | /** | ||
897 | * The preferred transmission for this envelope foces on | ||
898 | * minimizing latency. | ||
899 | */ | ||
900 | GNUNET_MQ_PREFERENCE_LATENCY = 2, | ||
901 | |||
902 | /** | ||
903 | * The preferred transmission for this envelope foces on | ||
904 | * reliability. | ||
905 | */ | ||
906 | GNUNET_MQ_PREFERENCE_RELIABILITY = 3 | ||
907 | |||
908 | }; | ||
909 | |||
910 | |||
911 | /** | ||
912 | * Convert an `enum GNUNET_MQ_PreferenceType` to a string | ||
913 | * | ||
914 | * @param type the preference type | ||
915 | * @return a string or NULL if invalid | ||
916 | */ | ||
917 | const char * | ||
918 | GNUNET_MQ_preference_to_string (enum GNUNET_MQ_PreferenceKind type); | ||
919 | |||
920 | |||
921 | |||
922 | |||
878 | #endif | 923 | #endif |
879 | 924 | ||
880 | /** @} */ /* end of group mq */ | 925 | /** @} */ /* end of group mq */ |