marprok
5fae567008
Userland: Basic statistics for ping
...
After ping is terminated, the min/avg/max time
as well as information about the number of successful
packets received are printed on the screen.
2020-11-10 12:06:04 +01:00
Andreas Kling
778011dac6
ping: Account for raw sockets now receiving IPv4 headers
2020-10-31 13:56:21 +01:00
Sergey Bugaev
852454746e
Everywhere: Port to String::copy_characters_to_buffer()
2020-08-30 17:35:27 +02:00
Ben Wiederhake
cb52bfdd27
Userland: Prefer strlcpy over strcpy in ping
...
This is supposed to serve as a reminder if and when someone decides to make
the 'msg' field configurable.
2020-08-24 00:45:03 +02:00
Ben Wiederhake
0248ddc427
Userland: Mark compilation-unit-only functions as static
...
This enables a nice warning in case a function becomes dead code.
2020-08-12 20:40:59 +02:00
Linus Groh
ca799fe4ab
Userland: Use Core::ArgsParser for 'ping'
2020-08-06 20:41:13 +02:00
Andreas Kling
94ca55cefd
Meta: Add license header to source files
...
As suggested by Joshua, this commit adds the 2-clause BSD license as a
comment block to the top of every source file.
For the first pass, I've just added myself for simplicity. I encourage
everyone to add themselves as copyright holders of any file they've
added or modified in some significant way. If I've added myself in
error somewhere, feel free to replace it with the appropriate copyright
holder instead.
Going forward, all new source files should include a license header.
2020-01-18 09:45:54 +01:00
Andreas Kling
409a4f7756
ping: Use pledge()
2020-01-11 20:48:43 +01:00
Andreas Kling
3f254bfbc8
Kernel+ping: Only allow superuser to create SOCK_RAW sockets
...
/bin/ping is now setuid-root, and will drop privileges immediately
after opening a raw socket.
2019-12-31 01:42:34 +01:00
Andreas Kling
2cbc3c6ee5
LibC+ping: Let's use the traditional timersub() et al prototypes
...
This also fixes the build, since ping.cpp already had a timersub().
2019-12-27 23:07:28 +01:00
Andreas Kling
b07bbf383d
Userland: Run clang-format on everything.
2019-06-07 11:49:31 +02:00
Andreas Kling
aef6030a80
LibC: Time-related POSIX compliance fixes.
2019-03-27 01:31:53 +01:00
Andreas Kling
4ea625e08b
Userland: Allow ping <hostname> :^)
2019-03-20 03:38:09 +01:00
Andreas Kling
4dddf949c8
IPv4: More work on UDP support.
...
I'm now able to connect to a simple UDP server on my host machine and
exchange some data. Very cool! :^)
2019-03-13 15:40:30 +01:00
Andreas Kling
19a51132f5
Kernel: recvfrom() should treat the address arguments as outparams.
2019-03-13 14:47:21 +01:00
Andreas Kling
562663df7c
Add support for socket send/receive timeouts.
...
Only the receive timeout is hooked up yet. You can change the timeout by
calling setsockopt(..., SOL_SOCKET, SO_RCVTIMEO, ...).
Use this mechanism to make /bin/ping report timeouts.
2019-03-13 13:15:05 +01:00
Andreas Kling
cf250e1245
More work on IPv4 sockets and /bin/ping.
...
It's now actually possible to ping other hosts on the network! :^)
I've switched the "run" script over to starting QEMU with user networking
since that works better for my testing needs right now.
2019-03-13 03:26:01 +01:00
Andreas Kling
a7d5e9781a
Kernel+LibC+Userland: Yet more networking bringup hacking.
...
All ICMP sockets now receive all ICMP packets. All this buffering is gonna
need some limits and such.
2019-03-12 17:27:07 +01:00
Andreas Kling
a017a77442
Kernel+LibC+Userland: Start working on an IPv4 socket backend.
...
The first userland networking program will be "ping" :^)
2019-03-12 15:51:42 +01:00