@Hans
Replied on thread:
here's copy
This code
#include <stdio.h>
int main(int argc, char ** argv)
{
char host[256];
host[0] = 0;
gethostname(host,255);
printf("host: "%s"\n",host);
}
returns the correct hostname for me
eg
Quote:
ram:testhostname
host: "amiga"
Though that is not not quite what you want as that hostname is local to my SAM 440 on the rest of the network it's defeined as SAM in the various local hosts databases. Using fixed ips on my network so the router doesn't knw the hostnames of the machines.
So what does the hostname command return?
eg here on my SAM I get:
Quote:
10.AmigaOS4:> hostname
amiga
which matches up.
Do you actually want the hostname or the address?