Re: PPP port: Quick question about file_name_lookup function
On Fri, Nov 24, 2000 at 11:30:40AM -0600, Daniel E Baumann wrote:
> Hi, I am currently hacking around the routing stuff in PPP by just allowing
> you to do "add default HISADDR", which makes the peer at the other end the
> gateway and no other routing entries can be made or removed (at least not
> until there is sufficient support in libc0.2). I am attempting to use
> file_name_lookup and then fsys_set_options to do this. When I supply the node
> name is it safe to hard code "/servers/socket/2" as the node name? Can
> pfinet be set to a different node and operate properly? I just want to know
> if I should make this more flexible and not just assume the pfinet is set on
> this node? As far as I know it is always set on "/servers/socket/2", but if
> anyone has any info to dispute this please let me know otherwise I am going
> to do file_name_lookup on "/servers/socket/2". I think I may add a check to
> ensure that it is a tunnel interface also.
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);
Igor
Reply to: