cosmopolitan/libc/sysv/consts/inaddr.h
Justine Tunney ae5d06dc53 Unbloat build config
- 10.5% reduction of o//depend dependency graph
- 8.8% reduction in latency of make command
- Fix issue with temporary file cleanup

There's a new -w option in compile.com that turns off the recent
Landlock output path workaround for "good commands" which do not
unlink() the output file like GNU tooling does.

Our new GNU Make unveil sandboxing appears to have zero overhead
in the grand scheme of things. Full builds are pretty fast since
the only thing that's actually slowed us down is probably libcxx

    make -j16 MODE=rel
    RL: took 85,732,063µs wall time
    RL: ballooned to 323,612kb in size
    RL: needed 828,560,521µs cpu (11% kernel)
    RL: caused 39,080,670 page faults (99% memcpy)
    RL: 350,073 context switches (72% consensual)
    RL: performed 0 reads and 11,494,960 write i/o operations

pledge() and unveil() no longer consider ENOSYS to be an error.
These functions have also been added to Python's cosmo module.

This change also removes some WIN32 APIs and System Five magnums
which we're not using and it's doubtful anyone else would be too
2022-08-10 04:43:09 -07:00

24 lines
888 B
C

#ifndef COSMOPOLITAN_LIBC_SYSV_CONSTS_INADDR_H_
#define COSMOPOLITAN_LIBC_SYSV_CONSTS_INADDR_H_
/**
* @fileoverview Well-known Internet addresses.
* These need to be hard-coded as little-endian, so htonl() is needed.
*/
#define INADDR_ANY 0x00000000u /* 0.0.0.0 */
#define INADDR_BROADCAST 0xFFFFFFFFu /* 255.255.255.255 */
#define INADDR_NONE 0xFFFFFFFFu /* 255.255.255.255 */
#define INADDR_LOOPBACK 0x7F000001u /* 127.0.0.1 */
#define INADDR_TESTNET1 0xC0000200u /* 192.0.2.0/24 (RFC5737§3) */
#define INADDR_TESTNET2 0xC6336400u /* 198.51.100.0/24 */
#define INADDR_TESTNET3 0xCB007100u /* 203.0.113.0/24 */
#define INADDR_ALLHOSTS_GROUP 0xE0000001u
#define INADDR_ALLRTRS_GROUP 0xE0000002u
#define INADDR_MAX_LOCAL_GROUP 0xE00000FFu
#define INADDR_UNSPEC_GROUP 0xE0000000u
#define IN_LOOPBACKNET 127
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_INADDR_H_ */