aboutsummaryrefslogtreecommitdiff
path: root/src/tun
diff options
context:
space:
mode:
Diffstat (limited to 'src/tun')
-rw-r--r--src/tun/regex.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/tun/regex.c b/src/tun/regex.c
index 5ec454637..0d259a8d5 100644
--- a/src/tun/regex.c
+++ b/src/tun/regex.c
@@ -138,4 +138,37 @@ GNUNET_TUN_ipv6toregex (const struct in6_addr *ipv6, unsigned int prefixlen,
138 strcat (rxstr, "(0|1)+"); 138 strcat (rxstr, "(0|1)+");
139} 139}
140 140
141
142/**
143 * Convert an exit policy to a regular expression. The exit policy
144 * specifies a set of subnets this peer is willing to serve as an
145 * exit for; the resulting regular expression will match the
146 * IPv4 address strings as returned by 'GNUNET_TUN_ipv4toregex'.
147 *
148 * @param policy exit policy specification
149 * @return regular expression, NULL on error
150 */
151char *
152GNUNET_TUN_ipv4policy2regex (const char *policy)
153{
154 return GNUNET_strdup (policy);
155}
156
157
158/**
159 * Convert an exit policy to a regular expression. The exit policy
160 * specifies a set of subnets this peer is willing to serve as an
161 * exit for; the resulting regular expression will match the
162 * IPv4 address strings as returned by 'GNUNET_TUN_ipv4toregex'.
163 *
164 * @param policy exit policy specification
165 * @return regular expression, NULL on error
166 */
167char *
168GNUNET_TUN_ipv6policy2regex (const char *policy)
169{
170 return GNUNET_strdup (policy);
171}
172
173
141/* end of regex.c */ 174/* end of regex.c */