iPXE
ntpmgmt.h File Reference

NTP management. More...

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 FILE_SECBOOT (PERMITTED)
int ntp (const char *hostname)
 Get time and date via NTP.

Detailed Description

NTP management.

Definition in file ntpmgmt.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED )

◆ ntp()

int ntp ( const char * hostname)
extern

Get time and date via NTP.

Parameters
hostnameHostname
Return values
rcReturn status code

Definition at line 46 of file ntpmgmt.c.

46 {
47 int rc;
48
49 /* Start NTP client */
50 if ( ( rc = start_ntp ( &monojob, hostname ) ) != 0 )
51 return rc;
52
53 /* Wait for NTP to complete */
54 if ( ( rc = monojob_wait ( NULL, 0 ) ) != 0 )
55 return rc;
56
57 return 0;
58}
#define NULL
NULL pointer (VOID *)
Definition Base.h:322
struct arbelprm_rc_send_wqe rc
Definition arbel.h:3
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
int start_ntp(struct interface *job, const char *hostname)
Start NTP client.
Definition ntp.c:238

References monojob, monojob_wait(), NULL, rc, and start_ntp().

Referenced by __setting(), COMMAND(), ntp_close(), ntp_deliver(), ntp_exec(), ntp_expired(), ntp_request(), ntp_window_changed(), and start_ntp().