serproxy for fbsd & openbrick
"Richard Neese" <[email protected]> Fri, 23 May 2003 13:10:11 -0500
| Newsgroups | gmane.comp.hardware.openbrick.general |
|---|---|
| Message-ID | <[email protected]> |
Thanks to a freind of my we have just patched and are porting a serial port to tcp redirector. its called serproxy. This is a serial port only ver we will be adding parallel port to tcp mapping in the next version. This project came to hand due to openbrick. OpenBrick is a great Project but it lacked a seriald like ncd has . This is a great tool if you need access to your serial ports from other terminals and from apps. here is the url to the app . I will hope to get the developer to post the patch on his web site. http://www.lspace.nildram.co.uk/freeware.html I have attached the patch file here for now. Instructions: d/l the serproxy.tar.gz, Then get the attached patch. untar/gz the serproxy and copy the serproxy.diff into the dir. then patch -pl < serproxy.diff and fill in the file names as prompted. Then type make and make install. To start the serproxy write either a serproxy.sh in /usr/local/etc/rc.d or add a line to your inetd.conf. hope you find this usefull. -- __________________________________________________________ Sign-up for your own FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup
serproxy.diff
(application/octet-stream, 1.9 KB)
diff -uNrd serproxy-0.1.2.dist/Makefile serproxy-0.1.2/Makefile --- serproxy-0.1.2.dist/Makefile Thu Dec 23 05:57:59 1999 +++ serproxy-0.1.2/Makefile Fri May 2 10:28:14 2003 @@ -16,17 +16,8 @@ CC = gcc -ifdef DEBUG CFLAGS = -Wall -g -D__UNIX__ -DDEBUG -else -CFLAGS = -Wall -O2 -fomit-frame-pointer -D__UNIX__ -endif - -ifdef USE_EF -LIBS= -lpthread -lefence -else -LIBS= -lpthread -endif +LIBS= -lc_r # Build the program @@ -35,6 +26,7 @@ install: serproxy cp -f serproxy /usr/local/bin + cp -f serproxy.cfg /usr/local/etc/serproxy.cfg.sample clean: rm -f *.o *~ diff -uNrd serproxy-0.1.2.dist/main.c serproxy-0.1.2/main.c --- serproxy-0.1.2.dist/main.c Thu Dec 23 06:00:22 1999 +++ serproxy-0.1.2/main.c Fri May 2 10:25:17 2003 @@ -37,7 +37,7 @@ void debug(void); #if defined(__UNIX__) -char cfgfile[] = "/etc/serproxy.cfg"; +char cfgfile[] = "/usr/local/etc/serproxy.cfg"; #elif defined(__WIN32__) char cfgfile[] = "serproxy.cfg"; #endif Binary files serproxy-0.1.2.dist/serproxy and serproxy-0.1.2/serproxy differ diff -uNrd serproxy-0.1.2.dist/serproxy.cfg serproxy-0.1.2/serproxy.cfg --- serproxy-0.1.2.dist/serproxy.cfg Tue Dec 14 21:53:07 1999 +++ serproxy-0.1.2/serproxy.cfg Fri May 2 10:40:25 2003 @@ -13,15 +13,15 @@ # Idle time out in seconds timeout=300 -# Port 1 settings (ttyS0) +# Port 1 settings (cuaa0) net_port1=5331 -# Port 2 settings (ttyS1) +# Port 2 settings (cuaa1) net_port2=5332 -# Port 3 settings (ttyS2) +# Port 3 settings (cuaa2) net_port3=5333 -# Port 4 settings (ttyS3) +# Port 4 settings (cuaa3) net_port4=5334 diff -uNrd serproxy-0.1.2.dist/sio.c serproxy-0.1.2/sio.c --- serproxy-0.1.2.dist/sio.c Tue Dec 14 21:06:52 1999 +++ serproxy-0.1.2/sio.c Fri May 2 10:23:06 2003 @@ -51,7 +51,7 @@ if (sio_isopen(sio)) return -1; - sprintf(filename, "/dev/ttyS%hd", sio->info.port - 1); + sprintf(filename, "/dev/cuaa%hd", sio->info.port - 1); fd = open(filename, O_RDWR);