[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: PPP port: Quick question about file_name_lookup function



On Fri, Nov 24, 2000 at 07:45:27PM -0500, Igor Khavkine wrote:
> If I remember correctly, 2 is there because the value of the PF_INET macro
> is 2. If you want more modularity you might watn to do something like
> this: sprintf(file_name, "/servers/socker/%d", PF_INET);

<hurd/paths.h> alse defines _SERVERS and _SERVERS_SOCKET, so:

#include <sys/socket.h>
#include <hurd/paths.h>

sprintf(file_name, _SERVERS_SOCKET "/" PF_INET);

And be careful with buffer overruns when using sprintf.

Marcus

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de



Reply to: