1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
|
/* $KAME: rrenumd.c,v 1.20 2000/11/08 02:40:53 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the project nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/uio.h>
#include <sys/time.h>
#include <string.h>
#include <net/route.h>
#include <netinet/in_systm.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/ip6.h>
#include <netinet/icmp6.h>
#include <arpa/inet.h>
#ifdef IPSEC
#include <netipsec/ipsec.h>
#endif
#include <stdio.h>
#include <err.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <syslog.h>
#include "rrenumd.h"
#define LL_ALLROUTERS "ff02::2"
#define SL_ALLROUTERS "ff05::2"
#define RR_MCHLIM_DEFAULT 64
#ifndef IN6_IS_SCOPE_LINKLOCAL
#define IN6_IS_SCOPE_LINKLOCAL(a) \
((IN6_IS_ADDR_LINKLOCAL(a)) || \
(IN6_IS_ADDR_MC_LINKLOCAL(a)))
#endif /* IN6_IS_SCOPE_LINKLOCAL */
struct flags {
u_long debug : 1;
u_long fg : 1;
#ifdef IPSEC
#ifdef IPSEC_POLICY_IPSEC
u_long policy : 1;
#else /* IPSEC_POLICY_IPSEC */
u_long auth : 1;
u_long encrypt : 1;
#endif /* IPSEC_POLICY_IPSEC */
#endif /*IPSEC*/
};
struct msghdr sndmhdr;
struct msghdr rcvmhdr;
struct sockaddr_in6 from;
struct sockaddr_in6 sin6_ll_allrouters;
int s4, s6;
int with_v4dest, with_v6dest;
struct in6_addr prefix; /* ADHOC */
int prefixlen = 64; /* ADHOC */
extern int parse(FILE **);
static void show_usage(void);
static void init_sin6(struct sockaddr_in6 *, const char *);
#if 0
static void join_multi(const char *);
#endif
static void init_globals(void);
static void config(FILE **);
#ifdef IPSEC_POLICY_IPSEC
static void sock6_open(struct flags *, char *);
static void sock4_open(struct flags *, char *);
#else
static void sock6_open(struct flags *);
static void sock4_open(struct flags *);
#endif
static void rrenum_output(struct payload_list *, struct dst_list *);
static void rrenum_snd_eachdst(struct payload_list *);
#if 0
static void rrenum_snd_fullsequence(void);
#endif
static void rrenum_input(int);
int main(int, char *[]);
/* Print usage. Don't call this after daemonized. */
static void
show_usage()
{
fprintf(stderr, "usage: rrenumd [-c conf_file|-s] [-df"
#ifdef IPSEC
#ifdef IPSEC_POLICY_IPSEC
"] [-P policy"
#else /* IPSEC_POLICY_IPSEC */
"AE"
#endif /* IPSEC_POLICY_IPSEC */
#endif /* IPSEC */
"]\n");
exit(1);
}
static void
init_sin6(struct sockaddr_in6 *sin6, const char *addr_ascii)
{
memset(sin6, 0, sizeof(*sin6));
sin6->sin6_len = sizeof(*sin6);
sin6->sin6_family = AF_INET6;
if (inet_pton(AF_INET6, addr_ascii, &sin6->sin6_addr) != 1)
; /* XXX do something */
}
#if 0 /* XXX: not necessary ?? */
static void
join_multi(const char *addrname)
{
struct ipv6_mreq mreq;
if (inet_pton(AF_INET6, addrname, &mreq.ipv6mr_multiaddr.s6_addr)
!= 1) {
syslog(LOG_ERR, "<%s> inet_pton failed(library bug?)",
__func__);
exit(1);
}
/* ADHOC: currently join only one */
{
if ((mreq.ipv6mr_interface = if_nametoindex(ifname)) == 0) {
syslog(LOG_ERR, "<%s> ifname %s should be invalid: %s",
__func__, ifname, strerror(errno));
exit(1);
}
if (setsockopt(s, IPPROTO_IPV6, IPV6_JOIN_GROUP,
&mreq,
sizeof(mreq)) < 0) {
syslog(LOG_ERR, "<%s> IPV6_JOIN_GROUP on %s: %s",
__func__, ifname, strerror(errno));
exit(1);
}
}
}
#endif
static void
init_globals()
{
static struct iovec rcviov;
static u_char rprdata[4500]; /* maximal MTU of connected links */
static u_char *rcvcmsgbuf = NULL;
static u_char *sndcmsgbuf = NULL;
int sndcmsglen, rcvcmsglen;
/* init ll_allrouters */
init_sin6(&sin6_ll_allrouters, LL_ALLROUTERS);
/* initialize msghdr for receiving packets */
rcviov.iov_base = (caddr_t)rprdata;
rcviov.iov_len = sizeof(rprdata);
rcvmhdr.msg_namelen = sizeof(struct sockaddr_in6);
rcvmhdr.msg_iov = &rcviov;
rcvmhdr.msg_iovlen = 1;
rcvcmsglen = CMSG_SPACE(sizeof(struct in6_pktinfo)) +
CMSG_SPACE(sizeof(int));
if (rcvcmsgbuf == NULL &&
(rcvcmsgbuf = (u_char *)malloc(rcvcmsglen)) == NULL) {
syslog(LOG_ERR, "<%s>: malloc failed", __func__);
exit(1);
}
rcvmhdr.msg_control = (caddr_t)rcvcmsgbuf;
rcvmhdr.msg_controllen = rcvcmsglen;
/* initialize msghdr for sending packets */
sndmhdr.msg_namelen = sizeof(struct sockaddr_in6);
sndmhdr.msg_iovlen = 1;
sndcmsglen = CMSG_SPACE(sizeof(struct in6_pktinfo)) +
CMSG_SPACE(sizeof(int));
if (sndcmsgbuf == NULL &&
(sndcmsgbuf = (u_char *)malloc(sndcmsglen)) == NULL) {
syslog(LOG_ERR, "<%s>: malloc failed", __func__);
exit(1);
}
sndmhdr.msg_control = (caddr_t)sndcmsgbuf;
sndmhdr.msg_controllen = sndcmsglen;
}
static void
config(FILE **fpp)
{
struct payload_list *pl;
struct iovec *iov;
struct icmp6_router_renum *irr;
struct rr_pco_match *rpm;
if (parse(fpp) < 0) {
syslog(LOG_ERR, "<%s> parse failed", __func__);
exit(1);
}
/* initialize fields not configured by parser */
for (pl = pl_head; pl; pl = pl->pl_next) {
iov = (struct iovec *)&pl->pl_sndiov;
irr = (struct icmp6_router_renum *)&pl->pl_irr;
rpm = (struct rr_pco_match *)&pl->pl_rpm;
irr->rr_type = ICMP6_ROUTER_RENUMBERING;
irr->rr_code = 0;
/*
* now we don't support multiple PCOs in a rr message.
* so segment number is not supported.
*/
/* TODO: rr flags config in parser */
irr->rr_flags |= ICMP6_RR_FLAGS_SPECSITE;
/* TODO: max delay config in parser */
/*
* means only 1 use_prefix is contained as router-renum-05.txt.
* now we don't support multiple PCOs in a rr message,
* nor multiple use_prefix in one PCO.
*/
rpm->rpm_len = 4*1 +3;
rpm->rpm_ordinal = 0;
iov->iov_base = (caddr_t)irr;
iov->iov_len = sizeof(struct icmp6_router_renum)
+ sizeof(struct rr_pco_match)
+ sizeof(struct rr_pco_use);
}
}
static void
sock6_open(struct flags *flags
#ifdef IPSEC_POLICY_IPSEC
, char *policy
#endif /* IPSEC_POLICY_IPSEC */
)
{
struct icmp6_filter filt;
int on;
#ifdef IPSEC
#ifndef IPSEC_POLICY_IPSEC
int optval;
#endif
#endif
if (with_v6dest == 0)
return;
if (with_v6dest &&
(s6 = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6)) < 0) {
syslog(LOG_ERR, "<%s> socket(v6): %s", __func__,
strerror(errno));
exit(1);
}
/*
* join all routers multicast addresses.
*/
#if 0 /* XXX: not necessary ?? */
join_multi(LL_ALLROUTERS);
join_multi(SL_ALLROUTERS);
#endif
/* set icmpv6 filter */
ICMP6_FILTER_SETBLOCKALL(&filt);
ICMP6_FILTER_SETPASS(ICMP6_ROUTER_RENUMBERING, &filt);
if (setsockopt(s6, IPPROTO_ICMPV6, ICMP6_FILTER, &filt,
sizeof(filt)) < 0) {
syslog(LOG_ERR, "<%s> IICMP6_FILTER: %s",
__func__, strerror(errno));
exit(1);
}
/* specify to tell receiving interface */
on = 1;
if (setsockopt(s6, IPPROTO_IPV6, IPV6_RECVPKTINFO, &on,
sizeof(on)) < 0) {
syslog(LOG_ERR, "<%s> IPV6_RECVPKTINFO: %s",
__func__, strerror(errno));
exit(1);
}
#ifdef IPSEC
#ifdef IPSEC_POLICY_IPSEC
if (flags->policy) {
char *buf;
buf = ipsec_set_policy(policy, strlen(policy));
if (buf == NULL)
errx(1, "%s", ipsec_strerror());
/* XXX should handle in/out bound policy. */
if (setsockopt(s6, IPPROTO_IPV6, IPV6_IPSEC_POLICY,
buf, ipsec_get_policylen(buf)) < 0)
err(1, "setsockopt(IPV6_IPSEC_POLICY)");
free(buf);
}
#else /* IPSEC_POLICY_IPSEC */
if (flags->auth) {
optval = IPSEC_LEVEL_REQUIRE;
if (setsockopt(s6, IPPROTO_IPV6, IPV6_AUTH_TRANS_LEVEL,
&optval, sizeof(optval)) == -1) {
syslog(LOG_ERR, "<%s> IPV6_AUTH_TRANS_LEVEL: %s",
__func__, strerror(errno));
exit(1);
}
}
if (flags->encrypt) {
optval = IPSEC_LEVEL_REQUIRE;
if (setsockopt(s6, IPPROTO_IPV6, IPV6_ESP_TRANS_LEVEL,
&optval, sizeof(optval)) == -1) {
syslog(LOG_ERR, "<%s> IPV6_ESP_TRANS_LEVEL: %s",
__func__, strerror(errno));
exit(1);
}
}
#endif /* IPSEC_POLICY_IPSEC */
#endif /* IPSEC */
return;
}
static void
sock4_open(struct flags *flags
#ifdef IPSEC_POLICY_IPSEC
, char *policy
#endif /* IPSEC_POLICY_IPSEC */
)
{
#ifdef IPSEC
#ifndef IPSEC_POLICY_IPSEC
int optval;
#endif
#endif
if (with_v4dest == 0)
return;
if ((s4 = socket(AF_INET, SOCK_RAW, IPPROTO_ICMPV6)) < 0) {
syslog(LOG_ERR, "<%s> socket(v4): %s", __func__,
strerror(errno));
exit(1);
}
#if 0 /* XXX: not necessary ?? */
/*
* join all routers multicast addresses.
*/
some_join_function();
#endif
#ifdef IPSEC
#ifdef IPSEC_POLICY_IPSEC
if (flags->policy) {
char *buf;
buf = ipsec_set_policy(policy, strlen(policy));
if (buf == NULL)
errx(1, "%s", ipsec_strerror());
/* XXX should handle in/out bound policy. */
if (setsockopt(s4, IPPROTO_IP, IP_IPSEC_POLICY,
buf, ipsec_get_policylen(buf)) < 0)
err(1, "setsockopt(IP_IPSEC_POLICY)");
free(buf);
}
#else /* IPSEC_POLICY_IPSEC */
if (flags->auth) {
optval = IPSEC_LEVEL_REQUIRE;
if (setsockopt(s4, IPPROTO_IP, IP_AUTH_TRANS_LEVEL,
&optval, sizeof(optval)) == -1) {
syslog(LOG_ERR, "<%s> IP_AUTH_TRANS_LEVEL: %s",
__func__, strerror(errno));
exit(1);
}
}
if (flags->encrypt) {
optval = IPSEC_LEVEL_REQUIRE;
if (setsockopt(s4, IPPROTO_IP, IP_ESP_TRANS_LEVEL,
&optval, sizeof(optval)) == -1) {
syslog(LOG_ERR, "<%s> IP_ESP_TRANS_LEVEL: %s",
__func__, strerror(errno));
exit(1);
}
}
#endif /* IPSEC_POLICY_IPSEC */
#endif /* IPSEC */
return;
}
static void
rrenum_output(struct payload_list *pl, struct dst_list *dl)
{
int i, msglen = 0;
struct cmsghdr *cm;
struct in6_pktinfo *pi;
struct sockaddr_in6 *sin6 = NULL;
sndmhdr.msg_name = (caddr_t)dl->dl_dst;
if (dl->dl_dst->sa_family == AF_INET6)
sin6 = (struct sockaddr_in6 *)dl->dl_dst;
if (sin6 != NULL &&
IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) {
int hoplimit = RR_MCHLIM_DEFAULT;
cm = CMSG_FIRSTHDR(&sndmhdr);
/* specify the outgoing interface */
cm->cmsg_level = IPPROTO_IPV6;
cm->cmsg_type = IPV6_PKTINFO;
cm->cmsg_len = CMSG_LEN(sizeof(struct in6_pktinfo));
pi = (struct in6_pktinfo *)CMSG_DATA(cm);
memset(&pi->ipi6_addr, 0, sizeof(pi->ipi6_addr)); /*XXX*/
pi->ipi6_ifindex = sin6->sin6_scope_id;
msglen += CMSG_LEN(sizeof(struct in6_pktinfo));
/* specify the hop limit of the packet if dest is link local */
/* not defined by router-renum-05.txt, but maybe its OK */
cm = CMSG_NXTHDR(&sndmhdr, cm);
cm->cmsg_level = IPPROTO_IPV6;
cm->cmsg_type = IPV6_HOPLIMIT;
cm->cmsg_len = CMSG_LEN(sizeof(int));
memcpy(CMSG_DATA(cm), &hoplimit, sizeof(int));
msglen += CMSG_LEN(sizeof(int));
}
sndmhdr.msg_controllen = msglen;
if (sndmhdr.msg_controllen == 0)
sndmhdr.msg_control = 0;
sndmhdr.msg_iov = &pl->pl_sndiov;
i = sendmsg(dl->dl_dst->sa_family == AF_INET ? s4 : s6, &sndmhdr, 0);
if (i < 0 || i != sndmhdr.msg_iov->iov_len)
syslog(LOG_ERR, "<%s> sendmsg: %s", __func__,
strerror(errno));
}
static void
rrenum_snd_eachdst(struct payload_list *pl)
{
struct dst_list *dl;
for (dl = dl_head; dl; dl = dl->dl_next) {
rrenum_output(pl, dl);
}
}
#if 0
static void
rrenum_snd_fullsequence()
{
struct payload_list *pl;
for (pl = pl_head; pl; pl = pl->pl_next) {
rrenum_snd_eachdst(pl);
}
}
#endif
static void
rrenum_input(int s)
{
int i;
struct icmp6_router_renum *rr;
/* get message */
if ((i = recvmsg(s, &rcvmhdr, 0)) < 0) {
syslog(LOG_ERR, "<%s> recvmsg: %s", __func__,
strerror(errno));
return;
}
if (s == s4)
i -= sizeof(struct ip);
if (i < sizeof(struct icmp6_router_renum)) {
syslog(LOG_ERR, "<%s> packet size(%d) is too short",
__func__, i);
return;
}
if (s == s4) {
struct ip *ip = (struct ip *)rcvmhdr.msg_iov->iov_base;
rr = (struct icmp6_router_renum *)(ip + 1);
} else /* s == s6 */
rr = (struct icmp6_router_renum *)rcvmhdr.msg_iov->iov_base;
switch(rr->rr_code) {
case ICMP6_ROUTER_RENUMBERING_COMMAND:
/* COMMAND will be processed by rtadvd */
break;
case ICMP6_ROUTER_RENUMBERING_RESULT:
/* TODO: receiving result message */
break;
default:
syslog(LOG_ERR, "<%s> received unknown code %d",
__func__, rr->rr_code);
break;
}
}
int
main(int argc, char *argv[])
{
FILE *fp = stdin;
fd_set fdset;
struct timeval timeout;
int ch, i, maxfd = 0, send_counter = 0;
struct flags flags;
struct payload_list *pl;
#ifdef IPSEC_POLICY_IPSEC
char *policy = NULL;
#endif
memset(&flags, 0, sizeof(flags));
openlog("rrenumd", LOG_PID, LOG_DAEMON);
/* get options */
while ((ch = getopt(argc, argv, "c:sdf"
#ifdef IPSEC
#ifdef IPSEC_POLICY_IPSEC
"P:"
#else /* IPSEC_POLICY_IPSEC */
"AE"
#endif /* IPSEC_POLICY_IPSEC */
#endif /* IPSEC */
)) != -1){
switch (ch) {
case 'c':
if((fp = fopen(optarg, "r")) == NULL) {
syslog(LOG_ERR,
"<%s> config file %s open failed",
__func__, optarg);
exit(1);
}
break;
case 's':
fp = stdin;
break;
case 'd':
flags.debug = 1;
break;
case 'f':
flags.fg = 1;
break;
#ifdef IPSEC
#ifdef IPSEC_POLICY_IPSEC
case 'P':
flags.policy = 1;
policy = strdup(optarg);
break;
#else /* IPSEC_POLICY_IPSEC */
case 'A':
flags.auth = 1;
break;
case 'E':
flags.encrypt = 1;
break;
#endif /* IPSEC_POLICY_IPSEC */
#endif /*IPSEC*/
default:
show_usage();
}
}
argc -= optind;
argv += optind;
/* set log level */
if (flags.debug == 0)
(void)setlogmask(LOG_UPTO(LOG_ERR));
if (flags.debug == 1)
(void)setlogmask(LOG_UPTO(LOG_INFO));
/* init global variables */
init_globals();
config(&fp);
sock6_open(&flags
#ifdef IPSEC_POLICY_IPSEC
, policy
#endif /* IPSEC_POLICY_IPSEC */
);
sock4_open(&flags
#ifdef IPSEC_POLICY_IPSEC
, policy
#endif /* IPSEC_POLICY_IPSEC */
);
if (!flags.fg)
daemon(0, 0);
FD_ZERO(&fdset);
if (with_v6dest) {
FD_SET(s6, &fdset);
if (s6 > maxfd)
maxfd = s6;
}
if (with_v4dest) {
FD_SET(s4, &fdset);
if (s4 > maxfd)
maxfd = s4;
}
/* ADHOC: timeout each 30seconds */
memset(&timeout, 0, sizeof(timeout));
/* init temporary payload_list and send_counter*/
pl = pl_head;
send_counter = retry + 1;
while (1) {
struct fd_set select_fd = fdset; /* reinitialize */
if ((i = select(maxfd + 1, &select_fd, NULL, NULL,
&timeout)) < 0){
syslog(LOG_ERR, "<%s> select: %s",
__func__, strerror(errno));
continue;
}
if (i == 0) { /* timeout */
if (pl == NULL)
exit(0);
rrenum_snd_eachdst(pl);
send_counter--;
timeout.tv_sec = 30;
if (send_counter == 0) {
timeout.tv_sec = 0;
pl = pl->pl_next;
send_counter = retry + 1;
}
}
if (FD_ISSET(s4, &select_fd))
rrenum_input(s4);
if (FD_ISSET(s6, &select_fd))
rrenum_input(s6);
}
}
|