mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-21 04:06:46 +00:00
Add remserial, a communication bridge between a TCP/IP network port and a
character-oriented device.
This commit is contained in:
parent
bc1e927983
commit
283e371ea1
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=267413
@ -115,6 +115,7 @@
|
||||
SUBDIR += qpage
|
||||
SUBDIR += qrq
|
||||
SUBDIR += qsstv
|
||||
SUBDIR += remserial
|
||||
SUBDIR += ruby-serialport
|
||||
SUBDIR += ruby-termios
|
||||
SUBDIR += rubygem-callsign
|
||||
|
32
comms/remserial/Makefile
Normal file
32
comms/remserial/Makefile
Normal file
@ -0,0 +1,32 @@
|
||||
# New ports collection makefile for: remserial
|
||||
# Date created: 05 Jan 2011
|
||||
# Whom: Emanuel Haupt <ehaupt@FreeBSD.org>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= remserial
|
||||
PORTVERSION= 1.4
|
||||
CATEGORIES= comms
|
||||
MASTER_SITES= http://lpccomp.bc.ca/remserial/ \
|
||||
CRITICAL
|
||||
|
||||
MAINTAINER= ehaupt@FreeBSD.org
|
||||
COMMENT= Bridge between a TCP/IP network port and a character-oriented device
|
||||
|
||||
USE_DOS2UNIX= yes
|
||||
MAKE_JOBS_SAFE= yes
|
||||
|
||||
PLIST_FILES= bin/remserial
|
||||
PORTDOCS= README.txt
|
||||
|
||||
CFLAGS+= -DOSVERSION=\"${OSVERSION}\"
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
|
||||
.if !defined(NOPORTDOCS)
|
||||
${MKDIR} ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/${PORTDOCS} ${DOCSDIR}
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
2
comms/remserial/distinfo
Normal file
2
comms/remserial/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (remserial-1.4.tar.gz) = 4cbe9c754a2be4926789500bafb84bda54e11b01aab522a3ce71ec4db615fefb
|
||||
SIZE (remserial-1.4.tar.gz) = 7497
|
4
comms/remserial/files/patch-define.h
Normal file
4
comms/remserial/files/patch-define.h
Normal file
@ -0,0 +1,4 @@
|
||||
--- ./define.h.orig 2011-01-05 10:31:12.000000000 +0100
|
||||
+++ ./define.h 2011-01-05 10:31:12.000000000 +0100
|
||||
@@ -0,0 +1 @@
|
||||
+#define VERSION "1.4"
|
20
comms/remserial/files/patch-remserial.c
Normal file
20
comms/remserial/files/patch-remserial.c
Normal file
@ -0,0 +1,20 @@
|
||||
--- ./remserial.c.orig 2011-01-05 10:31:12.000000000 +0100
|
||||
+++ ./remserial.c 2011-01-05 10:31:12.000000000 +0100
|
||||
@@ -34,6 +34,8 @@
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
|
||||
+#include "define.h"
|
||||
+
|
||||
struct sockaddr_in addr,remoteaddr;
|
||||
int sockfd = -1;
|
||||
int port = 23000;
|
||||
@@ -417,7 +419,7 @@
|
||||
}
|
||||
|
||||
void usage(char *progname) {
|
||||
- printf("Remserial version 1.3. Usage:\n");
|
||||
+ printf("Remserial version %s. Usage:\n", VERSION);
|
||||
printf("remserial [-r machinename] [-p netport] [-s \"stty params\"] [-m maxconnect] device\n\n");
|
||||
|
||||
printf("-r machinename The remote machine name to connect to. If not\n");
|
49
comms/remserial/files/patch-stty.c
Normal file
49
comms/remserial/files/patch-stty.c
Normal file
@ -0,0 +1,49 @@
|
||||
--- ./stty.c.orig 2011-01-05 10:31:12.000000000 +0100
|
||||
+++ ./stty.c 2011-01-05 10:33:33.000000000 +0100
|
||||
@@ -29,6 +29,37 @@
|
||||
#define RFLG 4
|
||||
#define BFLG 5
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+#define BSDLY 0020000
|
||||
+#define IUCLC 0001000
|
||||
+#define OFILL 0000100
|
||||
+#define OFDEL 0000200
|
||||
+#define NLDLY 0000400
|
||||
+#define BS0 0000000
|
||||
+#define BS1 0020000
|
||||
+#define CR0 0000000
|
||||
+#define CR1 0001000
|
||||
+#define CR2 0002000
|
||||
+#define CR3 0003000
|
||||
+#define CRDLY 0003000
|
||||
+#define FF0 0000000
|
||||
+#define FF1 0100000
|
||||
+#define FFDLY 0100000
|
||||
+#define NL0 0000000
|
||||
+#define NL1 0000400
|
||||
+#define TAB1 0004000
|
||||
+#define TAB2 0010000
|
||||
+#define VT0 0000000
|
||||
+#define VT1 0040000
|
||||
+#define VTDLY 0040000
|
||||
+#if OSVERSION < 800000
|
||||
+/* for older FreeBSD versions */
|
||||
+#define TAB0 0000000
|
||||
+#define TAB3 0014000
|
||||
+#define TABDLY 0014000
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
extern int errno;
|
||||
|
||||
static struct sttyset {
|
||||
@@ -91,7 +122,7 @@
|
||||
{ "inlcr", IFLG, INLCR, INLCR },
|
||||
{ "igncr", IFLG, IGNCR, IGNCR },
|
||||
{ "icrnl", IFLG, ICRNL, ICRNL },
|
||||
-#ifdef IUCLC // Missing on OSX, FreeBSD
|
||||
+#ifdef __FreeBSD__ // Missing on OSX, FreeBSD
|
||||
{ "iuclc", IFLG, IUCLC, IUCLC },
|
||||
#endif
|
||||
{ "ixon", IFLG, IXON, IXON },
|
13
comms/remserial/pkg-descr
Normal file
13
comms/remserial/pkg-descr
Normal file
@ -0,0 +1,13 @@
|
||||
Remserial acts as a communications bridge between a TCP/IP network port and a
|
||||
device such as a serial port. Any character-oriented /dev device will work.
|
||||
|
||||
The program can operate as a server accepting network connections from other
|
||||
machines, or as a client, connecting to remote machine that is running the
|
||||
remserial program or some other program that accepts a raw network connection.
|
||||
The network connection passes data as-is, there is no control protocol over the
|
||||
network socket.
|
||||
|
||||
Multiple copies of the program can run on the same computer at the same time
|
||||
assuming each is using a different network port and device.
|
||||
|
||||
WWW: http://lpccomp.bc.ca/remserial/
|
Loading…
Reference in New Issue
Block a user