ravi varma
|
Re: Identify ppp processses running on machine
|
ravi varma
11/17/2008 8:54 AM
post16646
|
Re: Identify ppp processses running on machine
Hi Jeevan
It works fine ... it lists all ppp interfaces, i also serached and tried getting simialr information through ifaddrs ..
which is a linked list that maintians all netwrok interface related stuff. The command given by you is lisitng
pidin -p pppd fd
pid name
618531 usr/sbin/pppd
0 139279 rw 0 /dev/ser1
1 106512
2 106512 rw 0 I4UDP *.* *.*
3 106512 rw 0 I4UDP *.* *.*
4 8200 rw 10940 /var/run/pppd.tdb
5 106512 rw 0 I4UDP *.* *.*
0s 1
i am bit confused on interpreting " 0 139279 rw 0 /dev/ser1" - can you help me in this.
Now if we want to activate or deactivate the ppp interface
- one way is to store informtion of pidin -p pppd fd into one file, filter pid number, and use...... system("kill pid").
- what i am looking at is something like system("ppp0 SIGTERM") which should terminate ppp0 interface, instead of
reading from file - is this possible.
Thnaks
Ravi
> > Hi
> >
> > The system for which i am working needs multiple ppp interfaces for
> respective
> > serial port, and to control (activate /deactivate PPP links) depending on
> > command received by system.
> >
> > I am activating each link throguh program by
> >
> > system("pppd/dev/ser1 proxyarp 115200 192.168.0.40:192.168.0.50");
> > sleep(2);
> > system("pppd/dev/ser2 proxyarp 115200 192.168.0.40:192.168.0.50");
> >
> > through which i am able to activate two ppp links.
> >
> > what should i do to deactivate any single interface among ppp0, ppp1....i
> had
> > seen that ppp interface(pid) information will be there in /var/run/pppn.pid
>
> > but my target doesnt have full fleged file system, it doesnt have /var ...
> so
> > through what command i can know the existance of ppp interface and
> deactiavte(
> > terminate/kill) the interface.
> >
> > Thanks
> > Ravi
>
>
> Hmm does
>
> #pidin -p pppd fd
>
> provide You with enough infos ?
>
> Jeevan
|
|
|