I am running into some C code that is using the getservbyname_r() function.
I found this overview of it:
http://publib.boulder.ibm.com/iseries/v5r2/ic2928/index.htm?info/apis/tsgservn.htm
but I am not sure what the ‘service database file’ is or how it is populated.
I am running on Red Hat EL 6. (I’m also not sure if this question should be on SuperUser)
In the traditional flat-file world it’s
/etc/servicesor/etc/inet/services; typically it’s part of the base system install. It’s also possible for entries to be read from NIS, LDAP etc., depending on the system’s naming services configuration (/etc/nsswitch.conf).