mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:37:35 +00:00
IPv4: Support overriding the default TTL (64)
Made getsockopt() and setsockopt() virtual so we can handle them in the various Socket subclasses. The subclasses map kinda nicely to "levels". This will allow us to implement things like "traceroute", although.. I spent some time trying to do that, but then hit a wall when it turned out that the user-mode networking in QEMU doesn't preserve TTL in the ICMP packets passing through.
This commit is contained in:
parent
482d5295f1
commit
8cfb859368
11 changed files with 58 additions and 10 deletions
|
@ -34,7 +34,7 @@ public:
|
|||
void set_ipv4_gateway(const IPv4Address&);
|
||||
|
||||
void send(const MACAddress&, const ARPPacket&);
|
||||
void send_ipv4(const MACAddress&, const IPv4Address&, IPv4Protocol, const u8* payload, size_t payload_size);
|
||||
void send_ipv4(const MACAddress&, const IPv4Address&, IPv4Protocol, const u8* payload, size_t payload_size, u8 ttl);
|
||||
|
||||
Optional<KBuffer> dequeue_packet();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue