Debian Codegraph @

src/common/trans.cpp

raw symbols SCIP
1 /*
2 * Copyright (C) 2004 CreepLord ([email protected])
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18 #define TRANS_INTERNAL_ACCESScxx . . $ `src/common/trans.cpp:18:9`!
19 #include "trans.h"cxx . . $ `<file>/src/common/trans.h`/
20
21 #include <cerrno>
22 #include <cstring>
23
24 #include "common/setup_before.h"cxx . . $ `<file>/src/common/setup_before.h`/
25 #include "common/eventlog.h"cxx . . $ `<file>/src/common/eventlog.h`/
26 #include "common/list.h"cxx . . $ `<file>/src/common/list.h`/
27 #include "common/addr.h"cxx . . $ `<file>/src/common/addr.h`/
28 #include "common/util.h"cxx . . $ `<file>/src/common/util.h`/
29 #include "common/xalloc.h"cxx . . $ `<file>/src/common/xalloc.h`/
30 #include "common/setup_after.h"cxx . . $ `<file>/src/common/setup_after.h`/
31
32 #define DEBUG_TRANScxx . . $ `src/common/trans.cpp:32:9`!
33
34 namespace pvpgncxx . . $ pvpgn/
35 {
36
37 static t_listcxx . . $ pvpgn/t_list# * trans_headcxx . . $ pvpgn/trans_head. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
38
39 extern int trans_loadcxx . . $ pvpgn/trans_load(cb7559238bb26814).(char const * filename, int program)
40 {
41 stdcxx . . $ std/::FILEcxx . . $ std/FILE# *fp;
42 unsigned int line;
43 unsigned int pos;
44 char *buff;
45 char *temp;
46 char *input;
47 char const *output;
48 char const *exclude;
49 char const *include;
50 unsigned int npos;
51 char *network;
52 char *tmp;
53 char tmp1[32];
54 char tmp2[32];
55 char tmp3[32];
56 t_transcxx . . $ pvpgn/t_trans# *entry;
57
58 if (!filename) {
59 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got NULL filename");
60 return -1;
61 }
62 if (!(fp = stdcxx . . $ std/::fopencxx . . $ std/fopen(82ec0787cd37e0a3).(filename, "r"))) {
63 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "could not open file \"{}\" for reading (std::fopen: {})", filename, stdcxx . . $ std/::strerror(errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!));
64 return -1;
65 }
66 trans_headcxx . . $ pvpgn/trans_head. = list_create();
67 for (line = 1; (buff = file_get_linecxx . . $ pvpgn/file_get_line(e31226b218f63160).(fp)); line++) {
68 for (pos = 0; buff[pos] == '\t' || buff[pos] == ' '; pos++);
69 if (buff[pos] == '\0' || buff[pos] == '#') {
70 continue;
71 }
72 if ((temp = stdcxx . . $ std/::strrchr(buff, '#'))) {
73 unsigned int len;
74 unsigned int endpos;
75
76 *temp = '\0';
77 len = stdcxx . . $ std/::strlen(buff) + 1;
78 for (endpos = len - 1; buff[endpos] == '\t' || buff[endpos] == ' '; endpos--);
79 buff[endpos + 1] = '\0';
80 }
81 if (!(input = stdcxx . . $ std/::strtok(buff, " \t"))) { /* std::strtok modifies the string it is passed */
82 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "missing input line {} of file \"{}\"", line, filename);
83 continue;
84 }
85 /* check for port number - this tells us what programs will use this entry */
86 if (!(temp = stdcxx . . $ std/::strrchr(input, ':'))) {
87 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "missing port # on input line {} of file \"{}\"", line, filename);
88 continue;
89 }
90 temp++;
91 /* bnetd doesn't want the port 4000 entries */
92 if (program == TRANS_BNETDcxx . . $ `src/common/trans.h:51:9`! && stdcxx . . $ std/::strcmp(temp, "4000") == 0) {
93 #ifdef DEBUG_TRANScxx . . $ `src/common/trans.cpp:32:9`!
94 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_debugcxx . . $ pvpgn/eventlog_level_debug., __FUNCTION__, "d2gs input (ignoring) \"{}\"", input);
95 #endif
96 continue;
97 }
98 /* d2cs only wants the port 4000 entries */
99 if (program == TRANS_D2CScxx . . $ `src/common/trans.h:52:9`! && stdcxx . . $ std/::strcmp(temp, "4000") != 0) {
100 #ifdef DEBUG_TRANScxx . . $ `src/common/trans.cpp:32:9`!
101 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_debugcxx . . $ pvpgn/eventlog_level_debug., __FUNCTION__, "non d2gs input (ignoring) \"{}\"", input);
102 #endif
103 continue;
104 }
105 if (!(output = stdcxx . . $ std/::strtok(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, " \t"))) {
106 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "missing output on line {} of file \"{}\"", line, filename);
107 continue;
108 }
109 if (!(exclude = stdcxx . . $ std/::strtok(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, " \t"))) {
110 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "missing exclude on line {} of file \"{}\"", line, filename);
111 continue;
112 }
113 if (!(include = stdcxx . . $ std/::strtok(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, " \t"))) {
114 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "missing include on line {} of file \"{}\"", line, filename);
115 continue;
116 }
117 /* add exlude networks */
118 tmp = xstrdupcxx . . $ `src/common/xalloc.h:49:9`!(exclude);
119 npos = 0;
120 while (tmp[npos]) {
121 network = &tmp[npos];
122 for (; tmp[npos] != ',' && tmp[npos] != '\0'; npos++);
123 if (tmp[npos] == '\0')
124 npos--;
125 else
126 tmp[npos] = '\0';
127 if (stdcxx . . $ std/::strcmp(network, "NONE") == 0) {
128 npos++;
129 continue;
130 }
131 entry = (t_transcxx . . $ pvpgn/t_trans#*)xmalloccxx . . $ `src/common/xalloc.h:43:9`!(sizeof(t_trans));
132 if (!(entry->inputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#input. = addr_create_strcxx . . $ pvpgn/addr_create_str(1da662362765fa7c).(input, 0, 0))) {
133 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "could not allocate memory for input address");
134 xfreecxx . . $ `src/common/xalloc.h:51:9`!(entry);
135 npos++;
136 continue;
137 }
138 if (!(entry->outputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#output. = addr_create_strcxx . . $ pvpgn/addr_create_str(1da662362765fa7c).(input, 0, 0))) {
139 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "could not allocate memory for output address");
140 addr_destroycxx . . $ pvpgn/addr_destroy(b8ff9276d6945afa).(entry->inputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#input.);
141 xfreecxx . . $ `src/common/xalloc.h:51:9`!(entry);
142 npos++;
143 continue;
144 }
145 if (stdcxx . . $ std/::strcmp(network, "ANY") == 0) {
146 if (!(entry->networkcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#network. = netaddr_create_strcxx . . $ pvpgn/netaddr_create_str(9ebd152e18e009fb).("0.0.0.0/0"))) {
147 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "could not allocate memory for network address");
148 addr_destroycxx . . $ pvpgn/addr_destroy(b8ff9276d6945afa).(entry->outputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#output.);
149 addr_destroycxx . . $ pvpgn/addr_destroy(b8ff9276d6945afa).(entry->inputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#input.);
150 xfreecxx . . $ `src/common/xalloc.h:51:9`!(entry);
151 npos++;
152 continue;
153 }
154 }
155 else {
156 if (!(entry->networkcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#network. = netaddr_create_strcxx . . $ pvpgn/netaddr_create_str(9ebd152e18e009fb).(network))) {
157 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "could not allocate memory for network address");
158 addr_destroycxx . . $ pvpgn/addr_destroy(b8ff9276d6945afa).(entry->outputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#output.);
159 addr_destroycxx . . $ pvpgn/addr_destroy(b8ff9276d6945afa).(entry->inputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#input.);
160 xfreecxx . . $ `src/common/xalloc.h:51:9`!(entry);
161 npos++;
162 continue;
163 }
164 }
165 #ifdef DEBUG_TRANScxx . . $ `src/common/trans.cpp:32:9`!
166 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_debugcxx . . $ pvpgn/eventlog_level_debug., __FUNCTION__,
167 "Adding Host -> {}, Output -> {}, Network {} - (exclude)",
168 addr_get_addr_strcxx . . $ pvpgn/addr_get_addr_str(b93b79389147bbb8).(entry->inputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#input., tmp1, sizeof(tmp1)),
169 addr_get_addr_strcxx . . $ pvpgn/addr_get_addr_str(b93b79389147bbb8).(entry->outputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#output., tmp2, sizeof(tmp2)),
170 netaddr_get_addr_strcxx . . $ pvpgn/netaddr_get_addr_str(129d4d743b5f8f1).(entry->networkcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#network., tmp3, sizeof(tmp3)));
171 #endif
172 list_append_data(trans_headcxx . . $ pvpgn/trans_head., entry);
173 npos++;
174 }
175 xfreecxx . . $ `src/common/xalloc.h:51:9`!(tmp);
176 /* add include networks */
177 tmp = xstrdupcxx . . $ `src/common/xalloc.h:49:9`!(include);
178 npos = 0;
179 while (tmp[npos]) {
180 network = &tmp[npos];
181 for (; tmp[npos] != ',' && tmp[npos] != '\0'; npos++);
182 if (tmp[npos] == '\0')
183 npos--;
184 else
185 tmp[npos] = '\0';
186 if (stdcxx . . $ std/::strcmp(network, "NONE") == 0) {
187 npos++;
188 continue;
189 }
190 entry = (t_transcxx . . $ pvpgn/t_trans#*)xmalloccxx . . $ `src/common/xalloc.h:43:9`!(sizeof(t_trans));
191 if (!(entry->inputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#input. = addr_create_strcxx . . $ pvpgn/addr_create_str(1da662362765fa7c).(input, 0, 0))) {
192 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "could not allocate memory for input address");
193 xfreecxx . . $ `src/common/xalloc.h:51:9`!(entry);
194 npos++;
195 continue;
196 }
197 if (!(entry->outputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#output. = addr_create_strcxx . . $ pvpgn/addr_create_str(1da662362765fa7c).(output, 0, 0))) {
198 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "could not allocate memory for output address");
199 addr_destroycxx . . $ pvpgn/addr_destroy(b8ff9276d6945afa).(entry->inputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#input.);
200 xfreecxx . . $ `src/common/xalloc.h:51:9`!(entry);
201 npos++;
202 continue;
203 }
204 if (stdcxx . . $ std/::strcmp(network, "ANY") == 0) {
205 if (!(entry->networkcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#network. = netaddr_create_strcxx . . $ pvpgn/netaddr_create_str(9ebd152e18e009fb).("0.0.0.0/0"))) {
206 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "could not allocate memory for network address");
207 addr_destroycxx . . $ pvpgn/addr_destroy(b8ff9276d6945afa).(entry->outputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#output.);
208 addr_destroycxx . . $ pvpgn/addr_destroy(b8ff9276d6945afa).(entry->inputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#input.);
209 xfreecxx . . $ `src/common/xalloc.h:51:9`!(entry);
210 npos++;
211 continue;
212 }
213 }
214 else {
215 if (!(entry->networkcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#network. = netaddr_create_strcxx . . $ pvpgn/netaddr_create_str(9ebd152e18e009fb).(network))) {
216 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "could not allocate memory for network address");
217 addr_destroycxx . . $ pvpgn/addr_destroy(b8ff9276d6945afa).(entry->outputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#output.);
218 addr_destroycxx . . $ pvpgn/addr_destroy(b8ff9276d6945afa).(entry->inputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#input.);
219 xfreecxx . . $ `src/common/xalloc.h:51:9`!(entry);
220 npos++;
221 continue;
222 }
223 }
224 #ifdef DEBUG_TRANScxx . . $ `src/common/trans.cpp:32:9`!
225 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_debugcxx . . $ pvpgn/eventlog_level_debug., __FUNCTION__,
226 "Adding Host -> {}, Output -> {}, Network {} - (include)",
227 addr_get_addr_strcxx . . $ pvpgn/addr_get_addr_str(b93b79389147bbb8).(entry->inputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#input., tmp1, sizeof(tmp1)),
228 addr_get_addr_strcxx . . $ pvpgn/addr_get_addr_str(b93b79389147bbb8).(entry->outputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#output., tmp2, sizeof(tmp2)),
229 netaddr_get_addr_strcxx . . $ pvpgn/netaddr_get_addr_str(129d4d743b5f8f1).(entry->networkcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#network., tmp3, sizeof(tmp3)));
230 #endif
231 list_append_data(trans_headcxx . . $ pvpgn/trans_head., entry);
232 npos++;
233 }
234 xfreecxx . . $ `src/common/xalloc.h:51:9`!(tmp);
235 }
236 file_get_linecxx . . $ pvpgn/file_get_line(e31226b218f63160).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); // clear file_get_line buffer
237 stdcxx . . $ std/::fclosecxx . . $ std/fclose(89bc1efcdac0ca22).(fp);
238 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_infocxx . . $ pvpgn/eventlog_level_info., __FUNCTION__, "trans file loaded");
239 return 0;
240 }
241
242 extern int trans_unloadcxx . . $ pvpgn/trans_unload(b126dc7c1de90089).(void)
243 {
244 t_elemcxx . . $ pvpgn/t_elem# *curr;
245 t_transcxx . . $ pvpgn/t_trans# *entry;
246
247 if (trans_headcxx . . $ pvpgn/trans_head.) {
248 LIST_TRAVERSEcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/list.h:94:9`!(trans_head, curr)
249 {
250 if (!(entry = (t_transcxx . . $ pvpgn/t_trans#*)elem_get_data(curr))) {
251 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "found NULL entry in list");
252 }
253 else {
254 netaddr_destroycxx . . $ pvpgn/netaddr_destroy(889b3810d111ab5f).(entry->networkcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#network.);
255 addr_destroycxx . . $ pvpgn/addr_destroy(b8ff9276d6945afa).(entry->outputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#output.);
256 addr_destroycxx . . $ pvpgn/addr_destroy(b8ff9276d6945afa).(entry->inputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#input.);
257 xfreecxx . . $ `src/common/xalloc.h:51:9`!(entry);
258 }
259 list_remove_elem(trans_headcxx . . $ pvpgn/trans_head., &curr);
260 }
261 list_destroy(trans_headcxx . . $ pvpgn/trans_head.);
262 trans_headcxx . . $ pvpgn/trans_head. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
263 }
264 return 0;
265 }
266
267 extern int trans_reloadcxx . . $ pvpgn/trans_reload(cb7559238bb26814).(char const * filename, int program)
268 {
269 trans_unloadcxx . . $ pvpgn/trans_unload(b126dc7c1de90089).();
270 if (trans_loadcxx . . $ pvpgn/trans_load(cb7559238bb26814).(filename, program) < 0) return -1;
271 return 0;
272 }
273
274 extern int trans_netcxx . . $ pvpgn/trans_net(cf0ba8ec647fd542).(unsigned int clientaddr, unsigned int *addr, unsigned short *port)
275 {
276 t_elemcxx . . $ pvpgn/t_elem# const *curr;
277 t_transcxx . . $ pvpgn/t_trans# *entry;
278 char temp1[32];
279 char temp2[32];
280 char temp3[32];
281 char temp4[32];
282
283 #ifdef DEBUG_TRANScxx . . $ `src/common/trans.cpp:32:9`!
284 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_debugcxx . . $ pvpgn/eventlog_level_debug., __FUNCTION__, "checking {} for client {} ...",
285 addr_num_to_addr_strcxx . . $ pvpgn/addr_num_to_addr_str(9313bf3c546cb16).(*addr, *port),
286 addr_num_to_ip_strcxx . . $ pvpgn/addr_num_to_ip_str(81a3ae90da26a711).(clientaddr));
287 #endif
288
289 if (trans_headcxx . . $ pvpgn/trans_head.) {
290 LIST_TRAVERSE_CONSTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/list.h:95:9`!(trans_head, curr)
291 {
292 if (!(entry = (t_transcxx . . $ pvpgn/t_trans#*)elem_get_data(curr))) {
293 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "found NULL entry in list");
294 continue;
295 }
296
297 #ifdef DEBUG_TRANScxx . . $ `src/common/trans.cpp:32:9`!
298 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_debugcxx . . $ pvpgn/eventlog_level_debug., __FUNCTION__, "against entry -> {} output {} network {}",
299 addr_get_addr_strcxx . . $ pvpgn/addr_get_addr_str(b93b79389147bbb8).(entry->inputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#input., temp1, sizeof(temp1)),
300 addr_get_addr_strcxx . . $ pvpgn/addr_get_addr_str(b93b79389147bbb8).(entry->outputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#output., temp2, sizeof(temp2)),
301 netaddr_get_addr_strcxx . . $ pvpgn/netaddr_get_addr_str(129d4d743b5f8f1).(entry->networkcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#network., temp3, sizeof(temp3)));
302 #endif
303 if (addr_get_ipcxx . . $ pvpgn/addr_get_ip(9026149328323fab).(entry->inputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#input.) != *addr || addr_get_portcxx . . $ pvpgn/addr_get_port(51ac8fdf58f03e6a).(entry->inputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#input.) != *port) {
304 #ifdef DEBUG_TRANScxx . . $ `src/common/trans.cpp:32:9`!
305 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_debugcxx . . $ pvpgn/eventlog_level_debug., __FUNCTION__, "entry does match input address");
306 #endif
307 continue;
308 }
309 if (netaddr_contains_addr_numcxx . . $ pvpgn/netaddr_contains_addr_num(526ee617a5ce9c6d).(entry->networkcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#network., clientaddr) == 0) {
310 #ifdef DEBUG_TRANScxx . . $ `src/common/trans.cpp:32:9`!
311 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_debugcxx . . $ pvpgn/eventlog_level_debug., __FUNCTION__, "client is not in the correct network");
312 #endif
313 continue;
314 }
315 #ifdef DEBUG_TRANScxx . . $ `src/common/trans.cpp:32:9`!
316 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_debugcxx . . $ pvpgn/eventlog_level_debug., __FUNCTION__, "{} translated to {}",
317 addr_num_to_addr_strcxx . . $ pvpgn/addr_num_to_addr_str(9313bf3c546cb16).(*addr, *port),
318 addr_get_addr_strcxx . . $ pvpgn/addr_get_addr_str(b93b79389147bbb8).(entry->outputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#output., temp4, sizeof(temp4)));
319 #endif
320 *addr = addr_get_ipcxx . . $ pvpgn/addr_get_ip(9026149328323fab).(entry->outputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#output.);
321 *port = addr_get_portcxx . . $ pvpgn/addr_get_port(51ac8fdf58f03e6a).(entry->outputcxx . . $ pvpgn/$anonymous_type_a0676200fc4f0940_0#output.);
322 return 1; /* match found in list */
323 }
324 }
325 #ifdef DEBUG_TRANScxx . . $ `src/common/trans.cpp:32:9`!
326 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_debugcxx . . $ pvpgn/eventlog_level_debug., __FUNCTION__, "no match found for {} (not translated)",
327 addr_num_to_addr_strcxx . . $ pvpgn/addr_num_to_addr_str(9313bf3c546cb16).(*addr, *port));
328 #endif
329 return 0; /* no match found in list */
330 }
331
332 }