* Copyright (c) 1983 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
static char sccsid
[] = "@(#)df.c 5.1 (Berkeley) %G%";
* Dial the DF02-AC or DF03-AC
return (df_dialer(num
, acu
, 0));
return (df_dialer(num
, acu
, 1));
df_dialer(num
, acu
, df03
)
ioctl(f
, TIOCHPCL
, 0); /* make sure it hangs up when done */
printf("connection timed out\r\n");
if (boolean(value(VERBOSE
)))
int st
= TIOCM_ST
; /* secondary Transmit flag */
ioctl(f
, TIOCGETP
, &buf
);
if (buf
.sg_ospeed
!= B1200
) { /* must dial at 1200 baud */
buf
.sg_ospeed
= buf
.sg_ispeed
= B1200
;
ioctl(f
, TIOCSETP
, &buf
);
ioctl(f
, TIOCMBIC
, &st
); /* clear ST for 300 baud */
ioctl(f
, TIOCMBIS
, &st
); /* set ST for 1200 baud */
signal(SIGALRM
, timeout
);
alarm(5 * strlen(num
) + 10);
ioctl(f
, TIOCFLUSH
, &rw
);
write(f
, num
, strlen(num
));
buf
.sg_ispeed
= buf
.sg_ospeed
= speed
;
ioctl(f
, TIOCSETP
, &buf
);
ioctl(FD
, TIOCFLUSH
, &rw
);