[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gethostname library function



>> >Comments ?
>> 
>> I agree, even better would be not to trust the HOSTNAME environment
>> variable! :-)
>>
>> I believe MiNT should hold at least two things..
>> 	A hostname
>> 	A domainname
>> 
>> In a root read-writable, non-root read-only shared memory segment.
>
>Hmm - seems like a good idea. Could set the variables in the mint.cnf file
>(or store them in the kernel)

Well, you could store the defaults in the kernel, the rest could be set
using programs.. after all, as long as the programs were running as root
they could access the memory and write the data. Otherwise new system calls
could be added to write that info.

>
>> It would be nice if it could hold other such information as well (such as
>> possibly an IP address etc).
>
>Have to wait for tcpip first :-)

Not really... merely allocate memory to store one in the shared memory
segment. I'm sure one 8K page of memory would be enough for everything
you'll need in there, including a hostid. :-)

You might need more for IP.. routing tables etc.

>
>Simon.
>

Steve

-- 
---------------------------------------------------------------------------
Computer Systems Administrator, Dept. of Earth Sciences, Oxford University.
E-Mail: steve@uk.ac.ox.earth (JANET) steve@earth.ox.ac.uk (Internet).
Tel:- Oxford (0865) 282110 (UK) or +44 865 282110 (International).