亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ppplib.c

?? vxworks下的實現(xiàn)網(wǎng)絡TCPIP協(xié)議的原代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
/* pppLib.c - Point-to-Point Protocol library *//* Copyright 1995 Wind River Systems, Inc. */#include "copyright_wrs.h"/* * Copyright (c) 1989 Carnegie Mellon University. * All rights reserved. * * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, * advertising materials, and other materials related to such * distribution and use acknowledge that the software was developed * by Carnegie Mellon University.  The name of the * University may not be used to endorse or promote products derived * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. *//*modification history--------------------01v,17feb99,sgv  Fix for spr 24560, proper cleanup when ppp options file 		 cannot be accessed01u,31aug98,fle  doc : got rid of simple quotes to avoid bold troubles01t,15aug97,sgv  fixed spr #9109. In cleanup routine, ppp_if[unit] 		 is checked for NULL memory address before freeing it01s,10dec96,vin  fixed problem with die(..) if OPT_SILENT or OPT_PASSIVE		 is specified. Made changes to term(..) so that pppDelete()		 would work even if silent or passive options are specified.		 fixed SPR 7604.01r,15nov96,vin  fixed problem with OPT_DRIVER_DEBUG, establish_ppp() 		 should be called after the options are set. The only		 dependency is that pppopen() should be called before		 establish_ppp().01q,19dec95,vin  doc tweaks.01p,30nov95,vin  added hooks on a unit basis.01o,11jul95,dzb  doc tweaks.01n,22jun95,dzb  changed [un]timeout() to ppp_[un]timeout().                 removed usehostname option.  Enhanced doc.01m,12jun95,dzb  added MIBII counter for unknown protocol packets.                 changed [dis]connect strings to global hook routines.                 header file consolidation.  removed device_script().		 removed perror() reference.01l,08jun95,dzb  made LOG_NOTICE message printed even w/o debug option.01k,16may95,dzb  put back in login option doc.01j,09may95,dzb  added callout to pppSecretLibInit().                 switched all lcp_close() calls to go through die().01i,03may95,dzb  doc tweaks: removed login option, fixed require_chap_file,                 added pap_passwd option.01h,07mar95,dzb  changed cfree() to free() (ANSI).  Changed name to pppLib.c.                 additional doc/formatting.01g,13feb95,dab  fixed pppDelete() for multi unit support (SPR #4062).01f,09feb95,dzb  fixed proto tbl input call for multi unit support (SPR #4062).01e,07feb95,dab  changed syslog to MAINDEBUG for reg status messages.            dzb  changed to look at (errno != EINTR) after sigsuspend().01d,24jan95,dzb  ifdef VXW5_1 for timer_create() backwards capatibility.                 renamed params for pppInit() and ppp_task().01c,13jan95,dab  enhanced doc.01b,22dec94,dzb  tree shuffle and warning cleanup.01a,21dec94,dab  VxWorks port - first WRS version.	   +dzb  added: path for ppp header files, WRS copyright.*//*DESCRIPTIONThis library implements the VxWorks Point-to-Point Protocol (PPP)facility.  PPP allows VxWorks to communicate with other machines by sendingencapsulated multi-protocol datagrams over a point-to-point serial link.VxWorks may have up to 16 PPP interfaces active at any one time.  Eachindividual interface (or "unit") operates independent of the state ofother PPP units.USER-CALLABLE ROUTINESPPP network interfaces are initialized using the pppInit() routine. This routine's parameters specify the unit number, the name of the serial interface (<tty>) device, Internet (IP) addresses for both ends of the link,the interface baud rate, an optional pointer to a configuration options structure, and an optional pointer to a configuration options file.  The pppDelete() routine deletes a specified PPP interface.DATA ENCAPSULATIONPPP uses HDLC-like framing, in which five header and three trailer octets areused to encapsulate each datagram.  In environments where bandwidth is ata premium, the total encapsulation may be shortened to four octets withthe available address/control and protocol field compression options.LINK CONTROL PROTOCOLPPP incorporates a link-layer protocol called Link Control Protocol (LCP),which is responsible for the link set up, configuration, and termination.LCP provides for automatic negotiation of several link options, includingdatagram encapsulation format, user authentication, and link monitoring(LCP echo request/reply).NETWORK CONTROL PROTOCOLSPPP's Network Control Protocols (NCP) allow PPP to support different network protocols.  VxWorks supports only one NCP, the InternetProtocol Control Protocol (IPCP), which allows the establishment andconfiguration of IP over PPP links.  IPCP supports the negotiation of IPaddresses and TCP/IP header compression (commonly called "VJ" compression).AUTHENTICATIONThe VxWorks PPP implementation supports two separate user authenticationprotocols: the Password Authentication Protocol (PAP) and theChallenge-Handshake Authentication Protocol (CHAP).  While PAP onlyauthenticates at the time of link establishment, CHAP may be configured toperiodically require authentication throughout the life of the link.Both protocols are independent of one another, and either may be configuredin through the PPP options structure or options file.IMPLEMENTATIONEach VxWorks PPP interface is handled by two tasks: the daemon task(tPPP<unit>) and the write task (tPPP<unit>Wrt).The daemon task controls the various PPP control protocols (LCP, IPCP, CHAP,and PAP).  Each PPP interface has its own daemon task that handles linkset up, negotiation of link options, link-layer user athentication, andlink termination.  The daemon task is not used for the actual sending andreceiving of IP datagrams.The write task controls the transmit end of a PPP driver interface.Each PPP interface has its own write task that handles the actual sendingof a packet by writing data to the <tty> device.  Whenever a packet is readyto be sent out, the PPP driver activates this task by giving a semaphore.The write task then completes the packet framing and writesthe packet data to the <tty> device.The receive end of the PPP interface is implemented as a "hook" intothe <tty> device driver.  The <tty> driver's receive interrupt service routine(ISR) calls the PPP driver's ISR every time a character is received on theserial channel.  When the correct PPP framing character sequence is received,the PPP ISR schedules the tNetTask task to call the PPP input routine.The PPP input routine reads a whole PPP packet out of the <tty> ringbuffer and processes it according to PPP framing rules.The packet is then queued either to the IP input queue or to the PPP daemontask input queue.INCLUDE FILES: pppLib.hSEE ALSO: ifLib, tyLib, pppSecretLib, pppShow,.pG "Network", .I "RFC-1332: The PPP Internet Protocol Control Protocol (IPCP)", .I "RFC-1334: PPP Authentication Protocols", .I "RFC-1548: The Point-to-Point Protocol (PPP)", .I "RFC-1549: PPP in HDLC Framing"ACKNOWLEDGEMENTThis program is based on original work done by Paul Mackerras ofAustralian National University, Brad Parker, Greg Christy, Drew D. Perkins,Rick Adams, and Chris Torek.INTERNAL         pppInit               pppDelete             |                     |            |                     |            |                     |         pppopen   pppwrite    pppclose   pppintr   pppread   pppioctl           /\          |          |          |                         /  \         |          |          |                       /    \    pppoutput      |          |                     /      \       |          |          |                   /        \      |          |          |             pppalloc pppWrtTask <-      pppdealloc ppp_tty_read       |                                      |                 |                                      |                 |                                      |             pppattach                               pppinput                                             |                                             |                                             |                                          ppppktin*/#include "vxWorks.h"#include "string.h"#include "sigLib.h"#include "sysLib.h"#include "sockLib.h"#include "ioLib.h"#include "iosLib.h"#include "excLib.h"#include "time.h"#include "timers.h"#include "taskLib.h"#include "taskVarLib.h"#include "hostLib.h"#include "sys/ioctl.h"#include "netinet/in.h"#include "arpa/inet.h"#include "stdio.h"#include "signal.h"#include "errno.h"#include "fcntl.h"#include "sys/types.h"#include "sys/stat.h"#include "sys/socket.h"#include "sys/times.h"#include "net/if.h"#include "netLib.h"#include "pppLib.h"/* PPP parameter structure */typedef struct ppp_parms{	char *task_name;        char *devname;        char *local_addr;        char *remote_addr;        char *filename;        int unit;        int baud;        PPP_OPTIONS options;} PPP_PARMS;/* globals */int ppp_unit;				/* PPP unit id */PPP_TASK_VARS *ppp_if[NPPP];		/* per task PPP variables */PPP_PARMS *ppp_parms[NPPP];		/* PPP parameters */PPP_HOOK_RTNS * pppHookRtns [NPPP];	/* PPP table of hooks */int ppp_task_priority		= 55;int ppp_task_options		= VX_FP_TASK | VX_DEALLOC_STACK;int ppp_task_stack_size		= 0x4000;char *ppp_task_name		= "tPPP";/* prototypes */static int  baud_rate_of __ARGS((int));static int  translate_speed __ARGS((int));static int  set_up_tty __ARGS((int));static void hup __ARGS((int));static void intr __ARGS((int));static void term __ARGS((int));static void alrm __ARGS((int));static void io __ARGS(());static void incdebug __ARGS((int));static void nodebug __ARGS((int));static void cleanup __ARGS((int, int, caddr_t));/* * PPP Data Link Layer "protocol" table. * One entry per supported protocol. */static struct protent {    u_short protocol;    void (*init)();    void (*input)();    void (*protrej)();    int  (*printpkt)();    char *name;} prottbl[] = {    { LCP, lcp_init, lcp_input, lcp_protrej, lcp_printpkt, "LCP" },    { IPCP, ipcp_init, ipcp_input, ipcp_protrej, ipcp_printpkt, "IPCP" },    { UPAP, upap_init, upap_input, upap_protrej, upap_printpkt, "PAP" },    { CHAP, ChapInit, ChapInput, ChapProtocolReject, ChapPrintPkt, "CHAP" },};#define N_PROTO         (sizeof(prottbl) / sizeof(prottbl[0]))/********************************************************************************* pppInit - initialize a PPP network interface** This routine initializes a Point-to-Point Protocol (PPP) network interface.* The parameters to this routine specify the unit number (<unit>) of the* PPP interface, the name of the serial interface (<tty>) device (<devname>),* the IP addresses of the local and remote ends of the link, the interface* baud rate, an optional configuration options structure pointer, and an* optional configuration options file name.** IP ADDRESSES:* The <local_addr> and <remote_addr> parameters specify the IP addresses* of the local and remote ends of the PPP link, respectively.* If <local_addr> is NULL, the local IP address will be negotiated with* the remote peer.  If the remote peer does not assign a local IP address,* it will default to the address associated with the local target's machine* name.  If <remote_addr> is NULL, the remote peer's IP address will obtained* from the remote peer.  A routing table entry to the remote peer will be* automatically added once the PPP link is established.** CONFIGURATION OPTIONS STRUCTURE:* The optional parameter <pOptions> specifies configuration options for* the PPP link.  If NULL, this parameter is ignored, otherwise it* is assumed to be a pointer to a PPP_OPTIONS options structure (defined* in h/netinet/ppp/options.h).** The "flags" member of the PPP_OPTIONS structure is a bit-mask, where the* following bit-flags may be specified:* .iP "OPT_NO_ALL"* Do not request/allow any options.* .iP "OPT_PASSIVE_MODE"* Set passive mode.* .iP "OPT_SILENT_MODE"* Set silent mode.* .iP "OPT_DEFAULTROUTE"* Add default route.* .iP "OPT_PROXYARP"* Add proxy ARP entry.* .iP "OPT_IPCP_ACCEPT_LOCAL"* Accept peer's idea of the local IP address.* .iP "OPT_IPCP_ACCEPT_REMOTE"* Accept peer's idea of the remote IP address.* .iP "OPT_NO_IP"* Disable IP address negotiation.* .iP "OPT_NO_ACC"* Disable address/control compression.* .iP "OPT_NO_PC"* Disable protocol field compression.* .iP "OPT_NO_VJ"* Disable VJ (Van Jacobson) compression.* .iP "OPT_NO_VJCCOMP"* Disable VJ (Van Jacobson) connnection ID compression.* .iP "OPT_NO_ASYNCMAP"* Disable async map negotiation.* .iP "OPT_NO_MN"* Disable magic number negotiation.* .iP "OPT_NO_MRU"* Disable MRU (Maximum Receive Unit) negotiation.* .iP "OPT_NO_PAP"* Do not allow PAP authentication with peer.* .iP "OPT_NO_CHAP"* Do not allow CHAP authentication with peer.* .iP "OPT_REQUIRE_PAP"* Require PAP authentication with peer.* .iP "OPT_REQUIRE_CHAP"* Require CHAP authentication with peer.* .iP "OPT_LOGIN"* Use the login password database for PAP authentication of peer.* .iP "OPT_DEBUG"* Enable PPP daemon debug mode.* .iP "OPT_DRIVER_DEBUG"* Enable PPP driver debug mode.* .LP** The remaining members of the PPP_OPTIONS structure specify PPP configurations* options that require string values.  These options are:* .iP "char *asyncmap"* Set the desired async map to the specified string.* .iP "char *escape_chars"* Set the chars to escape on transmission to the specified string.* .iP "char *vj_max_slots"* Set maximum number of VJ compression header slots to the specified string.* .iP "char *netmask"* Set netmask value for negotiation to the specified string.* .iP "char *mru"* Set MRU value for negotiation to the specified string.* .iP "char *mtu"* Set MTU (Maximum Transmission Unit) value for negotiation to the* specified string.* .iP "char *lcp_echo_failure"* Set the maximum number of consecutive LCP echo failures to the specified* string.* .iP "char *lcp_echo_interval"* Set the interval in seconds between LCP echo requests to the specified string.* .iP "char *lcp_restart"* Set the timeout in seconds for the LCP negotiation to the specified string.* .iP "char *lcp_max_terminate"* Set the maximum number of transmissions for LCP termination requests* to the specified string.* .iP "char *lcp_max_configure"* Set the maximum number of transmissions for LCP configuration* requests to the specified string.* .iP "char *lcp_max_failure"* Set the maximum number of LCP configuration NAKs to the specified string.* .iP "char *ipcp_restart"* Set the timeout in seconds for IPCP negotiation to the specified string.* .iP "char *ipcp_max_terminate"* Set the maximum number of transmissions for IPCP termination requests* to the specified string.* .iP "char *ipcp_max_configure"* Set the maximum number of transmissions for IPCP configuration requests* to the specified string.* .iP "char *ipcp_max_failure"* Set the maximum number of IPCP configuration NAKs to the specified string.* .iP "char *local_auth_name"* Set the local name for authentication to the specified string.* .iP "char *remote_auth_name"* Set the remote name for authentication to the specified string.* .iP "char *pap_file"* Get PAP secrets from the specified file.  This option is necessary* if either peer requires PAP authentication.* .iP "char *pap_user_name"* Set the user name for PAP authentication with the peer to the* specified string.* .iP "char *pap_passwd"* Set the password for PAP authentication with the peer to the specified string.* .iP "char *pap_restart"* Set the timeout in seconds for PAP negotiation to the specified string.* .iP "char *pap_max_authreq"* Set the maximum number of transmissions for PAP authentication* requests to the specified string.* .iP "char *chap_file"* Get CHAP secrets from the specified file.  This option is necessary* if either peer requires CHAP authentication.* .iP "char *chap_restart"* Set the timeout in seconds for CHAP negotiation to the specified string.* .iP "char *chap_interval"* Set the interval in seconds for CHAP rechallenge to the specified string.* .iP "char *chap_max_challenge"* Set the maximum number of transmissions for CHAP challenge to the* specified string.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品一区二区男女羞羞无遮挡 | 国产精品高清亚洲| 精品国产91久久久久久久妲己| 在线视频你懂得一区二区三区| 97久久精品人人做人人爽50路| 高清成人免费视频| 成人激情黄色小说| av一区二区三区在线| 99久久99精品久久久久久| 成人免费毛片aaaaa**| 成人18视频在线播放| www.久久精品| 91视频你懂的| 欧美色综合网站| 欧美精品日韩一本| 日韩欧美国产一区在线观看| 日韩精品在线一区二区| 久久久久久综合| 中文字幕乱码亚洲精品一区| 国产精品国产三级国产普通话蜜臀 | 亚洲高清免费视频| 日韩和欧美的一区| 捆绑变态av一区二区三区| 狠狠色伊人亚洲综合成人| 国产成人午夜视频| 91网站黄www| 欧美美女黄视频| 欧美大胆一级视频| 国产区在线观看成人精品| 亚洲国产成人在线| 亚洲一区二区三区中文字幕在线| 视频在线观看91| 精品一二三四区| 白白色亚洲国产精品| 在线看不卡av| 精品国产第一区二区三区观看体验| 久久精品亚洲一区二区三区浴池| 国产精品三级久久久久三级| 亚洲最大色网站| 极品少妇xxxx精品少妇| 成人性生交大片免费| 欧美午夜宅男影院| 精品国产乱码久久久久久牛牛 | 精品一区在线看| 99久久婷婷国产综合精品电影 | 欧美电影一区二区| 欧美午夜不卡在线观看免费| 91精品国产91热久久久做人人| 久久奇米777| 亚洲美女区一区| 精品一区二区在线观看| 99re8在线精品视频免费播放| 欧美久久久久久久久| 国产欧美综合色| 日韩在线一二三区| 成人免费黄色在线| 日韩精品一区二区三区中文不卡| 中文字幕在线一区免费| 日韩成人一区二区| 99久久久国产精品免费蜜臀| 欧美岛国在线观看| 亚洲第一福利一区| 成人黄色小视频| 亚洲精品一区二区三区影院| 一区二区三区小说| 国产成人免费xxxxxxxx| 91精选在线观看| 亚洲黄色av一区| 高清不卡一区二区在线| 欧美一级理论性理论a| 亚洲靠逼com| 国产白丝网站精品污在线入口| 欧美日韩国产高清一区二区三区| 欧美国产成人精品| 久久国产精品99久久久久久老狼| 91激情五月电影| 国产精品国产三级国产aⅴ入口 | 亚洲va韩国va欧美va精品| 成人在线视频一区二区| 日韩精品一区二区三区在线观看 | 久久精品国产精品亚洲综合| 欧美性生交片4| 综合网在线视频| 国产ts人妖一区二区| 欧美精品一区二区三| 日韩成人一区二区三区在线观看| 欧美三电影在线| 亚洲色图欧洲色图| 国产成+人+日韩+欧美+亚洲| 99视频精品在线| 久久女同精品一区二区| 首页国产丝袜综合| 在线观看一区二区视频| 中文字幕在线一区免费| 精品在线亚洲视频| 777久久久精品| 一区二区三区四区亚洲| 成人中文字幕电影| 久久久久国产精品麻豆| 青青青爽久久午夜综合久久午夜| 99国产精品久久久| 日本一区二区三区视频视频| 美女视频网站黄色亚洲| 欧美理论片在线| 亚洲国产一二三| 91国内精品野花午夜精品| 亚洲精品国久久99热| 99国产精品久久久久| 国产精品网站一区| 国产在线精品一区在线观看麻豆| 欧美美女bb生活片| 亚洲va韩国va欧美va| 欧美日韩一区二区三区在线| 亚洲欧美另类久久久精品 | caoporn国产一区二区| 久久久久国产精品麻豆ai换脸| 久久综合综合久久综合| 欧美一级xxx| 美女尤物国产一区| 日韩精品专区在线| 国内精品伊人久久久久av一坑 | 亚洲色大成网站www久久九九| 国产成人h网站| 国产精品久久夜| 国产成人自拍网| 亚洲黄色录像片| 在线成人午夜影院| 青娱乐精品在线视频| 欧美videos大乳护士334| 免费观看成人鲁鲁鲁鲁鲁视频| 精品美女一区二区| 国产aⅴ综合色| 国产日韩三级在线| 成人av网在线| 一区二区三区成人| 在线观看一区不卡| 精品一区二区三区香蕉蜜桃| 久久久亚洲午夜电影| 成人激情综合网站| 亚洲免费观看高清在线观看| 欧美无砖砖区免费| 国产高清成人在线| 亚洲男同性视频| 欧美高清激情brazzers| 蜜臀av性久久久久蜜臀aⅴ流畅| 精品国产不卡一区二区三区| 国产精品亚洲一区二区三区在线| 国产欧美日韩亚州综合| va亚洲va日韩不卡在线观看| 亚洲一区欧美一区| 这里只有精品99re| 国产高清不卡一区二区| 亚洲精品国产品国语在线app| 成人午夜精品在线| 亚洲第一福利视频在线| 欧美三级三级三级爽爽爽| 久久99精品久久久久婷婷| 亚洲欧美色图小说| 91精品婷婷国产综合久久性色| 国产一区二区福利| 一区二区三区国产精品| www激情久久| 91精品福利视频| 国内成人精品2018免费看| 中文成人av在线| 欧美日韩国产精品成人| 成人一区二区视频| 亚洲成人免费影院| 国产女同性恋一区二区| 91黄视频在线观看| 国产高清精品在线| 日本亚洲电影天堂| 最新国产成人在线观看| 欧美亚洲国产一区在线观看网站| 国产精品一区专区| 亚洲午夜私人影院| 国产女同性恋一区二区| 欧美一区二区三区视频免费| 国产成人在线视频网址| 久久精品av麻豆的观看方式| 亚洲裸体xxx| 久久精品在这里| 3d成人h动漫网站入口| www.亚洲精品| 加勒比av一区二区| 亚洲高清不卡在线| 国产精品久久久久久户外露出| 欧美日韩久久一区二区| 91麻豆福利精品推荐| 国产精品一区二区免费不卡| 日本欧美久久久久免费播放网| 亚洲精品日韩综合观看成人91| 国产精品中文字幕欧美| 毛片av一区二区三区| 一区二区三区91| 亚洲天堂免费在线观看视频| 中文无字幕一区二区三区| 精品久久一区二区三区| 91超碰这里只有精品国产| 91蜜桃视频在线|