Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - where can I get the program for ppp ?: (3 Items)
   
where can I get the program for ppp ?  
Where can I get the script which are used for ppp?

For example, "/etc/ppp/ip-pre-up" or "/etc/ppp/ip-up", etc.

Thanks.
Wayne.
RE: where can I get the program for ppp ?  
I guess you are asking for sample ip-up? Actually it is simply a shell
script or a program that you should design by yourself to do what you expect
to do when the ip is up.

For example, you may have a ip-up script looks like,
#!/bin/ksh
echo "Hello world" > /tmp/mylog

So after your ppp link is established, you'll see a file /tmp/mylog has been
created with the content of a single line "Hello world". 

The ip-up script has five input arguments including tty, ip local, ip remote
etc which are useful for your network configuration. Check Help for details.
For example, the fifth argv is remote ip. So you may do your routing in your
script such as,
...
case $5 in
	1.2.3.4)
		/sbin/route add 1.2.3.0 default 1.2.3.4
		;;
...


Thanks.

Weijie


-----Original Message-----
From: Jongpil Won [mailto:skypiri@lge.com] 
Sent: May 28, 2008 9:33 AM
To: drivers-networking
Subject: where can I get the program for ppp ?

Where can I get the script which are used for ppp?

For example, "/etc/ppp/ip-pre-up" or "/etc/ppp/ip-up", etc.

Thanks.
Wayne.


_______________________________________________
Networking Drivers
http://community.qnx.com/sf/go/post8517
Re: RE: where can I get the program for ppp ?  
I have some debug message like below while I run pppd with iopkt.

Script /etc/ppp/ip-up started (pid 782379)
Child process /etc/ppp/ip-up (pid 782379) terminated with signal 8

But I have no error message with ionet eventhough I used same /etc/ppp/ip-up file.

Is there anybody who has any idea to solve the problem ?

This is the ip-up script I used.
#!/bin/bash
# This file should not be modified -- make local changes to
# /etc/ppp/ip-up.local instead

PATH=/sbin:/usr/sbin:/bin:/usr/bin
export PATH

LOGDEVICE=$6
REALDEVICE=$1

[ -f /etc/sysconfig/network-scripts/ifcfg-${LOGDEVICE} ] && /etc/sysconfig/network-scripts/ifup-post --realdevice ${REALDEVICE} ifcfg-${LOGDEVICE}

/etc/ppp/ip-up.ipv6to4 ${LOGDEVICE}

[ -x /etc/ppp/ip-up.local ] && /etc/ppp/ip-up.local "$@"

exit 0

Wayne.

> I guess you are asking for sample ip-up? Actually it is 
simply a shell
> script or a program that you should design by yourself to do what you expect
> to do when the ip is up.
> 
> For example, you may have a ip-up script looks like,
> #!/bin/ksh
> echo "Hello world" > /tmp/mylog
> 
> So after your ppp link is established, you'll see a file /tmp/mylog has been
> created with the content of a single line "Hello world". 
> 
> The ip-up script has five input arguments including tty, ip local, ip remote
> etc which are useful for your network configuration. Check Help for details.
> For example, the fifth argv is remote ip. So you may do your routing in your
> script such as,
> ...
> case $5 in
> 	1.2.3.4)
> 		/sbin/route add 1.2.3.0 default 1.2.3.4
> 		;;
> ...
> 
> 
> Thanks.
> 
> Weijie
> 
> 
> -----Original Message-----
> From: Jongpil Won [mailto:skypiri@lge.com] 
> Sent: May 28, 2008 9:33 AM
> To: drivers-networking
> Subject: where can I get the program for ppp ?
> 
> Where can I get the script which are used for ppp?
> 
> For example, "/etc/ppp/ip-pre-up" or "/etc/ppp/ip-up", etc.
> 
> Thanks.
> Wayne.
> 
> 
> _______________________________________________
> Networking Drivers
> http://community.qnx.com/sf/go/post8517