socket: add new socket support

Add a new file implementing support for opening sockets, sending and
receiving messages with control messages (e.g. addresses, timestamps),
and related operations, which should be simpler to use than the system
functions and allow their features to be reused between different parts
of the chrony code.

It is based on the ntp_io.c and ntp_io_linux.c files. It will be used by
the NTP client/server, cmdmon server, client, and others.
This commit is contained in:
Miroslav Lichvar
2019-07-18 08:26:06 +02:00
parent 3f8c57c8f2
commit 86a3ef9ed1
2 changed files with 1289 additions and 0 deletions

1162
socket.c Normal file

File diff suppressed because it is too large Load Diff