HN user

cihangir

21 karma
Posts0
Comments5
View on HN
No posts found.

Years ago, I attempted to build a user-space network stack in C [0] that processes raw packets through the TUN interface and got it working to a certain point. It currently includes a simple shell that allows configuring IP addresses, routes, and such. A hybrid structure reminiscent of both mbuf and sk_buf is used to hold the network packets. However, after completing the UDP implementation I didn't find the time or motivation to implement TCP. If you want to check it out, here's the link:

[0] https://github.com/cakturk/unet

OOP in C 4 years ago

Last time I checked, C++ used function pointers behind the scenes to achieve virtual method dispatch.

That is a special page of memory that is mapped read-only into user mode from kernel mode, and it contains things like the current time, so that applications can get this information quickly without having to take a kernel transition. This page is at a fixed location for performance reasons.

I didn't know there was a vdso-like mechanism in Windows as in Linux.