Does "watchRegistrationPID" work?

Patrick patrick.hld at gmail.com
Mon Jul 21 19:12:14 CEST 2008


Hello All,
I've read the config file under /etc/slp.conf.
Inside it, there is a section
;net.slp.watchRegistrationPID = false

I think this is about the openslp watching on the services (or process, i.e. sshd, ftpd) in SA.
And if the running services is down, or the pid disappears, SA will know that, and automatically dereg that service out from itself.
Am I right?

If I'm right. I've traced into the code at ./libslp/Libslp_reg.c in line 255.

******************************************************************************
    if(SLPPropertyAsBoolean(SLPGetProperty("net.slp.watchRegistrationPID")))
    {
        extoffset = curpos - buf;
        ToUINT16(curpos,SLP_EXTENSION_ID_REG_PID);
        curpos += 2;
        ToUINT24(curpos,0);
        curpos += 3;
        ToUINT32(curpos,SLPPidGet());
        curpos += 4;
    }
******************************************************************************
It seems that slpd will get the pid of something.
Normally, it's its own pid, if I didn't miss something.
I also added an printf after it, like this,
printf("pid is : %d\n",*curpos);
But the output is alway 0.

I did the same thing before there a little bit, and I can get the service name.
But the pid is alway 0.

The problem is, 
1. Does the OpenSLP implement the PID watching? The SLPPidGet seems only get pid of slpd.......
2. When the service process disappears, if OpenSLP can know that?
3. Do I need to notice OpenSLP the pid of a specific service? How to do....... Or only the name is enough.

Thanks a lot for any response!

Best
Patrick & Sha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20080721/c82799f4/attachment.html>


More information about the Freeradius-Devel mailing list