Commit Graph

13 Commits

Author SHA1 Message Date
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