2 This file is part of GNUnet.
3 (C) 2012 Christian Grothoff
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
23 * @brief IPC messages between VPN library and VPN service
24 * @author Christian Grothoff
29 #include "gnunet_util_lib.h"
32 * Message send by the VPN client to the VPN service requesting
33 * the setup of a redirection from some IP via an exit node to
34 * some global Internet address.
36 struct RedirectToIpRequestMessage
39 * Type is GNUNET_MESSAGE_TYPE_VPN_CLIENT_REDIRECT_TO_IP
41 struct GNUNET_MessageHeader header;
44 * GNUNET_YES to notify only after completion of the mesh-level connection,
45 * GNUNET_NO to notify as soon as an address was allocated (in nbo).
50 * How long should the redirection be maintained at most?
52 struct GNUNET_TIME_AbsoluteNBO expiration_time;
55 * Address family desired for the result (AF_INET or AF_INET6 or AF_UNSPEC, in nbo)
60 * Address family used for the destination address (AF_INET or AF_INET6, in nbo)
65 * Unique ID to match a future response to this request.
66 * Picked by the client.
70 /* followed by destination address ('struct in_addr' or 'struct in6_addr') */
76 * Message send by the VPN client to the VPN service requesting
77 * the setup of a redirection from some IP to a service running
78 * at a particular peer.
80 struct RedirectToServiceRequestMessage
83 * Type is GNUNET_MESSAGE_TYPE_VPN_CLIENT_REDIRECT_TO_IP
85 struct GNUNET_MessageHeader header;
88 * GNUNET_YES to notify only after completion of the mesh-level connection,
89 * GNUNET_NO to notify as soon as an address was allocated (in nbo).
94 * How long should the redirection be maintained at most?
96 struct GNUNET_TIME_AbsoluteNBO expiration_time;
99 * Desired protocol (IPPROTO_UDP or IPPROTO_TCP)
104 * Address family desired for the result (AF_INET or AF_INET6 or AF_UNSPEC, in nbo)
109 * Target peer offering the service.
111 struct GNUNET_PeerIdentity target;
114 * Service descriptor identifying the service.
116 GNUNET_HashCode service_descriptor;
119 * Unique ID to match a future response to this request.
120 * Picked by the client.
128 * Response from the VPN service to a VPN client informing about
129 * the IP that was assigned for the requested redirection.
131 struct RedirectToIpResponseMessage
135 * Type is GNUNET_MESSAGE_TYPE_VPN_CLIENT_USE_IP
137 struct GNUNET_MessageHeader header;
140 * Address family of the allocated address that follows; will match
141 * "result_af" from the request, of be "AF_UNSPEC" on errors.
146 * Unique ID to match the response to a request.
150 /* followed by destination address ('struct in_addr' or 'struct in6_addr') */