From a909bc99632f438857214641ea766ff5ca5a7760 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 23 Oct 2016 17:49:49 +0000 Subject: [PATCH] start defining IPC messages for NAT --- src/nat/nat.h | 127 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 125 insertions(+), 2 deletions(-) diff --git a/src/nat/nat.h b/src/nat/nat.h index 0cf90f1be..e7bee54c0 100644 --- a/src/nat/nat.h +++ b/src/nat/nat.h @@ -20,7 +20,7 @@ /** * @file src/nat/nat.h - * @brief Messages for interaction with gnunet-nat-server + * @brief Messages for interaction with gnunet-nat-server and gnunet-nat-service * @author Christian Grothoff * */ @@ -32,7 +32,8 @@ GNUNET_NETWORK_STRUCT_BEGIN /** - * Request to test NAT traversal. + * Request to test NAT traversal, sent to the gnunet-nat-server + * (not the service!). */ struct GNUNET_NAT_TestMessage { @@ -62,6 +63,128 @@ struct GNUNET_NAT_TestMessage int32_t is_tcp; }; + + +/** + * + */ +struct GNUNET_NAT_RegisterMessage +{ + /** + * Header with type #GNUNET_MESSAGE_TYPE_NAT_REGISTER + */ + struct GNUNET_MessageHeader header; +}; + + +/** + * + */ +struct GNUNET_NAT_HandleStunMessage +{ + /** + * Header with type #GNUNET_MESSAGE_TYPE_NAT_HANDLE_STUN + */ + struct GNUNET_MessageHeader header; +}; + + +/** + * + */ +struct GNUNET_NAT_RequestConnectionReversalMessage +{ + /** + * Header with type #GNUNET_MESSAGE_TYPE_NAT_REQUEST_CONNECTION_REVERSAL + */ + struct GNUNET_MessageHeader header; +}; + + +/** + * + */ +struct GNUNET_NAT_ConnectionReversalRequestedMessage +{ + /** + * Header with type #GNUNET_MESSAGE_TYPE_NAT_CONNECTION_REVERSAL_REQUESTED + */ + struct GNUNET_MessageHeader header; +}; + + +/** + * + */ +struct GNUNET_NAT_AddressChangeNotificationMessage +{ + /** + * Header with type #GNUNET_MESSAGE_TYPE_NAT_ADDRESS_CHANGE + */ + struct GNUNET_MessageHeader header; +}; + + +/** + * + */ +struct GNUNET_NAT_Ipv4ChangeNotificationMessage +{ + /** + * Header with type #GNUNET_MESSAGE_TYPE_NAT_IPV4_CHANGE + */ + struct GNUNET_MessageHeader header; +}; + + +/** + * + */ +struct GNUNET_NAT_RequestTestMessage +{ + /** + * Header with type #GNUNET_MESSAGE_TYPE_NAT_REQUEST_TEST + */ + struct GNUNET_MessageHeader header; +}; + + +/** + * + */ +struct GNUNET_NAT_TestResultMessage +{ + /** + * Header with type #GNUNET_MESSAGE_TYPE_NAT_TEST_RESULT + */ + struct GNUNET_MessageHeader header; +}; + + +/** + * + */ +struct GNUNET_NAT_AutoconfigRequestMessage +{ + /** + * Header with type #GNUNET_MESSAGE_TYPE_NAT_REQUEST_AUTO_CFG + */ + struct GNUNET_MessageHeader header; +}; + + +/** + * + */ +struct GNUNET_NAT_AutoconfigResultMessage +{ + /** + * Header with type #GNUNET_MESSAGE_TYPE_NAT_AUTO_CFG_RESULT + */ + struct GNUNET_MessageHeader header; +}; + + GNUNET_NETWORK_STRUCT_END #endif -- 2.25.1