Tag Archives: netstat

Linux kernel hacking – support SO_PEERCRED for local TCP socket connections

In my old post (https://davejingtian.org/2015/02/17/retrieve-pid-from-the-packet-in-unix-domain-socket-a-complete-use-case-for-recvmsgsendmsg/), we talked about how to retrieve the peer PID from Unix domain socket using struct ucred. A more smart way to do this is using getsockopt() syscall with option SO_PEERCRED directly. As you expected (or … Continue reading

Posted in Linux Distro, Network, OS | Tagged , , , , , , , , , , , , , , , , , | 6 Comments

bind() error 0x63 – Cannot assign requested address

Recently encountered a bind() error 0x63 – cannot assign requested address. After some effort on debugging, I list 2 possibilities here for reference when handling such this error code from bind(). ¬†Generally, if it is related with bad socket close/cleanup, … Continue reading

Posted in Programming | Tagged , , , | Leave a comment