|
iPXE
|
Network Time Protocol. More...
Go to the source code of this file.
Data Structures | |
| struct | ntp_short |
| An NTP short-format timestamp. More... | |
| struct | ntp_timestamp |
| An NTP timestamp. More... | |
| union | ntp_id |
| An NTP reference identifier. More... | |
| struct | ntp_header |
| An NTP header. More... | |
Macros | |
| #define | NTP_PORT 123 |
| NTP port. | |
| #define | NTP_FL_LI_UNKNOWN 0xc0 |
| Leap second indicator: unknown. | |
| #define | NTP_FL_VN_1 0x20 |
| NTP version: 1. | |
| #define | NTP_FL_MODE_CLIENT 0x03 |
| NTP mode: client. | |
| #define | NTP_FL_MODE_SERVER 0x04 |
| NTP mode: server. | |
| #define | NTP_FL_MODE_MASK 0x07 |
| NTP mode mask. | |
| #define | NTP_EPOCH 2208988800UL |
| NTP timestamp for start of Unix epoch. | |
| #define | NTP_FRACTION_MAGIC 0x69505845UL |
| NTP fraction of a second magic value. | |
| #define | NTP_MIN_TIMEOUT ( 1 * TICKS_PER_SEC ) |
| NTP minimum retransmission timeout. | |
| #define | NTP_MAX_TIMEOUT ( 10 * TICKS_PER_SEC ) |
| NTP maximum retransmission timeout. | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| FILE_SECBOOT (PERMITTED) | |
| int | start_ntp (struct interface *job, const char *hostname) |
| Start NTP client. | |
Network Time Protocol.
Definition in file ntp.h.
| #define NTP_PORT 123 |
| #define NTP_FL_LI_UNKNOWN 0xc0 |
| #define NTP_FL_VN_1 0x20 |
| #define NTP_FL_MODE_CLIENT 0x03 |
| #define NTP_FL_MODE_SERVER 0x04 |
| #define NTP_FL_MODE_MASK 0x07 |
| #define NTP_EPOCH 2208988800UL |
NTP timestamp for start of Unix epoch.
Definition at line 88 of file ntp.h.
Referenced by ntp_request().
| #define NTP_FRACTION_MAGIC 0x69505845UL |
NTP fraction of a second magic value.
This is a policy decision.
Definition at line 94 of file ntp.h.
Referenced by ntp_deliver(), and ntp_request().
| #define NTP_MIN_TIMEOUT ( 1 * TICKS_PER_SEC ) |
NTP minimum retransmission timeout.
This is a policy decision.
Definition at line 100 of file ntp.h.
Referenced by start_ntp().
| #define NTP_MAX_TIMEOUT ( 10 * TICKS_PER_SEC ) |
NTP maximum retransmission timeout.
This is a policy decision.
Definition at line 106 of file ntp.h.
Referenced by start_ntp().
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
|
extern |
Start NTP client.
| job | Job control interface |
| hostname | NTP server |
| rc | Return status code |
Definition at line 238 of file ntp.c.
References DBGC, ENOMEM, htons, intf_init(), intf_plug_plug(), memset(), ntp(), ntp_close(), ntp_expired(), ntp_job_desc, NTP_MAX_TIMEOUT, NTP_MIN_TIMEOUT, NTP_PORT, ntp_xfer_desc, NULL, rc, ref_init, ref_put, sa, SOCK_DGRAM, st, strerror(), xfer_open_named_socket(), and zalloc().
Referenced by ntp().