* Copyright (c) 1985, 1993
* The Regents of the University of California. All rights reserved.
* %sccs.include.proprietary.c%
static char sccsid
[] = "@(#)unet.c 8.1 (Berkeley) %G%";
* unetopn -- make UNET (tcp-ip) connection
/* Default port of uucico server */
port
= atoi(flds
[F_PHONE
]);
if (port
<= 0 || port
> 255)
DEBUG(4, "unetopn host %s, ", flds
[F_NAME
]);
DEBUG(4, "port %d\n", port
);
logent("tcpopen", "TIMEOUT");
endhnent(); /* see below */
signal(SIGALRM
, alarmtr
);
ret
= tcpopen(flds
[F_NAME
], port
, 0, TO_ACTIVE
, "rw");
endhnent(); /* wave magic wand at 3com and incant "eat it, bruce" */
DEBUG(5, "tcpopen failed: errno %d\n", errno
);
logent("tcpopen", _FAILED
);
* unetcls -- close UNET connection.
DEBUG(4, "UNET CLOSE called\n", 0);
/* disable this until a timeout is put in */
if (ioctl(fd
, UIOCCLOSE
, STBNULL
))
logent("UNET CLOSE", _FAILED
);
DEBUG(4, "closed fd %d\n", fd
);