[DGD] Prep for FTP daemon

Felix A. Croes felix at dworkin.nl
Wed Jul 12 02:24:01 CEST 2006


Shentino <shentino at gmail.com> wrote:

> I'm in the middle of writing a passive FTP daemon, but ran across a
> technical problem.
>
> How does the mudlib find out the IP address of the server it's running
> on?  (required in the reply to PASV)
>
> I'll probably need a C helper outside of DGD to do the lookup so I can
> stash a file in System or something.
>
> What do I do to find out my own IP address?  I'm pretty clueless in
> the C networking department.

Depends on your platform; on Linux, I'd use "hostname -i" in the mud
restart script.

Have you considered using ssh instead of ftp?  Basic ssh support in
LPC (enough to allow a ssh -T connection from linux) already exists,
and adding scp support would be fairly straightforward.

Regards,
Dworkin



More information about the DGD mailing list