From a53a186e50dc5c18513b1e10c3c044c4865d5994 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 20 Jan 2012 23:54:16 +0000 Subject: -adding ICMP support to exit daemon --- src/exit/exit.h | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) (limited to 'src/exit/exit.h') diff --git a/src/exit/exit.h b/src/exit/exit.h index 3cd4292bd..92918b92a 100644 --- a/src/exit/exit.h +++ b/src/exit/exit.h @@ -206,4 +206,87 @@ struct GNUNET_EXIT_UdpReplyMessage }; +/** + * Message send via mesh to an exit daemon to send + * ICMP data to a local service. + */ +struct GNUNET_EXIT_IcmpServiceMessage +{ + /** + * Type is GNUNET_MESSAGE_TYPE_VPN_ICMP_TO_SERVICE + */ + struct GNUNET_MessageHeader header; + + /** + * Address family, AF_INET or AF_INET6, in network byte order. + */ + int32_t af; + + /** + * Identification for the desired service. + */ + GNUNET_HashCode service_descriptor; + + /** + * ICMP header to use. + */ + struct GNUNET_TUN_IcmpHeader icmp_header; + + /* followed by ICMP payload */ +}; + + +/** + * Message send via mesh to an exit daemon to forward + * ICMP data to the Internet. + */ +struct GNUNET_EXIT_IcmpInternetMessage +{ + /** + * Type is GNUNET_MESSAGE_TYPE_VPN_ICMP_TO_INTERNET + */ + struct GNUNET_MessageHeader header; + + /** + * Address family, AF_INET or AF_INET6, in network byte order. + */ + int32_t af; + + /** + * ICMP header to use. + */ + struct GNUNET_TUN_IcmpHeader icmp_header; + + /* followed by IP address of the destination; either + 'struct in_addr' or 'struct in6_addr', depending on af */ + + /* followed by ICMP payload */ +}; + + +/** + * Message send via mesh to the vpn service to send + * ICMP data to the VPN's TUN interface. + */ +struct GNUNET_EXIT_IcmpToVPNMessage +{ + /** + * Type is GNUNET_MESSAGE_TYPE_VPN_ICMP_TO_VPN + */ + struct GNUNET_MessageHeader header; + + /** + * Address family, AF_INET or AF_INET6, in network byte order. + */ + int32_t af; + + /** + * ICMP header to use. + */ + struct GNUNET_TUN_IcmpHeader icmp_header; + + /* followed by ICMP payload */ +}; + + #endif -- cgit v1.2.3