mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 21:25:07 -05:00
socket: enable only specified IP families
Allow an IP family to be specified in the socket initialization in order to globally disable the other family. This replaces the ntp_io and cmdmon code handling the -4/-6 options and fixes a case where the NTP client could still use a disabled family if the source was specified with an IP address.
This commit is contained in:
9
socket.h
9
socket.h
@@ -73,14 +73,15 @@ typedef struct {
|
||||
int descriptor;
|
||||
} SCK_Message;
|
||||
|
||||
/* Initialisation function */
|
||||
extern void SCK_Initialise(void);
|
||||
/* Initialisation function (the specified IP family is enabled,
|
||||
or all if IPADDR_UNSPEC) */
|
||||
extern void SCK_Initialise(int family);
|
||||
|
||||
/* Finalisation function */
|
||||
extern void SCK_Finalise(void);
|
||||
|
||||
/* Check if support for the IP family was enabled in the build */
|
||||
extern int SCK_IsFamilySupported(int family);
|
||||
/* Check if support for the IP family is enabled */
|
||||
extern int SCK_IsIpFamilyEnabled(int family);
|
||||
|
||||
/* Get the 0.0.0.0/::0 or 127.0.0.1/::1 address */
|
||||
extern void SCK_GetAnyLocalIPAddress(int family, IPAddr *local_addr);
|
||||
|
||||
Reference in New Issue
Block a user