Linux Raw Sockets
schoenitzer.de
schoenitzer.de
I recently had do support for a Digidesign Pro Control (https://medias.audiofanzine.com/images/normal/digidesign-pro...) that used it's own ethernet protocol. Libtins made it very easy and I didn't need to write my own driver or anything like that.
Would you know something lighter to play with RAW sockets?
https://www.tcpdump.org/pcap.html
It abstracts all the hard work, gives you a handle that you can poll on, and then handles giving you a stream of packets to process.
(emphasis mine)
AFAIK, on many systems (think FreeBSD) this is not true:
https://www.unix.com/man-page/FreeBSD/4/inet6/
> By default, FreeBSD does not route IPv4 traffic to AF_INET6 sockets. The default behavior intentionally violates RFC2553 for security reasons. Listen to two sockets if you want to accept both IPv4 and IPv6 traffic. IPv4 traffic may be routed with certain per-socket/per-node configuration, however, it is not recommended to do so. Consult ip6(4) for details.
>However, RFC2553 does not define the ordering constraint between calls to
bind(2), nor how IPv4 TCP/UDP port numbers and IPv6 TCP/UDP port numbers
relate to each other (should they be integrated or separated). Imple-
mented behavior is very different from kernel to kernel. Therefore, it
is unwise to rely too much upon the behavior of AF_INET6 wildcard bind
sockets. It is recommended to listen to two sockets, one for AF_INET and
another for AF_INET6, when you would like to accept both IPv4 and IPv6
traffic.
>It should also be noted that malicious parties can take advantage of the
complexity presented above, and are able to bypass access control, if the
target node routes IPv4 traffic to AF_INET6 socket. Users are advised to
take care handling connections from IPv4 mapped address to AF_INET6 sock-
ets."This is the lowest we can get: this way ethernet frames are passed from the device driver without any changes to your application, including the full level 2 header. Likewise, when writing to the socket the user-supplied buffer hast to contain all the headers of layer 2 to 4. This is the deepest we can go in userspace – at this point we have full control of the complete ethernet frame. I hope you enjoyed our journey into the rabbit hole."
So, presumably, I'd prefer this to UDP in a situation where I need the complete ethernet frame. But when would that be? It would have been great if the mentioned a few scenarios where this is useful.
Personally I think the actual messaging protocols are usually relatively straightforward (all things considered) with sensible backwards compatibility. It's all the other stuff surrounding it that can get really complicated and break things.
At this point, there should be a bot running that archives any post that starts getting traction. Or maybe have a HN serve a cached copy to offload the traffic? Who knows, it just seems like every blog post is killed the instant it reaches the front page.
I've suggested this before; the usual problem people bring up in response is that it deprives these websites (which run on advertising) of their ad impressions.
Not honestly sure what percentage of Hacker News users are browsing without an ad-blocker, though...
(site seems back up now)
The site makes use of and respects cache headers, too. (And, I'll add, only makes 1¹ request aside from the main HTML, for some CSS; the site is refreshingly minimal, yet still looks nice.)
¹it also makes a request for MathJax, but that gets blocked b/c it's made over HTTP, and the site is HTTPS.
Also updating DNS entries is to slow to do it whenever you walk with your smartphone from one cell/wifi to another.
I'm not the author of the article.
Not an expert in anything about web publishing or similar stuff, so forgive if I used the wrong terms.
Your inline code parts still meet the double A level of the accessibility standard for contrast.
http://leaverou.github.io/contrast-ratio/#rgb%2882%2C89%2C93...
I think there's probably too many security issues like ARP poisoning.