From: larrys@lexis-nexis.com (Larry Snyder)
To: axp-list@redhat.com
Subject: Re: Kermit?
Date: Tue, 25 May 1999 18:18:13 -0400 (EDT) [thread overview]
Message-ID: <199905252218.SAA15866@ra.lexis-nexis.com> (raw)
In-Reply-To: <v590aclv6l.fsf@Phantom.newport.com>
I use a Multia for a f/w myself. It provides NAT and demand isdn ppp
management very nicely. Assuming you want to run diskless, you're
obviously booting from another box. If it's Linux, try minicom.
It it's Sun, tip works. The Multias have both arc and srm
firmware, and I'd recommend using a native console with them until you
get the box up and running. Mine runs headless, with all services
turned off except ssh. If it dies (to the point of not being
reachable over the net), I just plug in a kbd & monitor from another
box to get in and fix it.
-ls-
Rui-Tao Dong <ruitao@home.com> wrote:
>
> I have a not quite dead (floppyless and diskless) UDB and I am trying
> to make it a dedicated firewall for my cable modem. I need a terminal
> program to talk to serial console.
>
> Has anyone got Kermit working? I got the (very old) rpm from
> Columbia, but it crashes on connect. I am having a hard time
> compiling it. Does anyone have an RPM? Or has any suggestion on a
> better terminal program? I tried to roll my own, but without much luck.
>
> --
> Regards,
>
> Rui-Tao (x679)
>
> /* Usage link /dev/cua0 */
>
> #include <stdio.h>
> #include <fcntl.h>
> #include <unistd.h>
> #include <sys/types.h>
>
> #define BUFSIZE 1024
>
> void copy_bytes(int in_fd, int out_fd)
> {
> char buf[BUFSIZE];
> int rbytes;
>
> if ( (rbytes=read(in_fd, buf, BUFSIZE)) > 0 )
> {
> int wbytes;
> char* buf_p=buf;
> fprintf(stderr, "Reading %d bytes from %d.\n", rbytes, in_fd);
>
> while (buf_p < buf+rbytes)
> {
> int wsize=rbytes+buf-buf_p;
> wbytes=write(out_fd, buf_p, wsize);
> fprintf(stderr, "Writing %d bytes to %d.\n", wbytes, out_fd);
> buf_p += wbytes;
> }
> if (wbytes < 0)
> {
> perror("write");
> exit(-1);
> }
> }
> else if (rbytes < 0)
> {
> perror("read");
> exit(-1);
> }
> }
>
> int main(int argc, char** argv)
> {
> int fd;
> fd_set read_set;
> /* Initialize the file descriptor set. */
>
> if (argc !=2)
> {
> fprintf(stderr, "Using %s device-file.\n", argv[0]);
> return -1;
> }
>
> if ((fd=open(argv[1], O_RDWR)) < 0)
> {
> perror("open");
> return -1;
> }
> FD_ZERO (&read_set);
> FD_SET (fd, &read_set);
> FD_SET (0, &read_set);
>
> while (1)
> {
> if ( select(FD_SETSIZE, &read_set, NULL, NULL, NULL) < 0 )
> {
> perror("select");
> return -1;
> }
>
> if ( FD_ISSET(fd, &read_set))
> {
> copy_bytes(fd, 1);
> }
> else if (FD_ISSET(0, &read_set))
> {
> copy_bytes(0, fd);
> }
> else
> {
> return -1;
> }
> }
>
> close(fd);
> return 0;
> }
>
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
next prev parent reply other threads:[~1999-05-25 23:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-05-25 21:02 Kermit? Rui-Tao Dong
1999-05-25 22:10 ` Kermit? Michal Jaegermann
1999-05-25 22:18 ` Larry Snyder [this message]
1999-05-25 23:18 ` Kermit? Dan O'Reilly
1999-05-25 22:41 ` Kermit? Wes Bauske
1999-05-25 22:58 ` Kermit? Peter Petrakis
1999-05-26 9:34 ` Kermit? Peter Rye
1999-05-26 12:04 ` Kermit? mgraffam
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox