mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +00:00

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.
16 lines
237 B
C
16 lines
237 B
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <sys/cdefs.h>
|
|
|
|
__BEGIN_DECLS
|
|
|
|
typedef uint32_t in_addr_t;
|
|
in_addr_t inet_addr(const char*);
|
|
|
|
#define INADDR_ANY ((in_addr_t)0)
|
|
#define INADDR_NONE ((in_addr_t)-1)
|
|
|
|
#define IP_TTL 2
|
|
|
|
__END_DECLS
|