🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #12905

Re: I wanna have a DOSGate!

#12905
From: Marc Plumb
Date: Sun, 28 May 1989 21:13
33 lines
2204 bytes
In article <16031@gryphon.COM> ddave@pnet02.cts.com (David Donley) writes:
>Help!  I desperatly need to be able to fake a filehandle.  I ams trying to put
>a dosgate into a BBS.  I have a dosgate of sorts, but only the text from the
>internal commands goes out to the modem.  How can I fake normal standard
>programs into sending their stdio into my BBS code?

Write a DOS handler.  I know one fellow (bradch@microsoft, I think) who's
doing it in an editor, allowing him to connect CLI's to editor windows,
and to compile a program that hasn't been saved to disk.  Just
"cc editor:buffername"!  Add "-S editor:asmbuffer" if you like.

Matt Dillon's sample ram disk is a good place to start.  Basically, you
need to accept packets that ask you to perform read, write, seek, open,
close, etc. operations.  There's also useful information in TransAmi 2.2
with parts 2-4 of the series in 2.3, 2.4, and 2.5.

You don't need to create a separate process to be the handler; you can
just build a MsgPort and install a volume node in DOS's device list.
To add the node, there is an AddDosNode call in the expansion.library;
to remove it, you'll have to Forbid(), traverse the list and remove your
node, and Permit().  You can also add nodes that way.

Then all you have to do is respond to packets that arrive at that port.
There's a lot of BPTR messiness, butit's not too difficult, just very
annoying.  In an editor, your main event loop could just wait on both
the IDCMP and DOS ports.

One further note: it is a particularly fond wish of mine that a lot of the
BPTR stuff here will be totally scrapped in a few revs of the OS, so while
the basic idea (add device to system, handle service requests, remove device)
is unlikely to change, with luck the details will change dramatically.
-- 
	-Colin Plumb
Technical Details
Message-ID: <1989May28.171344.4525@ziebmef.uucp>
Path: arc1-ca.pugleaf.net!utzoo!attcan!telly!ziebmef!mcp
References: <16031@gryphon.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!telly!ziebmef!mcp
From: mcp@ziebmef.uucp (Marc Plumb)
Newsgroups: comp.sys.amiga.tech
Subject: Re: I wanna have a DOSGate!
Message-ID: <1989May28.171344.4525@ziebmef.uucp>
Date: 28 May 89 21:13:43 GMT
References: <16031@gryphon.COM>
Reply-To: mcp@ziebmef.UUCP (Marc Plumb)
Organization: Ziebmef Public Access Unix, Toronto, Ontario
Lines: 33