Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - PPP instance number corresponding to a serial port: (6 Items)
   
PPP instance number corresponding to a serial port  
How can I get the ppp instance number (e.g. "ppp0) that is linked to a specific serial port (e.g. /dev/ser1)? I am 
looking for the data structure that stores this particular information.
Re: PPP instance number corresponding to a serial port  
My intention is to get the network traffic information(viz. no of bytes and packets that are sent/received) on a 
particular serial port over which ppp communication is happening. However, there are multiple serial ports (ser1, ser2, 
ser3 etc) each associated with a specific ppp instance(ppp0, ppp1, ppp2 etc). If I have the information about which ppp 
instance is running on which serial port (eg ppp0 on ser3, ppp1 on ser1 etc) then I can use the ppp instance name (eg 
ppp0) associated with a particular serial port (eg ser3) to get the traffic information on that serial port.
RE: PPP instance number corresponding to a serial port  
Once pppd brought up an interface, /etc/ppp/ip-up will be spawn()'d with
these paramaters:

	interface-name tty-name speed local-ip remote-ip ipparm

So you can prepare your own /etc/ppp/ip-up shell script/executable, got
your 
"interface-name"/"tty-name" pair, and then store them somewhere for
future use.

When pppd goes down, /etc/ppp/ip-down will be spawn()'d with same
paramaters.

-xtang

> -----Original Message-----
> From: Goutam Ullas [mailto:community-noreply@qnx.com] 
> Sent: Tuesday, January 20, 2009 9:44 AM
> To: drivers-networking
> Subject: Re: PPP instance number corresponding to a serial port
> 
> My intention is to get the network traffic information(viz. 
> no of bytes and packets that are sent/received) on a 
> particular serial port over which ppp communication is 
> happening. However, there are multiple serial ports (ser1, 
> ser2, ser3 etc) each associated with a specific ppp 
> instance(ppp0, ppp1, ppp2 etc). If I have the information 
> about which ppp instance is running on which serial port (eg 
> ppp0 on ser3, ppp1 on ser1 etc) then I can use the ppp 
> instance name (eg ppp0) associated with a particular serial 
> port (eg ser3) to get the traffic information on that serial port.
> 
> _______________________________________________
> Networking Drivers
> http://community.qnx.com/sf/go/post20380
> 
> 
Re: RE: PPP instance number corresponding to a serial port  
Thanks xtang.

I am not allowed to change the code..that is, I can not add my own /etc/ppp/ip-up script. 
Is there any other way I can do the same thing without changing the original code??

thanks so much.

-Goutam
Re: RE: PPP instance number corresponding to a serial port  
Hi Xtang 

We are also facing this issue, our target file systems doesnt have /etc folder at all, and more over i had host QNX 6.4 
on VMware, even in that machine i didnt see /etc/ppp folder exisitng, 

1. what should i do to get that folder ?
2. Is there any other approcah where in i cand info about a particualr ppp instance is linked with particular serail 
port.

 
Thanks
Ravi 
RE: RE: PPP instance number corresponding to a serial port  
You need to create that directory, and create your own scripts.

Make sure you give your scripts execution permits (chmod a+x), as well
as the first line
of you script should be "#!/bin/sh"

I don't know any other user approach.

Thanks,

-xtang 

> -----Original Message-----
> From: ravi varma [mailto:community-noreply@qnx.com] 
> Sent: Tuesday, February 10, 2009 5:24 AM
> To: drivers-networking
> Subject: Re: RE: PPP instance number corresponding to a serial port
> 
> Hi Xtang 
> 
> We are also facing this issue, our target file systems doesnt 
> have /etc folder at all, and more over i had host QNX 6.4 on 
> VMware, even in that machine i didnt see /etc/ppp folder exisitng, 
> 
> 1. what should i do to get that folder ?
> 2. Is there any other approcah where in i cand info about a 
> particualr ppp instance is linked with particular serail port.
> 
>  
> Thanks
> Ravi 
> 
> 
> _______________________________________________
> Networking Drivers
> http://community.qnx.com/sf/go/post21862
> 
>