成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

全析PPP Options選項設置

網絡 網絡管理
下面我們來對PPP Options的具體設置內容進行一下分析和講解。那么通過我們的翻譯和介紹,希望大家能夠對此有所了解。

對于一個網絡協議來說,我們不僅僅要了解它的定義和概念,更要清楚它的設置與應用。那么今天我們就主要講解一下關于PPP Options 的相關內容,來幫助大家了解一下具體的選項配置。

Selecting PPP Options Using an Options Structure

PPP options may be set at run-time by filling in a PPP options structure and passing the structure location to the ppp Init( ) routine. This routine is the standard entry point for initializing a PPP link (see Initializing a PPP Link).

The PPP options structure is typedefed to PPP_OPTIONS, and its definition is located in h/netinet/ppp/options.h, which is included through h/pppLib.h.

PPP選項可以在運行的時候設置,設置PPP選項結構體并將這個結構體傳給pppInit()函數。這個函數是初始化PPP連接的標準入口點(請參考初始化PPP連接)。

The first field of the structure is an integer, flags, which is a bit field that holds the ORed value of the OPT_option macros displayed in column 2 of Table 3-3. Definitions for OPT_option are located in h/netinet/ppp/options.h. The remaining structure fields in column 2 are character pointers to the various PPP options specified by a string.

選項結構體的***個域是整型數,一個標志位,是幾個 OPT_xxx或運算之后的值,所有的OPT_xxx可以在Table 3-3中找到。OPT_xxx的定義在h/netinet/ppp/options.h中。。。。(不知所云)

The following code fragment is one way to set configuration options using the PPP options structure. It initializes a PPP interface that uses the target's second serial port (/tyCo/1). The local IP address is 90.0.0.1; the IP address of the remote peer is 90.0.0.10. The baud rate is the default rate for the tty device. The VJ compression and authentication options have been disabled, and LCP (Link Control Protocol) echo requests have been enabled.

下面的代碼段說明了使用PPP選項結構體配置連接的一種方式。用目標機的第二個串口(/tyCo/1)初始化一個PPP連接,本地IP是90.90.0.1,遠程機器的IP是90.90.0.10,波特率是tty設備缺省的速率。VJ壓縮和認證選項是禁用的,鏈路控制協議的echo請求是啟用的。

  1. PPP_OPTIONS pppOpt;     /* PPP configuration options */   
  2.    
  3. void routine ()   
  4.     {   
  5.     pppOpt.flags = OPT_PASSIVE_MODE | OPT_NO_PAP | OPT_NO_CHAP |   
  6.                     OPT_NO_VJ;   
  7.     pppOpt.lcp_echo_interval = "30";   
  8.     pppOpt.lcp_echo_failure = "10";   
  9.    
  10.     pppInit (0, "/tyCo/1", "90.0.0.1", "90.0.0.10", 0, &pppOpt, NULL);   
  11.     } 

Setting PPP Options Using an Options File

PPP options are most conveniently set using an options file. There is one restriction: the options file must be readable by the target without there being an active PPP link. Therefore the target must either have a local disk or RAM disk or an additional network connection. For more information about using file systems, see VxWorks Programmer's Guide: Local File Systems.

使用選項文件設置PPP選項是最方便的。有一個限制:選項文件必須在沒有PPP連接的時候也能夠訪問的到。因此目標機必須有一個本地磁盤、RAM或者另外一條網絡連接。關于使用文件系統的更多信息,請參考VxWorks程序員指南:本地文件系統。

This configuration method can be used with either usrPPPInit( ) or pppInit( ). It also can be used to modify the selection of PPP options previously configured using configuration constants in config.h or the option structure PPP_OPTION.

When using usrPPPInit( ) to initialize PPP, define the configuration constant PPP_OPTIONS_FILE to be the absolute path name of the options file (NULL by default). When using pppInit( ), pass in a character string that specifies the absolute path name of the options file.

可以使用usrPPPInit()或pppInit()來設置選項文件。它也可以用來修改之前通過config.h或者PPP_OPTION配置好的選項。

當你使用usrPPPInit()初始化一條連接的時候,要定義PPP_OPTIONS_FILE為選項文件的絕對路徑(缺省的是NULL)。使用pppInit()初始化的時候,要傳入一個參數指定選項文件的絕對路徑。

The options file format is one option per line; comment lines begin with #. For a description of option syntax, see the manual entry for pppInit( ).

The following code fragment generates the same results as the code example in Selecting PPP Options Using an Options Structure. The difference is that the configuration options are obtained from a file rather than a structure.

選項文件的格式是,一個選項占據一行; 注釋的部分以#開頭。具體的細節,請參考手冊中的pppInit()。

下面的代碼段的作用和Selecting PPP Options Using an Options Structure中的例子的效果是一樣的。不同的地方是,這里從一個文件獲取配置選項。

  1. pppFile = "mars:/tmp/ppp_options"; /* PPP config. options file */   
  2.    
  3. void routine ()   
  4.     {   
  5.     pppInit (0, "/tyCo/1", "90.0.0.1", "90.0.0.10", 0, NULL, pppFile);   
  6.     }  
  7. In this example, mars:/tmp/ppp_options is a file that contains the following: 

在這里例子里,mars:/tmp/ppp_options包含以下內容:
 

  1. passive   
  2. no_pap   
  3. no_chap   
  4. no_vj   
  5. lcp_echo_interval 30   
  6. lcp_echo_failure 10 

 

責任編輯:佟健 來源: hi.baidu.com
相關推薦

2010-07-21 16:08:57

telnet命令

2010-09-06 10:47:00

PPP配置

2010-09-09 17:27:43

PPP Multili

2010-09-09 17:31:15

ppp authent

2010-09-29 14:04:25

RHCE DHCP配置

2010-09-16 12:02:44

vpdn pppoe配

2010-09-03 10:23:49

PPP Multili

2010-09-06 13:41:43

PPPPPTP

2010-09-06 14:07:07

PPP Multili

2010-09-03 09:43:37

Linux內核PPP

2010-09-06 11:07:07

pppdppp

2010-02-22 11:02:55

Python功能

2009-09-24 12:50:23

Hibernate F

2010-09-09 17:21:16

2010-09-28 09:20:28

Linux PPP設置

2009-11-10 12:43:45

2011-02-22 15:16:58

2011-02-22 15:07:03

VSFTPD

2010-02-04 13:43:20

Android操作系統

2010-03-01 13:19:21

Python線程內容
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 99欧美精品 | sese视频在线观看 | 亚洲欧美日韩中文在线 | 国产精品区一区二区三区 | 亚洲伊人久久综合 | 亚洲成人第一页 | 五月综合激情婷婷 | 在线观看视频91 | 久久久性 | 精品一区二区三区入口 | 亚洲成人播放器 | 亚洲精品乱码久久久久久按摩观 | 宅女噜噜66国产精品观看免费 | www.日本在线播放 | 国产黄色大片网站 | 2022精品国偷自产免费观看 | 日本a级大片 | 日韩精品一区二区三区高清免费 | 福利国产 | 亚洲精品一区二区三区 | 成人av免费 | 久久一区二区三区四区 | 一区二区三区观看视频 | 久99久视频 | 一区二区在线 | 一区二区三区中文字幕 | 99久久电影 | 国产成人精品一区二 | 久久精品一| 四虎影院免费在线播放 | 国产99久久久国产精品 | 久久久久久久久久久久久久av | 亚洲综合国产精品 | 亚洲精品国产一区 | 天堂视频中文在线 | 黄色男女网站 | 精品1区2区| 亚洲a视频 | 91精品国产91久久久久久吃药 | 天天干视频 | 欧美亚洲国产精品 |