aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_nat_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-10-05 15:09:28 +0200
committerChristian Grothoff <christian@grothoff.org>2019-10-05 15:09:28 +0200
commitc4e9ba925ffd758aaa3feee2ccfc0b76f26fe207 (patch)
treecac3ce030d77b4cbe7c7dc62ed58cfe6d24f73e1 /src/include/gnunet_nat_service.h
parentfbb71d527c7d6babf269a8fefce1db291b9f7068 (diff)
downloadgnunet-c4e9ba925ffd758aaa3feee2ccfc0b76f26fe207.tar.gz
gnunet-c4e9ba925ffd758aaa3feee2ccfc0b76f26fe207.zip
global reindent, now with uncrustify hook enabled
Diffstat (limited to 'src/include/gnunet_nat_service.h')
-rw-r--r--src/include/gnunet_nat_service.h63
1 files changed, 33 insertions, 30 deletions
diff --git a/src/include/gnunet_nat_service.h b/src/include/gnunet_nat_service.h
index 7f0e9764b..4273b5ad1 100644
--- a/src/include/gnunet_nat_service.h
+++ b/src/include/gnunet_nat_service.h
@@ -49,7 +49,8 @@
49 * an equivalent enum in gnunet_transport_hello_service.h; 49 * an equivalent enum in gnunet_transport_hello_service.h;
50 * might ultimately belong with the new HELLO definition. 50 * might ultimately belong with the new HELLO definition.
51 */ 51 */
52enum GNUNET_NAT_AddressClass { 52enum GNUNET_NAT_AddressClass
53{
53 /** 54 /**
54 * No address. 55 * No address.
55 */ 56 */
@@ -136,7 +137,8 @@ enum GNUNET_NAT_AddressClass {
136/** 137/**
137 * Error Types for the NAT subsystem (which can then later be converted/resolved to a string) 138 * Error Types for the NAT subsystem (which can then later be converted/resolved to a string)
138 */ 139 */
139enum GNUNET_NAT_StatusCode { 140enum GNUNET_NAT_StatusCode
141{
140 /** 142 /**
141 * Just the default 143 * Just the default
142 */ 144 */
@@ -238,7 +240,8 @@ enum GNUNET_NAT_StatusCode {
238/** 240/**
239 * What the situation of the NAT connectivity 241 * What the situation of the NAT connectivity
240 */ 242 */
241enum GNUNET_NAT_Type { 243enum GNUNET_NAT_Type
244{
242 /** 245 /**
243 * We have a direct connection 246 * We have a direct connection
244 */ 247 */
@@ -331,15 +334,15 @@ struct GNUNET_NAT_Handle;
331 * @return NULL on error, otherwise handle that can be used to unregister 334 * @return NULL on error, otherwise handle that can be used to unregister
332 */ 335 */
333struct GNUNET_NAT_Handle * 336struct GNUNET_NAT_Handle *
334GNUNET_NAT_register(const struct GNUNET_CONFIGURATION_Handle *cfg, 337GNUNET_NAT_register (const struct GNUNET_CONFIGURATION_Handle *cfg,
335 const char *config_section, 338 const char *config_section,
336 uint8_t proto, 339 uint8_t proto,
337 unsigned int num_addrs, 340 unsigned int num_addrs,
338 const struct sockaddr **addrs, 341 const struct sockaddr **addrs,
339 const socklen_t *addrlens, 342 const socklen_t *addrlens,
340 GNUNET_NAT_AddressCallback address_callback, 343 GNUNET_NAT_AddressCallback address_callback,
341 GNUNET_NAT_ReversalCallback reversal_callback, 344 GNUNET_NAT_ReversalCallback reversal_callback,
342 void *callback_cls); 345 void *callback_cls);
343 346
344 347
345/** 348/**
@@ -356,9 +359,9 @@ GNUNET_NAT_register(const struct GNUNET_CONFIGURATION_Handle *cfg,
356 * #GNUNET_SYSERR if the address is malformed 359 * #GNUNET_SYSERR if the address is malformed
357 */ 360 */
358int 361int
359GNUNET_NAT_test_address(struct GNUNET_NAT_Handle *nh, 362GNUNET_NAT_test_address (struct GNUNET_NAT_Handle *nh,
360 const void *addr, 363 const void *addr,
361 socklen_t addrlen); 364 socklen_t addrlen);
362 365
363 366
364/** 367/**
@@ -374,9 +377,9 @@ GNUNET_NAT_test_address(struct GNUNET_NAT_Handle *nh,
374 * #GNUNET_OK otherwise (presumably in progress) 377 * #GNUNET_OK otherwise (presumably in progress)
375 */ 378 */
376int 379int
377GNUNET_NAT_request_reversal(struct GNUNET_NAT_Handle *nh, 380GNUNET_NAT_request_reversal (struct GNUNET_NAT_Handle *nh,
378 const struct sockaddr_in *local_sa, 381 const struct sockaddr_in *local_sa,
379 const struct sockaddr_in *remote_sa); 382 const struct sockaddr_in *remote_sa);
380 383
381 384
382/** 385/**
@@ -387,7 +390,7 @@ GNUNET_NAT_request_reversal(struct GNUNET_NAT_Handle *nh,
387 * @param nh the handle to unregister 390 * @param nh the handle to unregister
388 */ 391 */
389void 392void
390GNUNET_NAT_unregister(struct GNUNET_NAT_Handle *nh); 393GNUNET_NAT_unregister (struct GNUNET_NAT_Handle *nh);
391 394
392 395
393/** 396/**
@@ -414,11 +417,11 @@ GNUNET_NAT_unregister(struct GNUNET_NAT_Handle *nh);
414 * #GNUNET_SYSERR on internal error handling the packet 417 * #GNUNET_SYSERR on internal error handling the packet
415 */ 418 */
416int 419int
417GNUNET_NAT_stun_handle_packet(struct GNUNET_NAT_Handle *nh, 420GNUNET_NAT_stun_handle_packet (struct GNUNET_NAT_Handle *nh,
418 const struct sockaddr *sender_addr, 421 const struct sockaddr *sender_addr,
419 size_t sender_addr_len, 422 size_t sender_addr_len,
420 const void *data, 423 const void *data,
421 size_t data_size); 424 size_t data_size);
422 425
423 426
424/** 427/**
@@ -456,11 +459,11 @@ typedef void
456 * @return NULL on error 459 * @return NULL on error
457 */ 460 */
458struct GNUNET_NAT_STUN_Handle * 461struct GNUNET_NAT_STUN_Handle *
459GNUNET_NAT_stun_make_request(const char *server, 462GNUNET_NAT_stun_make_request (const char *server,
460 uint16_t port, 463 uint16_t port,
461 struct GNUNET_NETWORK_Handle *sock, 464 struct GNUNET_NETWORK_Handle *sock,
462 GNUNET_NAT_TestCallback cb, 465 GNUNET_NAT_TestCallback cb,
463 void *cb_cls); 466 void *cb_cls);
464 467
465 468
466/** 469/**
@@ -470,7 +473,7 @@ GNUNET_NAT_stun_make_request(const char *server,
470 * @param rh request to cancel 473 * @param rh request to cancel
471 */ 474 */
472void 475void
473GNUNET_NAT_stun_make_request_cancel(struct GNUNET_NAT_STUN_Handle *rh); 476GNUNET_NAT_stun_make_request_cancel (struct GNUNET_NAT_STUN_Handle *rh);
474 477
475 478
476#endif 479#endif