aboutsummaryrefslogtreecommitdiff
path: root/src/vpn/vpn.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-01-07 19:26:53 +0000
committerChristian Grothoff <christian@grothoff.org>2012-01-07 19:26:53 +0000
commit6610dea80399451f4eae448c001bf8e425d6e5ab (patch)
tree25fd0840f3226defde9d5c017512ff91daa4b71a /src/vpn/vpn.h
parent4c6f5a7ae36bbed02ecd1ae78ecff44e93c0970b (diff)
downloadgnunet-6610dea80399451f4eae448c001bf8e425d6e5ab.tar.gz
gnunet-6610dea80399451f4eae448c001bf8e425d6e5ab.zip
-defining IPC messages for VPN
Diffstat (limited to 'src/vpn/vpn.h')
-rw-r--r--src/vpn/vpn.h115
1 files changed, 115 insertions, 0 deletions
diff --git a/src/vpn/vpn.h b/src/vpn/vpn.h
index da7fa6eb8..90bcdaa61 100644
--- a/src/vpn/vpn.h
+++ b/src/vpn/vpn.h
@@ -28,8 +28,123 @@
28 28
29#include "gnunet_util_lib.h" 29#include "gnunet_util_lib.h"
30 30
31/**
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.
35 */
36struct RedirectToIpRequestMessage
37{
38 /**
39 * Type is GNUNET_MESSAGE_TYPE_VPN_CLIENT_REDIRECT_TO_IP
40 */
41 struct GNUNET_MessageHeader header;
42
43 /**
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).
46 */
47 int32_t nac;
48
49 /**
50 * How long should the redirection be maintained at most?
51 */
52 struct GNUNET_TIME_AbsoluteNBO expiration_time;
53
54 /**
55 * Address family desired for the result (AF_INET or AF_INET6 or AF_UNSPEC, in nbo)
56 */
57 int32_t result_af;
58
59 /**
60 * Address family used for the destination address (AF_INET or AF_INET6, in nbo)
61 */
62 int32_t addr_af;
63
64 /**
65 * Unique ID to match a future response to this request.
66 * Picked by the client.
67 */
68 uint64_t request_id;
69
70 /* followed by destination address ('struct in_addr' or 'struct in6_addr') */
71
72};
73
74
75/**
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.
79 */
80struct RedirectToServiceRequestMessage
81{
82 /**
83 * Type is GNUNET_MESSAGE_TYPE_VPN_CLIENT_REDIRECT_TO_IP
84 */
85 struct GNUNET_MessageHeader header;
86
87 /**
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).
90 */
91 int32_t nac;
92
93 /**
94 * How long should the redirection be maintained at most?
95 */
96 struct GNUNET_TIME_AbsoluteNBO expiration_time;
97
98 /**
99 * Desired protocol (IPPROTO_UDP or IPPROTO_TCP)
100 */
101 int32_t protocol;
102
103 /**
104 * Address family desired for the result (AF_INET or AF_INET6 or AF_UNSPEC, in nbo)
105 */
106 int32_t result_af;
107
108 /**
109 * Target peer offering the service.
110 */
111 struct GNUNET_PeerIdentity target;
112
113 /**
114 * Service descriptor identifying the service.
115 */
116 struct GNUNET_PeerIdentity desc;
117
118 /**
119 * Unique ID to match a future response to this request.
120 * Picked by the client.
121 */
122 uint64_t request_id;
123
124};
125
126
127/**
128 * Response from the VPN service to a VPN client informing about
129 * the IP that was assigned for the requested redirection.
130 */
131struct RedirectToIpResponseMessage
132{
133
134 /**
135 * Type is GNUNET_MESSAGE_TYPE_VPN_CLIENT_REDIRECT_TO_IP
136 */
137 struct GNUNET_MessageHeader header;
31 138
139 /**
140 * Address family of the allocated address that follows; will match
141 * "result_af" from the request, of be "AF_UNSPEC" on errors.
142 */
143 int32_t result_af;
32 144
145 /* followed by destination address ('struct in_addr' or 'struct in6_addr') */
146
147};
33 148
34 149
35#endif 150#endif