1、在linux系统中编译ppp
1)下载ppp-2.4.4.tar.gz,针对嵌入式linux平台
2)把ppp的源码解开
# tar zxvf ppp-2.4.4.tar.gz
3)进入ppp-2.4.4目录
# cd ppp-2.4.4
#./configure
3) make -f CC=arm-linux-gcc 即可编译出pppd chat等
4) 同样进入ppp-2.4.4/chat和ppp-2.4.4/pppd目录,并拷贝pppd、chat文件到客户端文件系统/usr/sbin目录下
2、在客户端运行pppd
# pppd
pppd: can't resolve symbol '__ctype_b_loc'
__ctype_b_loc这个symbol到底是什么东西?
原来,代码有问题,把所有ppp-2.4.4/pppd目录下的源代码里面的#include <ctype.h>注释掉,重新编译,出来的pppd就可以完美运行了,chat源代码也按照pppd的方法如法炮制。
# pppd --help
pppd version 2.4.4
Usage: pppd [ options ], where options are:
<device> Communicate over the named device
<speed> Set the baud rate to <speed>
<loc>:<rem> Set the local and/or remote interface IP
addresses. Either one may be omitted.
asyncmap <n> Set the desired async map to hex <n>
auth Require authentication from peer
connect <p> Invoke shell command <p> to set up the serial line
crtscts Use hardware RTS/CTS flow control
defaultroute Add default route through interface
file <f> Take options from file <f>
modem Use modem control lines
mru <n> Set MRU value to <n> for negotiation
See pppd(8) for more options