aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_vpn_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-01-07 19:27:01 +0000
committerChristian Grothoff <christian@grothoff.org>2012-01-07 19:27:01 +0000
commit2b10e1f8373f14ffdeb40e735340fd467dee0b0d (patch)
tree8abce7f737edcfb671800ef017b52a1c1b9331e2 /src/include/gnunet_vpn_service.h
parent6610dea80399451f4eae448c001bf8e425d6e5ab (diff)
downloadgnunet-2b10e1f8373f14ffdeb40e735340fd467dee0b0d.tar.gz
gnunet-2b10e1f8373f14ffdeb40e735340fd467dee0b0d.zip
-defining IPC messages for VPN
Diffstat (limited to 'src/include/gnunet_vpn_service.h')
-rw-r--r--src/include/gnunet_vpn_service.h28
1 files changed, 19 insertions, 9 deletions
diff --git a/src/include/gnunet_vpn_service.h b/src/include/gnunet_vpn_service.h
index 740e05500..76befaae0 100644
--- a/src/include/gnunet_vpn_service.h
+++ b/src/include/gnunet_vpn_service.h
@@ -26,7 +26,6 @@
26#ifndef GNUNET_VPN_SERVICE_H 26#ifndef GNUNET_VPN_SERVICE_H
27#define GNUNET_VPN_SERVICE_H 27#define GNUNET_VPN_SERVICE_H
28 28
29#include "gnunet_common.h"
30#include "gnunet_util_lib.h" 29#include "gnunet_util_lib.h"
31 30
32 31
@@ -47,7 +46,8 @@ struct GNUNET_VPN_RedirectionRequest;
47 * reach the requested destination. 46 * reach the requested destination.
48 * 47 *
49 * @param cls closure 48 * @param cls closure
50 * @param af address family, AF_INET or AF_INET6; AF_UNSPEC on error 49 * @param af address family, AF_INET or AF_INET6; AF_UNSPEC on error;
50 * will match 'result_af' from the request
51 * @param address IP address (struct in_addr or struct in_addr6, depending on 'af') 51 * @param address IP address (struct in_addr or struct in_addr6, depending on 'af')
52 * that the VPN allocated for the redirection; 52 * that the VPN allocated for the redirection;
53 * traffic to this IP will now be redirected to the 53 * traffic to this IP will now be redirected to the
@@ -76,13 +76,16 @@ GNUNET_VPN_cancel_request (struct GNUNET_VPN_RedirectionRequest *rr);
76 * limitations, the longest inactive mappings will be destroyed. 76 * limitations, the longest inactive mappings will be destroyed.
77 * 77 *
78 * @param vh VPN handle 78 * @param vh VPN handle
79 * @param af address family, AF_INET or AF_INET6 79 * @param result_af desired address family for the returned allocation
80 * can also be AF_UNSPEC
80 * @param protocol protocol, IPPROTO_UDP or IPPROTO_TCP 81 * @param protocol protocol, IPPROTO_UDP or IPPROTO_TCP
81 * @param peer target peer for the redirection 82 * @param peer target peer for the redirection
82 * @param serv service descriptor to give to the peer 83 * @param serv service descriptor to give to the peer
83 * @param nac GNUNET_YES to notify via callback only after completion of 84 * @param nac GNUNET_YES to notify via callback only after completion of
84 * the MESH-level connection, 85 * the MESH-level connection,
85 * GNUNET_NO to notify as soon as the IP has been reserved 86 * GNUNET_NO to notify as soon as the IP has been reserved
87 * @param expiration_time at what time should the redirection expire?
88 * (this should not impact connections that are active at that time)
86 * @param cb function to call with the IP 89 * @param cb function to call with the IP
87 * @param cb_cls closure for cb 90 * @param cb_cls closure for cb
88 * @return handle to cancel the request (means the callback won't be 91 * @return handle to cancel the request (means the callback won't be
@@ -90,12 +93,13 @@ GNUNET_VPN_cancel_request (struct GNUNET_VPN_RedirectionRequest *rr);
90 * anyway) 93 * anyway)
91 */ 94 */
92struct GNUNET_VPN_RedirectionRequest * 95struct GNUNET_VPN_RedirectionRequest *
93GNUNET_VPN_redirect_to_peer (struct GNUNET_VPN_RequestHandle *rh, 96GNUNET_VPN_redirect_to_peer (struct GNUNET_VPN_Handle *rh,
94 int af, 97 int result_af,
95 uint8_t protocol, 98 uint8_t protocol,
96 const struct GNUNET_PeerIdentity *peer, 99 const struct GNUNET_PeerIdentity *peer,
97 const HashCode *serv, 100 const GNUNET_HashCode *serv,
98 int nac, 101 int nac,
102 struct GNUNET_TIME_Absolute expiration_time,
99 GNUNET_VPN_AllocationCallback cb, 103 GNUNET_VPN_AllocationCallback cb,
100 void *cb_cls); 104 void *cb_cls);
101 105
@@ -110,12 +114,16 @@ GNUNET_VPN_redirect_to_peer (struct GNUNET_VPN_RequestHandle *rh,
110 * limitations, the longest inactive mappings will be destroyed. 114 * limitations, the longest inactive mappings will be destroyed.
111 * 115 *
112 * @param vh VPN handle 116 * @param vh VPN handle
113 * @param af address family, AF_INET or AF_INET6 117 * @param result_af desired address family for the returned allocation,
118 * can also be AF_UNSPEC
119 * @param addr_af address family for 'addr', AF_INET or AF_INET6
114 * @param addr destination IP address on the Internet; destination 120 * @param addr destination IP address on the Internet; destination
115 * port is to be taken from the VPN packet itself 121 * port is to be taken from the VPN packet itself
116 * @param nac GNUNET_YES to notify via callback only after completion of 122 * @param nac GNUNET_YES to notify via callback only after completion of
117 * the MESH-level connection, 123 * the MESH-level connection,
118 * GNUNET_NO to notify as soon as the IP has been reserved 124 * GNUNET_NO to notify as soon as the IP has been reserved
125 * @param expiration_time at what time should the redirection expire?
126 * (this should not impact connections that are active at that time)
119 * @param cb function to call with the IP 127 * @param cb function to call with the IP
120 * @param cb_cls closure for cb 128 * @param cb_cls closure for cb
121 * @return handle to cancel the request (means the callback won't be 129 * @return handle to cancel the request (means the callback won't be
@@ -123,10 +131,12 @@ GNUNET_VPN_redirect_to_peer (struct GNUNET_VPN_RequestHandle *rh,
123 * anyway) 131 * anyway)
124 */ 132 */
125struct GNUNET_VPN_RedirectionRequest * 133struct GNUNET_VPN_RedirectionRequest *
126GNUNET_VPN_redirect_to_ip (struct GNUNET_VPN_RequestHandle *rh, 134GNUNET_VPN_redirect_to_ip (struct GNUNET_VPN_Handle *rh,
127 int af, 135 int result_af,
136 int addr_af,
128 const void *addr, 137 const void *addr,
129 int nac, 138 int nac,
139 struct GNUNET_TIME_Absolute expiration_time,
130 GNUNET_VPN_AllocationCallback cb, 140 GNUNET_VPN_AllocationCallback cb,
131 void *cb_cls); 141 void *cb_cls);
132 142