Only tag/untag AF_INET and AF_INET6 sockets.

Socket tagging only actually works for real network sockets, so skip
tagging all other socket families like AF_LOCAL.

For calls like accept() and close() that don't readily have family
information, use the Linux-specific SO_DOMAIN option to pull it from
the kernel.  Define both SO_DOMAIN and SO_PROTOCOL for anyone to use
in the future.

Test: builds, boots, only tags internet sockets
Bug: 30414041
Change-Id: I17fc935a7bef2c8f4a1f44eb2cf907b41283afde
3 files changed