2 ms·
It's fascinating watching someone write code for macOS while only referring to Linux and FreeBSD man pages. On macOS, 'man ip' gives all the necessary info abo
by donaldihunter 2y ago
It's fascinating watching someone write code for macOS while only referring to Linux and FreeBSD man pages.
On macOS, 'man ip' gives all the necessary info about raw sockets and IP_HDRINCL:
> Outgoing packets automatically have an IP header prepended to them (based on the destination address and the protocol number the socket is created with), unless the IP_HDRINCL option has been set.
> Unlike previous BSD releases, the program must set all the fields of the IP header
> Note that the ip_off and ip_len fields are in host byte order.
- chrsig 2y agoIn a lot of cases, the macos man pages leave a lot to be desired, or don't come up in a google search. I know I'm personally not in the habit of remembering apropros exists, so I can imagine that the first step to manpage discovery being a google search. And most of the time the docs are interchangable enough. Until they're not. At the raw socket layer, I'd still expect the macos docs to be consulted _eventually_.