diff options
Diffstat (limited to 'src/mesh/mesh.h')
-rw-r--r-- | src/mesh/mesh.h | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/src/mesh/mesh.h b/src/mesh/mesh.h index 00032f21b..116e7a777 100644 --- a/src/mesh/mesh.h +++ b/src/mesh/mesh.h | |||
@@ -77,7 +77,8 @@ | |||
77 | /** | 77 | /** |
78 | * Message for a client to register to the service | 78 | * Message for a client to register to the service |
79 | */ | 79 | */ |
80 | struct GNUNET_MESH_ClientConnect { | 80 | struct GNUNET_MESH_ClientConnect |
81 | { | ||
81 | /** | 82 | /** |
82 | * Type: GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT | 83 | * Type: GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT |
83 | * | 84 | * |
@@ -85,11 +86,11 @@ struct GNUNET_MESH_ClientConnect { | |||
85 | * sizeof(uint16_t) * types + | 86 | * sizeof(uint16_t) * types + |
86 | * sizeof(MESH_ApplicationType) * applications | 87 | * sizeof(MESH_ApplicationType) * applications |
87 | */ | 88 | */ |
88 | struct GNUNET_MessageHeader header; | 89 | struct GNUNET_MessageHeader header; |
89 | uint16_t types GNUNET_PACKED; | 90 | uint16_t types GNUNET_PACKED; |
90 | uint16_t applications GNUNET_PACKED; | 91 | uint16_t applications GNUNET_PACKED; |
91 | /* uint16_t list_types[types] */ | 92 | /* uint16_t list_types[types] */ |
92 | /* uint16_t list_apps[applications] */ | 93 | /* uint16_t list_apps[applications] */ |
93 | }; | 94 | }; |
94 | 95 | ||
95 | 96 | ||
@@ -103,18 +104,19 @@ typedef uint32_t MESH_TunnelNumber; | |||
103 | /** | 104 | /** |
104 | * Message for a client to create and destroy tunnels. | 105 | * Message for a client to create and destroy tunnels. |
105 | */ | 106 | */ |
106 | struct GNUNET_MESH_TunnelMessage { | 107 | struct GNUNET_MESH_TunnelMessage |
108 | { | ||
107 | /** | 109 | /** |
108 | * Type: GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_[CREATE|DESTROY] | 110 | * Type: GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_[CREATE|DESTROY] |
109 | * | 111 | * |
110 | * Size: sizeof(struct GNUNET_MESH_TunnelMessage) | 112 | * Size: sizeof(struct GNUNET_MESH_TunnelMessage) |
111 | */ | 113 | */ |
112 | struct GNUNET_MessageHeader header; | 114 | struct GNUNET_MessageHeader header; |
113 | 115 | ||
114 | /** | 116 | /** |
115 | * ID of a tunnel controlled by this client. | 117 | * ID of a tunnel controlled by this client. |
116 | */ | 118 | */ |
117 | MESH_TunnelNumber tunnel_id GNUNET_PACKED; | 119 | MESH_TunnelNumber tunnel_id GNUNET_PACKED; |
118 | }; | 120 | }; |
119 | 121 | ||
120 | /** | 122 | /** |
@@ -125,7 +127,8 @@ struct GNUNET_MESH_TunnelMessage { | |||
125 | * -- unrequested (new incoming tunnels) | 127 | * -- unrequested (new incoming tunnels) |
126 | * - notify the client that peers have disconnected | 128 | * - notify the client that peers have disconnected |
127 | */ | 129 | */ |
128 | struct GNUNET_MESH_PeerControl { | 130 | struct GNUNET_MESH_PeerControl |
131 | { | ||
129 | 132 | ||
130 | /** | 133 | /** |
131 | * Type: GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT_PEER_[ADD|DEL] | 134 | * Type: GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT_PEER_[ADD|DEL] |
@@ -135,38 +138,39 @@ struct GNUNET_MESH_PeerControl { | |||
135 | * | 138 | * |
136 | * Size: sizeof(struct GNUNET_MESH_PeerControl) | 139 | * Size: sizeof(struct GNUNET_MESH_PeerControl) |
137 | */ | 140 | */ |
138 | struct GNUNET_MessageHeader header; | 141 | struct GNUNET_MessageHeader header; |
139 | 142 | ||
140 | /** | 143 | /** |
141 | * ID of a tunnel controlled by this client. | 144 | * ID of a tunnel controlled by this client. |
142 | */ | 145 | */ |
143 | MESH_TunnelNumber tunnel_id GNUNET_PACKED; | 146 | MESH_TunnelNumber tunnel_id GNUNET_PACKED; |
144 | 147 | ||
145 | /** | 148 | /** |
146 | * Peer to connect/disconnect. | 149 | * Peer to connect/disconnect. |
147 | */ | 150 | */ |
148 | struct GNUNET_PeerIdentity peer; | 151 | struct GNUNET_PeerIdentity peer; |
149 | }; | 152 | }; |
150 | 153 | ||
151 | 154 | ||
152 | /** | 155 | /** |
153 | * Message for connecting to peers offering a certain service. | 156 | * Message for connecting to peers offering a certain service. |
154 | */ | 157 | */ |
155 | struct GNUNET_MESH_ConnectPeerByType { | 158 | struct GNUNET_MESH_ConnectPeerByType |
159 | { | ||
156 | /** | 160 | /** |
157 | * Type: GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT_PEER_BY_TYPE | 161 | * Type: GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT_PEER_BY_TYPE |
158 | */ | 162 | */ |
159 | struct GNUNET_MessageHeader header; | 163 | struct GNUNET_MessageHeader header; |
160 | 164 | ||
161 | /** | 165 | /** |
162 | * ID of a tunnel controlled by this client. | 166 | * ID of a tunnel controlled by this client. |
163 | */ | 167 | */ |
164 | MESH_TunnelNumber tunnel_id GNUNET_PACKED; | 168 | MESH_TunnelNumber tunnel_id GNUNET_PACKED; |
165 | 169 | ||
166 | /** | 170 | /** |
167 | * Type specification | 171 | * Type specification |
168 | */ | 172 | */ |
169 | GNUNET_MESH_ApplicationType type GNUNET_PACKED; | 173 | GNUNET_MESH_ApplicationType type GNUNET_PACKED; |
170 | }; | 174 | }; |
171 | 175 | ||
172 | #endif | 176 | #endif |