NSPR eqivalent to gethostname()?

View: New views
2 Messages — Rating Filter:   Alert me  

NSPR eqivalent to gethostname()?

by Joachim Ziegler-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

how do I find out the name(s) of my local host? I see that there are the
functions

PR_GetHostByName()
PR_GetHostByAddr()

but not

PR_GetHostName()

Greetings,
Joachim
_______________________________________________
dev-tech-nspr mailing list
dev-tech-nspr@...
https://lists.mozilla.org/listinfo/dev-tech-nspr

Re: NSPR eqivalent to gethostname()?

by Wan-Teh Chang-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Jun 20, 2008 at 2:13 AM, Joachim Ziegler <ziegler@...> wrote:
> Hello,
>
> how do I find out the name(s) of my local host?

Hi,

Call PR_GetSystemInfo(PR_SI_HOSTNAME, buf, buflen) or
PR_GetSystemInfo(PR_SI_HOSTNAME_UNTRUNCATED, buf, buflen)
http://www.mozilla.org/projects/nspr/reference/html/prsystem.html
http://lxr.mozilla.org/nspr/source/nsprpub/pr/include/prsystem.h#71

Wan-Teh
_______________________________________________
dev-tech-nspr mailing list
dev-tech-nspr@...
https://lists.mozilla.org/listinfo/dev-tech-nspr
LightInTheBox - Buy quality products at wholesale price!