Article View: news.software.nntp
Article #1557NNTP via dialup link
From: Eric A. Litman
Date: Thu, 15 Oct 1992 06:16
Date: Thu, 15 Oct 1992 06:16
61 lines
3312 bytes
3312 bytes
I have been commissioned with setting up a limited newsfeed for a site
with minimal available resources. What I would like to do is allow the
users at the site to open a dialup connection to an internet-connected
machine and emulate a real NNTP connection using perl scripts.
The concept is simple enough. A user will tip/cu (kermit drops carrier
when it is killed) into his/her account on the remote machine, kill
the tip process without dropping carrier, then run the preferred news
reader on the client machine. On this machine, in place of a local NNTP
server will be a perl script, registered in /etc/inetd.conf, which
will first send a command to run a similar script on the remote
machine, then simply copy all input to /dev/ttya (the outgoing serial
device on a NeXT.) The script on the remote machine will open the NNTP
connection to the server and pass back and forth the necessary
commands. Basic copy-in, copy-out procedure.
Assuming the client script is called pnntpd (pseudo-NNTP), the line in
/etc/inetd.conf on the client machine will read:
nntp stream tcp nowait root /usr/local/scripts/pnntpd pnntpd
Here's a simple diagram of what I need:
{newssrv}<-->[ server script ]<-->%phone%<-->[ client script ]<-->{client}
When the news reader opens the connection to the local NNTP server, it
will simply pass all of its data through both scripts to the real,
remote NNTP server. The client newsreader, Tin, will be configured so
that it connects to 'localhost'.
I have something of a dysfunctional client script that is missing the
output command to the server machine to start the nntp session:
# taken from Steve_Hayman@next.com
open(TTYA, "+>/dev/ttya");
if ( fork() ) {
# parent - copy stdin to ttya
while ( <STDIN> ) {
print TTYA;
}
} else {
# child - copy ttya to stdout
while ( <TTYA> ) {
print;
}
}
This seems very straight-forward, but not knowing how to script in
perl I'm at a loss. What I need is a working script for the server
machine, and hopefully a nicer client script as well. Would it be
possible to have the script dial the modem, log into the remote
machine (through a Xylogics Annex box), and start the server script
without any interaction from the user? This would be *ideal*.
I truly appreciate any help you might have to offer. I will gladly
summarize to the group any responses I receive.
--
Eric A. Litman #import <std/disclaimer.h> | NeXTMail, MIME accepted - please
Federal Region, NeXT Campus Consultant | indicate in Subject line.
Technical Details
Message-ID:
<1992Oct15.061626.29855@wam.umd.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.unix.admin.mbox.zip!sparky!uunet!ferkel.ucsb.edu!taco!gatech!darwin.sura.net!haven.umd.edu!wam.umd.edu!elitmanShow Full Headers
Complete Article Headers
Message-ID: <1992Oct15.061626.29855@wam.umd.edu> Subject: NNTP via dialup link Date: Thu, 15 Oct 1992 06:16:26 GMT From: elitman@nxstep.com (Eric A. Litman) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.unix.admin.mbox.zip!sparky!uunet!ferkel.ucsb.edu!taco!gatech!darwin.sura.net!haven.umd.edu!wam.umd.edu!elitman Newsgroups: comp.unix.admin,news.software.nntp Sender: usenet@wam.umd.edu (USENET News system) Nntp-Posting-Host: rac2.wam.umd.edu Organization: NXSTEP Ventures X-Newsreader: TIN [version 1.1 PL6] Lines: 60