iPXE
nslookup.h File Reference

Standalone name resolution. More...

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER)
 FILE_SECBOOT (PERMITTED)
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()

FILE_LICENCE ( GPL2_OR_LATER )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED )

References name, and setting_name().

◆ nslookup()

int nslookup ( const char * name,
const char * setting_name )
extern

Perform (blocking) standalone name resolution.

Parameters
nameName to resolve
setting_nameSetting name
Return values
rcReturn status code

Definition at line 192 of file nslookup.c.

192 {
193 int rc;
194
195 /* Perform name resolution */
196 if ( ( rc = resolv_setting ( &monojob, name, setting_name ) ) == 0 )
197 rc = monojob_wait ( NULL, 0 );
198 if ( rc != 0 ) {
199 printf ( "Could not resolve %s: %s\n", name, strerror ( rc ) );
200 return rc;
201 }
202
203 return 0;
204}
#define NULL
NULL pointer (VOID *)
Definition Base.h:322
struct arbelprm_rc_send_wqe rc
Definition arbel.h:3
const char * name
Definition ath9k_hw.c:1986
struct interface monojob
Definition monojob.c:57
int monojob_wait(const char *string, unsigned long timeout)
Wait for single foreground job to complete.
Definition monojob.c:82
static int resolv_setting(struct interface *job, const char *name, const char *setting_name)
Initiate standalone name resolution.
Definition nslookup.c:150
int setting_name(struct settings *settings, const struct setting *setting, char *buf, size_t len)
Return full setting name.
Definition settings.c:1607
char * strerror(int errno)
Retrieve string representation of error number.
Definition strerror.c:79
int printf(const char *fmt,...)
Write a formatted string to the console.
Definition vsprintf.c:465

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