PPP移植

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值