Share via


Networking_DhcpServerConfig_SetNtpServerAddresses İşlevi

Üst bilgi: applibs/networking.h #include <>

Networking_DhcpServerConfig yapısına bir dizi NTP sunucusu IP adresi uygular.

int Networking_DhcpServerConfig_SetNtpServerAddresses(Networking_DhcpServerConfig *dhcpServerConfig, const struct in_addr *ntpServerAddresses, size_t serverCount);

Parametre

  • dhcpServerConfig Güncelleştirilecek Networking_DhcpServerConfig yapısına yönelik bir işaretçi.

  • ntpServerAddresses NTP sunucusu IP adresleri dizisinin işaretçisi.

  • serverCount Dizideki IP adreslerinin ntpServerAddresses sayısı.

Hata

Hatayla karşılaşılırsa ve hata değerine ayarlanırsa errno -1 döndürür.

  • EFAULT: dhcpServerConfig parametresi NULL'dir.

  • EFAULT: ntpServerAddresses parametresi NULL'dir.

  • EINVAL: Üçten fazla IP adresi sağlandı.

Diğer errno hatalar da belirtilebilir; bu tür hatalar belirlenimci değildir ve sistem güncelleştirmeleri aracılığıyla aynı davranış korunmayabilir.

Dönüş değeri

Başarı için 0 veya hata için -1 döndürür; bu durumda errno hata değerine ayarlanır.

Kavramlar ve örnekler