自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

usrPPPInit()函數(shù)應(yīng)用(中英對(duì)照)

網(wǎng)絡(luò) 網(wǎng)絡(luò)管理
下面我們來(lái)對(duì)usrPPPInit()的內(nèi)容進(jìn)行一下介紹。在這里面,我們主要參考了一些資料,進(jìn)行了翻譯。還望對(duì)大家有用。

在這里我們主要介紹一下usrPPPInit()的語(yǔ)法應(yīng)用。這里我們就針對(duì)這方面知識(shí)進(jìn)行一下總結(jié)。這里我們搜集了一些參考資料進(jìn)行一下中英文對(duì)照。希望對(duì)大家有所幫助。下面看看具體內(nèi)容吧。

Using PPP 使用PPP

After it is configured and initialized, PPP attaches itself into the VxWorks TCP/IP stack at the driver (link) layer. After a PPP link has been established with the remote peer, all normal VxWorks IP networking facilities are available; the PPP connection is transparent to the user.

經(jīng)過(guò)配置和初始化后,PPP就將自己綁定在VxWorks TCP/IP棧的驅(qū)動(dòng)層中了。(VxWorks目標(biāo)機(jī))和遠(yuǎn)程主機(jī)建立PPP連接之后,所有的VxWorks IP網(wǎng)絡(luò)功能都是可用的,PPP連接對(duì)用戶是透明的。

Initializing a PPP Link 初始化一條PPP連接

A PPP link is initialized by calls to either usrPPPInit( ) or pppInit( ). When either of these routines is invoked, the remote peer should be initialized. When a peer is running in passive mode, it must be initialized first (see PPP Options.)

The usrPPPInit( )routine is in config/all/bootConfig.c and src/config/usrNetwork.c. There are four ways it can be called:

If the boot device is set to ppp, usrPPPInit( ) is called as follows:

可以使用usrPPPInit()或pppInit()初始化一條PPP連接。當(dāng)調(diào)用兩個(gè)之中的任一個(gè)函數(shù)時(shí),遠(yuǎn)程主機(jī)應(yīng)該進(jìn)行初始化。處于被動(dòng)方的節(jié)點(diǎn),應(yīng)該先進(jìn)行初始化(參考PPP 選項(xiàng))。

usrPPPInit()函數(shù)在config/all/bootConfig.c和src/config/usrNetwork.c中,有四種方式調(diào)用它:

如果啟動(dòng)設(shè)備設(shè)置了ppp,usrPPPInit()如下調(diào)用:

From( )bootConfig.c when booting from boot ROMs. 從ROM啟動(dòng)時(shí)在bootConfig.c里調(diào)用。

From usrNetwork.c when booting from VxWorks boot code. 從VxWorks啟動(dòng)代碼啟動(dòng)時(shí)在usrNetWorks.c里調(diào)用。

The PPP interface can also be initialized by calling usrPPPInit( ): 也可以以下面的方式調(diào)用usrPPPInit( ):

From the VxWorks shell. 從VxWorks shell里調(diào)用。

By user application code. 從用戶應(yīng)用程序代碼里調(diào)用。

Use either syntax when calling usrPPPInit( ): 可以使用下面兩種語(yǔ)法調(diào)用usrPPPInit():

usrPPPInit ("bootDevice", unitNum, "localIPAddress", "remoteIPAddress")

usrPPPInit ("bootDevice", unitNum, "localHostName", "remoteHostName")

You can use host names in usrPPPInit( ) provided the hosts have been previously added to the host database. For example, you can call usrPPPInit( ) in the following way:

你可以在usrPPPInit()中使用機(jī)器名(之前添加到主機(jī)數(shù)據(jù)庫(kù)里的),例如,你可以用以下的方式調(diào)用:

usrPPPInit ("ppp=/tyCo/1,38400", 1, "147.11.90.1", "147.11.90.199")

The usrPPPInit( ) routine calls pppInit( ), which initializes PPP with the configuration options that were specified at compile-time (see Selecting PPP Options By Configuring VxWorks). The pppInit( ) routine can be called multiple times to initialize multiple channels.2 The connection timeout is specified by PPP_CONNECT_DELAY. The return value of this routine indicates whether the link has been successfully established--if the return value is OK, the network connection should be fully operational.

usrPPPInit()函數(shù)調(diào)用pppInit(), 它使用編譯的時(shí)候配置好的選項(xiàng)初始化PPP(Selecting PPP Options By Configuring VxWorks)。pppInit()函數(shù)可以多次調(diào)用以初始化多個(gè)連接,可以用PPP_CONNECT_DELAY來(lái)指定連接time out的時(shí)間。如果連接建立成功,就返回OK,所有網(wǎng)絡(luò)的功能就都可以使用了。

The pppInit( ) routine is the standard entry point for initializing a PPP link. All available PPP options can be set using parameters specified for this routine (see Selecting PPP Options Using an Options Structure). Unlike usrPPPInit( ), the return value of pppInit( ) does not indicate the status of the PPP link; it merely reports whether the link could be initialized. To check whether the link is actually established, call pppInfoGet( ) and make sure that the state of IPCP is OPENED. The following code fragment demonstrates use of this mechanism for PPP unit 2:

pppInit()是標(biāo)準(zhǔn)的PPP初始化函數(shù)。所有可用的PPP選項(xiàng)都可以通過(guò)參數(shù)傳遞給pppInit()(see Selecting PPP Options Using an Options Structure)。不像usrPPPInit(), pppInit()的返回值不指示連接的狀態(tài),它僅僅報(bào)告連接是否進(jìn)行了初始化。要檢查是否真正建立了連接,調(diào)用函數(shù)pppInfoGet()(之前先確保IPCP的狀態(tài)是OPENED)。下面的代碼段演示了這個(gè)機(jī)制:

PPP_INFO     pppInfo;

if ((pppInfoGet (2, &pppInfo) == OK) &&

(pppInfo.ipcp_fsm.state == OPENED))

return (OK);                            /* link established */

else

return (ERROR);                         /* link down */
 

責(zé)任編輯:佟健 來(lái)源: hi.baidu.com
相關(guān)推薦

2010-09-17 14:07:07

SIP中繼

2009-08-02 08:50:01

2011-04-22 14:11:38

傳真機(jī)

2011-06-02 09:47:23

傳真機(jī)技巧

2011-09-02 17:30:32

英語(yǔ)iKnowAndroid應(yīng)用

2009-07-22 07:42:00

Scala偏應(yīng)用函數(shù)

2010-11-29 10:53:14

Sybase日期函數(shù)

2009-12-02 16:40:48

路由器怎么安裝

2013-04-16 10:24:33

函數(shù)偏函數(shù)編程語(yǔ)言

2009-07-17 10:42:06

Swing應(yīng)用程序處理函數(shù)

2010-02-02 10:07:59

C++全局函數(shù)

2010-07-26 14:06:43

Perl substr

2009-12-08 09:51:10

PHP intval函

2024-03-12 10:36:06

函數(shù)指針代碼

2010-06-18 10:33:03

Linux Acces

2011-03-30 11:01:13

C語(yǔ)言隨機(jī)

2009-12-11 10:59:48

PHP函數(shù)extrac

2010-06-10 17:47:48

Zabbix中文

2010-06-07 12:56:58

Zabbix中文

2014-12-24 10:27:55

HypericHQ開(kāi)源監(jiān)控工具
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)