aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorWillow Liquorice <willow@howhill.com>2022-09-04 03:22:05 +0100
committerWillow Liquorice <willow@howhill.com>2022-10-03 00:44:33 +0100
commit5f00aea2b3f7e5054e1467178ae62dccc8a5012d (patch)
tree97c2aa22cdbfc842e34f98450dca0bc42074bd4d /src/util
parent64711ee52d72c750cac809a88d92737b080a438c (diff)
downloadgnunet-5f00aea2b3f7e5054e1467178ae62dccc8a5012d.tar.gz
gnunet-5f00aea2b3f7e5054e1467178ae62dccc8a5012d.zip
-DOC: Comment stripping pass through UTIL dnsstub, regex, speedup, and TUN libraries
Diffstat (limited to 'src/util')
-rw-r--r--src/util/dnsstub.c7
-rw-r--r--src/util/regex.c42
-rw-r--r--src/util/speedup.c6
-rw-r--r--src/util/tun.c39
4 files changed, 1 insertions, 93 deletions
diff --git a/src/util/dnsstub.c b/src/util/dnsstub.c
index c2f2a441f..38f0eb004 100644
--- a/src/util/dnsstub.c
+++ b/src/util/dnsstub.c
@@ -387,7 +387,7 @@ do_dns_read (struct GNUNET_DNSSTUB_RequestSocket *rs,
387/** 387/**
388 * Read a DNS response from the (unhindered) UDP-Socket 388 * Read a DNS response from the (unhindered) UDP-Socket
389 * 389 *
390 * @param cls socket to read from 390 * @param cls `struct GNUNET_DNSSTUB_RequestSocket` to read from
391 */ 391 */
392static void 392static void
393read_response (void *cls); 393read_response (void *cls);
@@ -421,11 +421,6 @@ schedule_read (struct GNUNET_DNSSTUB_RequestSocket *rs)
421} 421}
422 422
423 423
424/**
425 * Read a DNS response from the (unhindered) UDP-Socket
426 *
427 * @param cls `struct GNUNET_DNSSTUB_RequestSocket` to read from
428 */
429static void 424static void
430read_response (void *cls) 425read_response (void *cls)
431{ 426{
diff --git a/src/util/regex.c b/src/util/regex.c
index fed325cd6..c2040a4b8 100644
--- a/src/util/regex.c
+++ b/src/util/regex.c
@@ -33,14 +33,6 @@
33#define DOT "(0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F)" 33#define DOT "(0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F)"
34 34
35 35
36/**
37 * Create a regex in @a rxstr from the given @a ip and @a netmask.
38 *
39 * @param ip IPv4 representation.
40 * @param port destination port
41 * @param rxstr generated regex, must be at least #GNUNET_TUN_IPV4_REGEXLEN
42 * bytes long.
43 */
44void 36void
45GNUNET_TUN_ipv4toregexsearch (const struct in_addr *ip, 37GNUNET_TUN_ipv4toregexsearch (const struct in_addr *ip,
46 uint16_t port, 38 uint16_t port,
@@ -54,14 +46,6 @@ GNUNET_TUN_ipv4toregexsearch (const struct in_addr *ip,
54} 46}
55 47
56 48
57/**
58 * Create a regex in @a rxstr from the given @a ipv6 and @a prefixlen.
59 *
60 * @param ipv6 IPv6 representation.
61 * @param port destination port
62 * @param rxstr generated regex, must be at least #GNUNET_TUN_IPV6_REGEXLEN
63 * bytes long.
64 */
65void 49void
66GNUNET_TUN_ipv6toregexsearch (const struct in6_addr *ipv6, 50GNUNET_TUN_ipv6toregexsearch (const struct in6_addr *ipv6,
67 uint16_t port, 51 uint16_t port,
@@ -694,15 +678,6 @@ ipv6_to_regex (const struct GNUNET_STRINGS_IPv6NetworkPolicy *v6)
694} 678}
695 679
696 680
697/**
698 * Convert an exit policy to a regular expression. The exit policy
699 * specifies a set of subnets this peer is willing to serve as an
700 * exit for; the resulting regular expression will match the
701 * IPv4 address strings as returned by #GNUNET_TUN_ipv4toregexsearch().
702 *
703 * @param policy exit policy specification
704 * @return regular expression, NULL on error
705 */
706char * 681char *
707GNUNET_TUN_ipv4policy2regex (const char *policy) 682GNUNET_TUN_ipv4policy2regex (const char *policy)
708{ 683{
@@ -746,15 +721,6 @@ GNUNET_TUN_ipv4policy2regex (const char *policy)
746} 721}
747 722
748 723
749/**
750 * Convert an exit policy to a regular expression. The exit policy
751 * specifies a set of subnets this peer is willing to serve as an
752 * exit for; the resulting regular expression will match the
753 * IPv6 address strings as returned by #GNUNET_TUN_ipv6toregexsearch().
754 *
755 * @param policy exit policy specification
756 * @return regular expression, NULL on error
757 */
758char * 724char *
759GNUNET_TUN_ipv6policy2regex (const char *policy) 725GNUNET_TUN_ipv6policy2regex (const char *policy)
760{ 726{
@@ -802,14 +768,6 @@ GNUNET_TUN_ipv6policy2regex (const char *policy)
802} 768}
803 769
804 770
805/**
806 * Hash the service name of a hosted service to the
807 * hash code that is used to identify the service on
808 * the network.
809 *
810 * @param service_name a string
811 * @param hc corresponding hash
812 */
813void 771void
814GNUNET_TUN_service_name_to_hash (const char *service_name, 772GNUNET_TUN_service_name_to_hash (const char *service_name,
815 struct GNUNET_HashCode *hc) 773 struct GNUNET_HashCode *hc)
diff --git a/src/util/speedup.c b/src/util/speedup.c
index 3d9e82319..82a8746a9 100644
--- a/src/util/speedup.c
+++ b/src/util/speedup.c
@@ -55,12 +55,6 @@ do_speedup (void *cls)
55} 55}
56 56
57 57
58/**
59 * Start task that may speed up our system clock artificially
60 *
61 * @param cfg configuration to use
62 * @return #GNUNET_OK on success, #GNUNET_SYSERR if the speedup was not configured
63 */
64int 58int
65GNUNET_SPEEDUP_start_ (const struct GNUNET_CONFIGURATION_Handle *cfg) 59GNUNET_SPEEDUP_start_ (const struct GNUNET_CONFIGURATION_Handle *cfg)
66{ 60{
diff --git a/src/util/tun.c b/src/util/tun.c
index d2b675c71..e22cf0be8 100644
--- a/src/util/tun.c
+++ b/src/util/tun.c
@@ -97,14 +97,6 @@ GNUNET_TUN_initialize_ipv6_header (struct GNUNET_TUN_IPv6Header *ip,
97} 97}
98 98
99 99
100/**
101 * Calculate IPv4 TCP checksum.
102 *
103 * @param ip ipv4 header fully initialized
104 * @param tcp TCP header (initialized except for CRC)
105 * @param payload the TCP payload
106 * @param payload_length number of bytes of TCP payload
107 */
108void 100void
109GNUNET_TUN_calculate_tcp4_checksum (const struct GNUNET_TUN_IPv4Header *ip, 101GNUNET_TUN_calculate_tcp4_checksum (const struct GNUNET_TUN_IPv4Header *ip,
110 struct GNUNET_TUN_TcpHeader *tcp, 102 struct GNUNET_TUN_TcpHeader *tcp,
@@ -135,14 +127,6 @@ GNUNET_TUN_calculate_tcp4_checksum (const struct GNUNET_TUN_IPv4Header *ip,
135} 127}
136 128
137 129
138/**
139 * Calculate IPv6 TCP checksum.
140 *
141 * @param ip ipv6 header fully initialized
142 * @param tcp header (initialized except for CRC)
143 * @param payload the TCP payload
144 * @param payload_length number of bytes of TCP payload
145 */
146void 130void
147GNUNET_TUN_calculate_tcp6_checksum (const struct GNUNET_TUN_IPv6Header *ip, 131GNUNET_TUN_calculate_tcp6_checksum (const struct GNUNET_TUN_IPv6Header *ip,
148 struct GNUNET_TUN_TcpHeader *tcp, 132 struct GNUNET_TUN_TcpHeader *tcp,
@@ -171,14 +155,6 @@ GNUNET_TUN_calculate_tcp6_checksum (const struct GNUNET_TUN_IPv6Header *ip,
171} 155}
172 156
173 157
174/**
175 * Calculate IPv4 UDP checksum.
176 *
177 * @param ip ipv4 header fully initialized
178 * @param udp UDP header (initialized except for CRC)
179 * @param payload the UDP payload
180 * @param payload_length number of bytes of UDP payload
181 */
182void 158void
183GNUNET_TUN_calculate_udp4_checksum (const struct GNUNET_TUN_IPv4Header *ip, 159GNUNET_TUN_calculate_udp4_checksum (const struct GNUNET_TUN_IPv4Header *ip,
184 struct GNUNET_TUN_UdpHeader *udp, 160 struct GNUNET_TUN_UdpHeader *udp,
@@ -210,14 +186,6 @@ GNUNET_TUN_calculate_udp4_checksum (const struct GNUNET_TUN_IPv4Header *ip,
210} 186}
211 187
212 188
213/**
214 * Calculate IPv6 UDP checksum.
215 *
216 * @param ip ipv6 header fully initialized
217 * @param udp UDP header (initialized except for CRC)
218 * @param payload the UDP payload
219 * @param payload_length number of bytes of UDP payload
220 */
221void 189void
222GNUNET_TUN_calculate_udp6_checksum (const struct GNUNET_TUN_IPv6Header *ip, 190GNUNET_TUN_calculate_udp6_checksum (const struct GNUNET_TUN_IPv6Header *ip,
223 struct GNUNET_TUN_UdpHeader *udp, 191 struct GNUNET_TUN_UdpHeader *udp,
@@ -249,13 +217,6 @@ GNUNET_TUN_calculate_udp6_checksum (const struct GNUNET_TUN_IPv6Header *ip,
249} 217}
250 218
251 219
252/**
253 * Calculate ICMP checksum.
254 *
255 * @param icmp IMCP header (initialized except for CRC)
256 * @param payload the ICMP payload
257 * @param payload_length number of bytes of ICMP payload
258 */
259void 220void
260GNUNET_TUN_calculate_icmp_checksum (struct GNUNET_TUN_IcmpHeader *icmp, 221GNUNET_TUN_calculate_icmp_checksum (struct GNUNET_TUN_IcmpHeader *icmp,
261 const void *payload, 222 const void *payload,