getdomainname()

Get the domain name of the current host

Synopsis:

#include <unistd.h>

int getdomainname( char * name,
                   size_t namelen );

Since:

BlackBerry 10.0.0

Arguments:

name
A buffer where the function can store the domain name.
namelen
The size of the name array.

Library:

libsocket

Use the -l socket option to qcc to link against this library.

Description:

The getdomainname() function gets the standard domain name for the current processor and stores it in the buffer that name points to. The name is null-terminated.

If the buffer is too small, the name is truncated.

Returns:

0
Success.
-1
An error occurred ( errno is set).

Errors:

EFAULT
The name or namelen parameters gave an invalid address.

Classification:

Unix

Safety:  
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus