ladybird/Userland
Nico Weber 8212ba467c ntpquery: Use SO_TIMESTAMP to get a more accurate destination_timestamp
We can now see at which time a packet was received by the network
adapter, instead of having to measure user time after receiving
the packet in user space.

This means the destination timestamp is no longer affected by in-kernel
queuing delays, which can be tens of milliseconds when the system
is under load.

It also means that if ntpquery grows a message queue that waits on
replies from several requests, the time used processing one response
won't be incorrectly included in the destination timestamp of the
next response (in case two responses arrive at the network adapter
at roughly the same time).

NTP's calculations work better if send and receive latency are
about equal, and this only removes in-kernel queue delays and
context switch delays for the receiving packet. But the two
latencies aren't very equal anyways because $network. Also, maybe
we can add another API for setting the send time in the outgoing
packet in kernel space right before (or when) hitting the network
adapter and use that here too. So this still seems like progress.
2020-09-17 17:23:01 +02:00
..
Tests Meta: Fix wonky copyright headers in Tests 2020-09-05 14:19:38 +02:00
allocate.cpp Userland/allocate: Switch to KiB/MiB 2020-08-16 16:33:28 +02:00
aplay.cpp Userland: Use Core::ArgsParser for 'aplay' 2020-08-06 20:41:13 +02:00
arp.cpp AK: JsonParser improvements 2020-06-13 12:43:22 +02:00
avol.cpp Userland: Use Core::ArgsParser for 'avol' 2020-08-06 20:41:13 +02:00
base64.cpp AK: Rename span() to bytes() when appropriate. 2020-08-15 21:21:18 +02:00
basename.cpp Userland: Use Core::ArgsParser for 'basename' 2020-08-06 20:41:13 +02:00
cal.cpp Userland: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
cat.cpp Meta: Scale back overly informal user-facing strings 2020-06-17 18:35:49 +02:00
checksum.cpp Userland: Add {md5,sha1,sha256,sha512}sum 2020-09-13 11:37:56 +02:00
chgrp.cpp Userland: Use Core::ArgsParser for 'chgrp' 2020-08-06 20:41:13 +02:00
chmod.cpp chmod: Tweak usage string 2020-02-16 09:51:49 +01:00
chown.cpp chown: Don't allow "invalid" uid/gid specs (#2596) 2020-06-21 09:54:07 +02:00
chroot.cpp Kernel+Userland: Support remounting filesystems :^) 2020-05-29 07:53:30 +02:00
clear.cpp clear: Use pledge() 2020-02-18 11:35:47 +01:00
CMakeLists.txt Userland: Add {md5,sha1,sha256,sha512}sum 2020-09-13 11:37:56 +02:00
copy.cpp LibGUI: Make the Clipboard API deal in raw byte buffers a bit more 2020-09-05 16:16:01 +02:00
cp.cpp AK: Rename FileSystemPath -> LexicalPath 2020-05-26 14:35:10 +02:00
crash.cpp Kernel: Move headers intended for userspace use into Kernel/API/ 2020-07-04 17:22:23 +02:00
cut.cpp cut: Accept input from stdin if no files are given 2020-07-03 19:30:13 +02:00
date.cpp AK: Make string-to-number conversion helpers return Optional 2020-06-12 21:28:55 +02:00
df.cpp Everywhere: Consolidate human_readable_size() implementations 2020-08-16 16:33:28 +02:00
dirname.cpp Userland: Add a simple dirname(1) utility 2020-08-10 21:20:28 +02:00
disasm.cpp disasm: Use make<X86::ELFSymbolProvider> instead of naked new 2020-08-17 13:12:46 +02:00
disk_benchmark.cpp Userland: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
dmesg.cpp AK: Use size_t for ByteBuffer sizes 2020-02-20 13:20:34 +01:00
du.cpp Meta: Replace remaining LibM/math.h includes with math.h 2020-08-12 16:18:33 +02:00
echo.cpp Userland: Add support for the '-n' flag to 'echo' 2020-07-30 18:47:41 +02:00
env.cpp Userland: Allow executing binaries from PATH with env. 2020-09-16 19:39:17 +02:00
false.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
fgrep.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
find.cpp Userland: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
flock.cpp Everywhere: Replace some uses of fork/exec with posix_spawn 2020-06-29 12:04:27 +02:00
functrace.cpp LibDebug: Move everything into the "Debug" namespace 2020-08-25 09:46:06 +02:00
gron.cpp AK: JsonParser improvements 2020-06-13 12:43:22 +02:00
gunzip.cpp AK: Lower the requirements for InputStream::eof and rename it. 2020-09-14 20:58:12 +02:00
head.cpp Userspace: Add missing #includes now that AK/StdLibExtras.h is smaller 2020-03-08 13:06:51 +01:00
host.cpp host: Use ArgsParser to parse arguments, and add man page (#1252) 2020-02-20 15:12:55 +01:00
hostname.cpp Userland: Use Core::ArgsParser for 'hostname' 2020-08-06 20:41:13 +02:00
html.cpp LibWeb: Rename PageView => InProcessWebView 2020-08-17 18:05:35 +02:00
id.cpp Userland: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
ifconfig.cpp Everywhere: Port to String::copy_characters_to_buffer() 2020-08-30 17:35:27 +02:00
ini.cpp Userland: Add "ini" command to read and write .ini config files 2020-07-11 23:56:33 +02:00
jp.cpp Userland: Handle invalid JSON in 'jp' 2020-08-06 20:41:13 +02:00
js.cpp LibLine: Handle interrupts/window size changes internally 2020-08-21 16:10:51 +02:00
keymap.cpp keymap: Add copyright header 2020-06-18 23:00:19 +02:00
kill.cpp AK: Make string-to-number conversion helpers return Optional 2020-06-12 21:28:55 +02:00
killall.cpp AK: Make string-to-number conversion helpers return Optional 2020-06-12 21:28:55 +02:00
ln.cpp ln: Use pledge() 2020-02-18 13:29:54 +01:00
ls.cpp ls: Fix issue with too-narrow columns in "ls" output 2020-08-28 12:58:05 +02:00
lsirq.cpp AK: JsonParser improvements 2020-06-13 12:43:22 +02:00
lsof.cpp Userland: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
lspci.cpp AK: JsonParser improvements 2020-06-13 12:43:22 +02:00
man.cpp LibMarkdown: Change MD Document parse API to return a RefPtr 2020-05-30 00:32:12 +02:00
md.cpp Userland: Use Core::ArgsParser for 'md' 2020-08-06 20:41:13 +02:00
misbehaving-application.cpp Userland: Provide a misbehaving application 2020-08-17 00:01:13 +02:00
mkdir.cpp AK: Rename FileSystemPath -> LexicalPath 2020-05-26 14:35:10 +02:00
mkfifo.cpp Userland: add mkfifo(1) 2020-07-19 11:46:37 +02:00
mknod.cpp Userland: mknod: Don't use major/minor when creating a pipe 2020-07-19 11:46:37 +02:00
modload.cpp Userland: Use Core::ArgsParser for 'modload' 2020-08-06 20:41:13 +02:00
modunload.cpp Userland: Use Core::ArgsParser for 'modunload' 2020-08-06 20:41:13 +02:00
more.cpp Userland: Explicitly ignore number of types read, found by Coverity 2020-08-17 09:17:57 +02:00
mount.cpp Userland: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
mv.cpp mv: Accept (but ignore) -f 2020-08-11 20:29:14 +02:00
nc.cpp Userland: Fix nc by not memset()'ing the input address char* 2020-07-28 13:19:22 +02:00
nl.cpp LibCore: Remove leading C from filenames 2020-02-06 15:04:03 +01:00
notify.cpp LibGUI: Make GUI::Application a Core::Object 2020-07-04 14:05:57 +02:00
ntpquery.cpp ntpquery: Use SO_TIMESTAMP to get a more accurate destination_timestamp 2020-09-17 17:23:01 +02:00
open.cpp open: Resolve the realpath before passing it to URL() 2020-08-08 11:58:57 +02:00
pape.cpp LibGUI: Make GUI::Application a Core::Object 2020-07-04 14:05:57 +02:00
passwd.cpp Userland: Fix passing a non-format string to fprintf() 2020-08-30 17:35:27 +02:00
paste.cpp LibGUI: Make the Clipboard API deal in raw byte buffers a bit more 2020-09-05 16:16:01 +02:00
pidof.cpp AK: Make string-to-number conversion helpers return Optional 2020-06-12 21:28:55 +02:00
ping.cpp Everywhere: Port to String::copy_characters_to_buffer() 2020-08-30 17:35:27 +02:00
printf.cpp Userland: Add an implementation of printf 2020-09-11 21:41:23 +02:00
pro.cpp Userland: Allow unquoted 'filename' values in 'pro' 2020-08-31 23:05:58 +02:00
profile.cpp profile: Allow launching a command with profiling enabled 2020-02-22 11:01:37 +01:00
ps.cpp ps: Widen the username column slightly 2020-05-15 00:01:01 +02:00
purge.cpp Userland: Use Core::ArgsParser for 'purge' 2020-08-06 20:41:13 +02:00
readlink.cpp Userland: Add readlink(1) 2020-06-17 15:02:03 +02:00
realpath.cpp Userland: Use Core::ArgsParser for 'realpath' 2020-08-06 20:41:13 +02:00
reboot.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
rm.cpp Userland: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
rmdir.cpp Userland: Use Core::ArgsParser for 'rmdir' 2020-08-06 20:41:13 +02:00
seq.cpp LibC+Userland: Prefer snprintf over sprintf 2020-08-22 20:55:10 +02:00
shutdown.cpp LibCore: Remove leading C from filenames 2020-02-06 15:04:03 +01:00
sleep.cpp Userland: Fix a signal race condition 2020-09-10 16:00:11 +02:00
sort.cpp Userspace: Add missing #includes now that AK/StdLibExtras.h is smaller 2020-03-08 13:06:51 +01:00
stat.cpp Kernel+LibC: Fix various build issues introduced by ssize_t 2020-05-23 15:27:33 +02:00
strace.cpp Kernel: Move headers intended for userspace use into Kernel/API/ 2020-07-04 17:22:23 +02:00
su.cpp Userland: Use Core::ArgsParser for 'su' 2020-08-06 20:41:13 +02:00
sync.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
syscall.cpp Kernel: Tidy up the syscalls list by reorganizing the enumerator macro 2020-08-04 18:17:16 +02:00
sysctl.cpp sysctl: Permit 'sysctl -a' invocation 2020-05-04 09:41:43 +02:00
tail.cpp Userland: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
tee.cpp AK: Make Vector use size_t for its size and capacity 2020-02-25 14:52:35 +01:00
test-bindtodevice.cpp Test: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
test-compress.cpp LibCompress: Add unit tests for CanonicalCode. 2020-09-11 16:07:45 +02:00
test-crypto.cpp Userland: Stop passing ignored timezones to gettimeofday 2020-08-28 09:17:01 +02:00
test-js.cpp test-js: Catch SIGINFO and dump the current test name + pass/fail/skip 2020-09-09 21:10:23 +02:00
test-web.cpp Userland: Stop passing ignored timezones to gettimeofday 2020-08-28 09:17:01 +02:00
test.cpp Test: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
test_efault.cpp Kernel: Fail with EFAULT for any address+size that would wrap around 2020-01-29 12:56:07 +01:00
test_env.cpp LibC: Add tests for getenv, setenv, putenv 2020-08-01 16:46:04 +02:00
test_io.cpp Test: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
top.cpp LibCore+top: Use pid_t for pgid/pgrp/sid numbers 2020-09-06 19:04:47 +02:00
touch.cpp Userland: "touch" can now handle multiple paths as arguments 2020-05-01 17:08:46 +02:00
tr.cpp Userland: Use Core::ArgsParser for 'tr' 2020-08-06 20:41:13 +02:00
tree.cpp Userland: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
true.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
truncate.cpp AK: Make string-to-number conversion helpers return Optional 2020-06-12 21:28:55 +02:00
tt.cpp Userland/tt: Use a default value for the test to run 2020-09-03 10:08:15 +02:00
tty.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
umount.cpp LibCore: Remove leading C from filenames 2020-02-06 15:04:03 +01:00
uname.cpp Userland: Use Core::ArgsParser for 'uname' 2020-08-06 20:41:13 +02:00
unzip.cpp AK: Rename KB, MB, GB to KiB, MiB, GiB 2020-08-16 16:33:28 +02:00
uptime.cpp uptime: Use pledge() 2020-02-18 13:29:54 +01:00
useradd.cpp LibCore: Remove leading C from filenames 2020-02-06 15:04:03 +01:00
userdel.cpp Everywhere: Replace some uses of fork/exec with posix_spawn 2020-06-29 12:04:27 +02:00
utmpupdate.cpp Userland: Add missing license headers to "w" and "utmpupdate" 2020-09-06 20:44:16 +02:00
w.cpp Userland: Add missing license headers to "w" and "utmpupdate" 2020-09-06 20:44:16 +02:00
watch.cpp Userland: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
wc.cpp Userland: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
which.cpp Userland: Use find_executable_in_path in which. 2020-09-16 19:39:17 +02:00
whoami.cpp whoami: Use pledge() and unveil() 2020-02-18 11:35:47 +01:00
xargs.cpp Userland: Add a basic xargs 2020-05-28 11:01:08 +02:00
yes.cpp Userland: Use Core::ArgsParser for 'yes' 2020-08-06 20:41:13 +02:00