diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-11 08:56:00 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-11 08:56:00 +0000 |
commit | 8afe6f260b19f148398784a2a918006b91bb4096 (patch) | |
tree | 6cd8160e8e0a183d4071d75abcbbde90b4d532f1 /src/core/gnunet-service-core_typemap.h | |
parent | 1f0797c47af2a197b05ac640ce17adc86982d3c0 (diff) | |
download | gnunet-8afe6f260b19f148398784a2a918006b91bb4096.tar.gz gnunet-8afe6f260b19f148398784a2a918006b91bb4096.zip |
process inbound type map messages:
Diffstat (limited to 'src/core/gnunet-service-core_typemap.h')
-rw-r--r-- | src/core/gnunet-service-core_typemap.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/core/gnunet-service-core_typemap.h b/src/core/gnunet-service-core_typemap.h index 10c614a85..72eb5b566 100644 --- a/src/core/gnunet-service-core_typemap.h +++ b/src/core/gnunet-service-core_typemap.h | |||
@@ -61,6 +61,16 @@ GSC_TYPEMAP_compute_type_map_message (void); | |||
61 | 61 | ||
62 | 62 | ||
63 | /** | 63 | /** |
64 | * Extract a type map from a TYPE_MAP message. | ||
65 | * | ||
66 | * @param msg a type map message | ||
67 | * @return NULL on error | ||
68 | */ | ||
69 | struct GSC_TypeMap * | ||
70 | GSC_TYPEMAP_get_from_message (const struct GNUNET_MessageHeader *msg); | ||
71 | |||
72 | |||
73 | /** | ||
64 | * Test if any of the types from the types array is in the | 74 | * Test if any of the types from the types array is in the |
65 | * given type map. | 75 | * given type map. |
66 | * | 76 | * |
@@ -76,6 +86,29 @@ GSC_TYPEMAP_test_match (const struct GSC_TypeMap *tmap, | |||
76 | 86 | ||
77 | 87 | ||
78 | /** | 88 | /** |
89 | * Add additional types to a given typemap. | ||
90 | * | ||
91 | * @param map map to extend (not changed) | ||
92 | * @param types array of types to add | ||
93 | * @param tcnt number of entries in types | ||
94 | * @return updated type map (fresh copy) | ||
95 | */ | ||
96 | struct GSC_TypeMap * | ||
97 | GSC_TYPEMAP_extend (const struct GSC_TypeMap *tmap, | ||
98 | const uint16_t *types, | ||
99 | unsigned int tcnt); | ||
100 | |||
101 | |||
102 | /** | ||
103 | * Free the given type map. | ||
104 | * | ||
105 | * @param map a type map | ||
106 | */ | ||
107 | void | ||
108 | GSC_TYPEMAP_destroy (struct GSC_TypeMap *tmap); | ||
109 | |||
110 | |||
111 | /** | ||
79 | * Initialize typemap subsystem. | 112 | * Initialize typemap subsystem. |
80 | */ | 113 | */ |
81 | void | 114 | void |