iPXE
Functions
nslookup.h File Reference

Standalone name resolution. More...

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER)
int nslookup (const char *name, const char *setting_name)
 Perform (blocking) standalone name resolution.

Detailed Description

Standalone name resolution.

Definition in file nslookup.h.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER  )
int nslookup ( const char *  name,
const char *  setting_name 
)

Perform (blocking) standalone name resolution.

Parameters:
nameName to resolve
setting_nameSetting name
Return values:
rcReturn status code

Definition at line 191 of file nslookup.c.

References monojob, monojob_wait(), NULL, printf(), rc, resolv_setting(), and strerror().

Referenced by resolv_setting().

                                                            {
        int rc;

        /* Perform name resolution */
        if ( ( rc = resolv_setting ( &monojob, name, setting_name ) ) == 0 )
                rc = monojob_wait ( NULL, 0 );
        if ( rc != 0 ) {
                printf ( "Could not resolve %s: %s\n", name, strerror ( rc ) );
                return rc;
        }

        return 0;
}