summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authortv <tv>2004-03-29 19:44:15 +0000
committertv <tv>2004-03-29 19:44:15 +0000
commit786eaaae3bf33f1dc2bf495754cf7daced21472b (patch)
tree790e358d74fecb97ad0287798ba71ea2a3550b19 /sysutils
parent850d4f53425eddbb82c41b54ded921320c81ee47 (diff)
downloadpkgsrc-786eaaae3bf33f1dc2bf495754cf7daced21472b.tar.gz
Sredird is a serial port redirector that is compliant with the RFC 2217
"Telnet Com Port Control Option" protocol. This protocol lets you share a serial port through the network. RFC 2217 was orginally implemented in Cisco Terminal Servers in IOS version 11.x.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/sredird/DESCR4
-rw-r--r--sysutils/sredird/Makefile21
-rw-r--r--sysutils/sredird/PLIST3
-rw-r--r--sysutils/sredird/distinfo5
-rw-r--r--sysutils/sredird/patches/patch-aa61
5 files changed, 94 insertions, 0 deletions
diff --git a/sysutils/sredird/DESCR b/sysutils/sredird/DESCR
new file mode 100644
index 00000000000..86aaa1b0378
--- /dev/null
+++ b/sysutils/sredird/DESCR
@@ -0,0 +1,4 @@
+Sredird is a serial port redirector that is compliant with the RFC 2217
+"Telnet Com Port Control Option" protocol. This protocol lets you share
+a serial port through the network. RFC 2217 was orginally implemented
+in Cisco Terminal Servers in IOS version 11.x.
diff --git a/sysutils/sredird/Makefile b/sysutils/sredird/Makefile
new file mode 100644
index 00000000000..cac43c7d0d8
--- /dev/null
+++ b/sysutils/sredird/Makefile
@@ -0,0 +1,21 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/03/29 19:44:15 tv Exp $
+#
+
+DISTNAME= sredird-2.0.0
+CATEGORIES= sysutils
+MASTER_SITES= http://www.pcmicro.com/sredird/
+
+MAINTAINER= tv@duh.org
+HOMEPAGE= http://www.pcmicro.com/sredird/
+COMMENT= RFC2217 compliant serial port redirector
+
+USE_BUILDLINK3= yes
+
+MAKE_FLAGS= CC="${CC}" CFLAGS="${CFLAGS}"
+ALL_TARGET= sredird
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/sredird ${PREFIX}/libexec/sredird
+ ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/sredird.README
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/sredird/PLIST b/sysutils/sredird/PLIST
new file mode 100644
index 00000000000..6d159b0dbaf
--- /dev/null
+++ b/sysutils/sredird/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2004/03/29 19:44:15 tv Exp $
+libexec/sredird
+share/doc/sredird.README
diff --git a/sysutils/sredird/distinfo b/sysutils/sredird/distinfo
new file mode 100644
index 00000000000..6775ac9f148
--- /dev/null
+++ b/sysutils/sredird/distinfo
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1.1.1 2004/03/29 19:44:15 tv Exp $
+
+SHA1 (sredird-2.0.0.tar.gz) = 2eae6fb41b46ebf9f704dd997ef0a096e5084721
+Size (sredird-2.0.0.tar.gz) = 24053 bytes
+SHA1 (patch-aa) = 7300bf886b07e290f11cd7fae8792ddacf1a5634
diff --git a/sysutils/sredird/patches/patch-aa b/sysutils/sredird/patches/patch-aa
new file mode 100644
index 00000000000..7a72fa08f56
--- /dev/null
+++ b/sysutils/sredird/patches/patch-aa
@@ -0,0 +1,61 @@
+$NetBSD: patch-aa,v 1.1.1.1 2004/03/29 19:44:15 tv Exp $
+
+--- sredird.c.orig Mon Jan 14 05:40:44 2002
++++ sredird.c
+@@ -82,9 +82,9 @@
+ #include <fcntl.h>
+ #include <syslog.h>
+ #include <termios.h>
+-#include <termio.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
++#include <netinet/in_systm.h>
+ #include <netinet/ip.h>
+ #include <netinet/tcp.h>
+
+@@ -658,8 +658,10 @@ unsigned long int GetPortSpeed(int PortF
+ return(115200UL);
+ case B230400:
+ return(230400UL);
++#ifdef B460800
+ case B460800:
+ return(460800UL);
++#endif
+ default:
+ return(0UL);
+ }
+@@ -1038,9 +1040,11 @@ void SetPortSpeed(int PortFd, unsigned l
+ case 230400UL:
+ Speed = B230400;
+ break;
++#ifdef B460800
+ case 460800UL:
+ Speed = B460800;
+ break;
++#endif
+ default:
+ LogMsg(LOG_WARNING,"Unknwon baud rate requested, setting to 9600.");
+ Speed = B9600;
+@@ -1770,7 +1774,8 @@ int main(int argc, char * argv[])
+ int SockParm;
+
+ /* Out buffer ticks count */
+- clock_t OutBTicks = times(NULL);
++ struct tms Tms;
++ clock_t OutBTicks = times(&Tms);
+
+ /* Out buffer clock ticks limit */
+ clock_t MaxBTicks;
+@@ -1907,10 +1912,10 @@ int main(int argc, char * argv[])
+ */
+ SockParm = IPTOS_LOWDELAY;
+ setsockopt(STDIN_FILENO,SOL_SOCKET,SO_KEEPALIVE,&SockParmEnable,sizeof(SockParmEnable));
+- setsockopt(STDIN_FILENO,SOL_IP,IP_TOS,&SockParm,sizeof(SockParm));
++ setsockopt(STDIN_FILENO,IPPROTO_IP,IP_TOS,&SockParm,sizeof(SockParm));
+ setsockopt(STDIN_FILENO,SOL_SOCKET,SO_OOBINLINE,&SockParmEnable,sizeof(SockParmEnable));
+ setsockopt(STDOUT_FILENO,SOL_SOCKET,SO_KEEPALIVE,&SockParmEnable,sizeof(SockParmEnable));
+- setsockopt(STDOUT_FILENO,SOL_IP,IP_TOS,&SockParm,sizeof(SockParm));
++ setsockopt(STDOUT_FILENO,IPPROTO_IP,IP_TOS,&SockParm,sizeof(SockParm));
+
+ /* Make reads/writes unblocking */
+ ioctl(STDOUT_FILENO,FIONBIO,&SockParmEnable);