Funkcja Networking_DhcpServerConfig_SetNtpServerAddresses
Nagłówek: #include <applibs/networking.h>
Stosuje zestaw adresów IP serwera NTP do struktury Networking_DhcpServerConfig .
int Networking_DhcpServerConfig_SetNtpServerAddresses(Networking_DhcpServerConfig *dhcpServerConfig, const struct in_addr *ntpServerAddresses, size_t serverCount);
Parametry
dhcpServerConfig
Wskaźnik do Networking_DhcpServerConfig strukturę do zaktualizowania.ntpServerAddresses
Wskaźnik do tablicy adresów IP serwera NTP.serverCount
Liczba adresów IP w tablicyntpServerAddresses
.
Błędy
Zwraca wartość -1 w przypadku napotkania błędu i ustawia errno
wartość błędu.
EFAULT:
dhcpServerConfig
parametr ma wartość NULL.EFAULT:
ntpServerAddresses
parametr ma wartość NULL.EINVAL: Podano ponad trzy adresy IP.
Mogą być również określone inne errno
błędy; takie błędy nie są deterministyczne i to samo zachowanie może nie być zachowane za pośrednictwem aktualizacji systemu.
Zwracana wartość
Zwraca wartość 0 dla sukcesu lub -1 dla niepowodzenia, w którym to przypadku errno
zostanie ustawiona wartość błędu.