Skip to content
Advertisement

What is the integer value of AF_UNIX?

So, I’m trying to write some JNA code to work with Unix sockets, and I’m trying to reference AF_UNIX for sockets. I looked through some of the gcc included files, but I couldn’t find anything.

Advertisement

Answer

On my Ubuntu-machine it is defined in /usr/include/x86_64-linux-gnu/bits/socket.h as 1. I haven’t checked around in other Unix source trees, but I have a feeling that it is probably defined as 1 in most other Unix dialects.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement