55 |
prot30_start () |
prot30_start () |
56 |
{ |
{ |
57 |
access_fd = access_getfd (); |
access_fd = access_getfd (); |
58 |
if_fd = if_getfd (); |
if ((if_fd = if_getfd ()) < 0) |
59 |
|
{ |
60 |
|
fprintf (stderr, "Could not open interface file descriptor\n"); |
61 |
|
/* FIXME: uncomment line when ready */ |
62 |
|
/* return 0; */ |
63 |
|
} |
64 |
|
|
65 |
client_seq = PACKET_MAX_SEQ; |
client_seq = PACKET_MAX_SEQ; |
66 |
server_lastack = 0; /* We have never received a packet */ |
server_lastack = 0; /* We have never received a packet */ |
117 |
case disconnect: |
case disconnect: |
118 |
maxfd = MAX (access_fd, if_fd) + 1; |
maxfd = MAX (access_fd, if_fd) + 1; |
119 |
FD_SET (access_fd, &rfdset); |
FD_SET (access_fd, &rfdset); |
120 |
FD_SET (if_fd, &rfdset); |
if (if_fd >= 0) /* FIXME: remove when ready */ |
121 |
|
FD_SET (if_fd, &rfdset); |
122 |
if (access_out.used > 0) |
if (access_out.used > 0) |
123 |
FD_SET (access_fd, &wfdset); |
FD_SET (access_fd, &wfdset); |
124 |
if (if_out.used > 0) |
if (if_out.used > 0) |