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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ppp.c

?? 前段時間把lwip和ucos移植在44b0平臺上,用的是hfrk44b0開發板.已經調試通過,并且在板子上運行正常.
?? C
?? 第 1 頁 / 共 4 頁
字號:
/****************************************************************************** ppp.c - Network Point to Point Protocol program file.** Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc.* portions Copyright (c) 1997 by Global Election Systems Inc.** The authors hereby grant permission to use, copy, modify, distribute,* and license this software and its documentation for any purpose, provided* that existing copyright notices are retained in all copies and that this* notice and the following disclaimer are included verbatim in any * distributions. No written agreement, license, or royalty fee is required* for any of the authorized uses.** THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.******************************************************************************** REVISION HISTORY** 03-01-01 Marc Boucher <marc@mbsi.ca>*   Ported to lwIP.* 97-11-05 Guy Lancaster <lancasterg@acm.org>, Global Election Systems Inc.*   Original.*****************************************************************************//* * ppp_defs.h - PPP definitions. * * if_pppvar.h - private structures and declarations for PPP. * * Copyright (c) 1994 The Australian National University. * All rights reserved. * * Permission to use, copy, modify, and distribute this software and its * documentation is hereby granted, provided that the above copyright * notice appears in all copies.  This software is provided without any * warranty, express or implied. The Australian National University * makes no representations about the suitability of this software for * any purpose. * * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. * * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, * OR MODIFICATIONS. *//* * if_ppp.h - Point-to-Point Protocol definitions. * * 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 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */#include "ppp.h"#if PPP_SUPPORT > 0#include "randm.h"#include "fsm.h"#if PAP_SUPPORT > 0#include "pap.h"#endif#if CHAP_SUPPORT > 0#include "chap.h"#endif#include "ipcp.h"#include "lcp.h"#include "magic.h"#include "auth.h"#if VJ_SUPPORT > 0#include "vj.h"#endif#include "pppdebug.h"/*************************//*** LOCAL DEFINITIONS ***//*************************//* * The basic PPP frame. */#define PPP_ADDRESS(p)  (((u_char *)(p))[0])#define PPP_CONTROL(p)  (((u_char *)(p))[1])#define PPP_PROTOCOL(p) ((((u_char *)(p))[2] << 8) + ((u_char *)(p))[3])/* PPP packet parser states.  Current state indicates operation yet to be * completed. */typedef enum {    PDIDLE = 0,                 /* Idle state - waiting. */    PDSTART,                    /* Process start flag. */    PDADDRESS,                  /* Process address field. */    PDCONTROL,                  /* Process control field. */    PDPROTOCOL1,                /* Process protocol field 1. */    PDPROTOCOL2,                /* Process protocol field 2. */    PDDATA                      /* Process data byte. */} PPPDevStates;#define ESCAPE_P(accm, c) ((accm)[(c) >> 3] & pppACCMMask[c & 0x07])/************************//*** LOCAL DATA TYPES ***//************************//* * PPP interface control block. */typedef struct PPPControl_s {    char openFlag;                      /* True when in use. */    char oldFrame;                      /* Old framing character for fd. */    sio_fd_t fd;                    /* File device ID of port. */    int  kill_link;                     /* Shut the link down. */    int  sig_hup;                       /* Carrier lost. */    int  if_up;                         /* True when the interface is up. */    int  errCode;                       /* Code indicating why interface is down. */    struct pbuf *inHead, *inTail;       /* The input packet. */    PPPDevStates inState;               /* The input process state. */    char inEscaped;                     /* Escape next character. */    u16_t inProtocol;                   /* The input protocol code. */    u16_t inFCS;                        /* Input Frame Check Sequence value. */    int  mtu;                           /* Peer's mru */    int  pcomp;                         /* Does peer accept protocol compression? */    int  accomp;                        /* Does peer accept addr/ctl compression? */    u_long lastXMit;                    /* Time of last transmission. */    ext_accm inACCM;                    /* Async-Ctl-Char-Map for input. */    ext_accm outACCM;                   /* Async-Ctl-Char-Map for output. */#if VJ_SUPPORT > 0    int  vjEnabled;                     /* Flag indicating VJ compression enabled. */    struct vjcompress vjComp;           /* Van Jabobsen compression header. */#endif    struct netif netif;    struct ppp_addrs addrs;    void (*linkStatusCB)(void *ctx, int errCode, void *arg);    void *linkStatusCtx;} PPPControl;/* * Ioctl definitions. */struct npioctl {    int     protocol;           /* PPP procotol, e.g. PPP_IP */    enum NPmode mode;};/***********************************//*** LOCAL FUNCTION DECLARATIONS ***//***********************************/static void pppMain(void *pd);static void pppDrop(PPPControl *pc);static void pppInProc(int pd, u_char *s, int l);/******************************//*** PUBLIC DATA STRUCTURES ***//******************************/u_long subnetMask;static PPPControl pppControl[NUM_PPP]; /* The PPP interface control blocks. *//* * PPP Data Link Layer "protocol" table. * One entry per supported protocol. * The last entry must be NULL. */struct protent *ppp_protocols[] = {    &lcp_protent,#if PAP_SUPPORT > 0    &pap_protent,#endif#if CHAP_SUPPORT > 0    &chap_protent,#endif#if CBCP_SUPPORT > 0    &cbcp_protent,#endif    &ipcp_protent,#if CCP_SUPPORT > 0    &ccp_protent,#endif    NULL};/* * Buffers for outgoing packets.  This must be accessed only from the appropriate * PPP task so that it doesn't need to be protected to avoid collisions. */u_char outpacket_buf[NUM_PPP][PPP_MRU+PPP_HDRLEN];  /*****************************//*** LOCAL DATA STRUCTURES ***//*****************************//* * FCS lookup table as calculated by genfcstab. */static const u_short fcstab[256] = {    0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,    0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,    0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e,    0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876,    0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd,    0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5,    0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c,    0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974,    0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb,    0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3,    0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a,    0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72,    0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9,    0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1,    0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738,    0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70,    0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7,    0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff,    0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036,    0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e,    0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5,    0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd,    0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134,    0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c,    0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3,    0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb,    0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232,    0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a,    0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1,    0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9,    0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,    0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78};/* PPP's Asynchronous-Control-Character-Map.  The mask array is used * to select the specific bit for a character. */static u_char pppACCMMask[] = {    0x01,    0x02,    0x04,    0x08,    0x10,    0x20,    0x40,    0x80};/***********************************//*** PUBLIC FUNCTION DEFINITIONS ***//***********************************//* Initialize the PPP subsystem. */struct ppp_settings ppp_settings;void pppInit(void){    struct protent *protp;    int i, j;    	memset(&ppp_settings, 0, sizeof(ppp_settings));	ppp_settings.usepeerdns = 1;	pppSetAuth(PPPAUTHTYPE_NONE, NULL, NULL);	magicInit();    for (i = 0; i < NUM_PPP; i++) {        pppControl[i].openFlag = 0;		subnetMask = htonl(0xffffff00);            /*         * Initialize to the standard option set.         */        for (j = 0; (protp = ppp_protocols[j]) != NULL; ++j)            (*protp->init)(i);    }#if LINK_STATS    /* Clear the statistics. */    memset(&lwip_stats.link, 0, sizeof(lwip_stats.link));#endif}void pppSetAuth(enum pppAuthType authType, const char *user, const char *passwd){    switch(authType) {	case PPPAUTHTYPE_NONE:	default:#ifdef LWIP_PPP_STRICT_PAP_REJECT	    ppp_settings.refuse_pap = 1;#else	    /* some providers request pap and accept an empty login/pw */	    ppp_settings.refuse_pap = 0;#endif	    ppp_settings.refuse_chap = 1;	    break;	case PPPAUTHTYPE_ANY:/* Warning: Using PPPAUTHTYPE_ANY might have security consequences. * RFC 1994 says: * * In practice, within or associated with each PPP server, there is a * database which associates "user" names with authentication * information ("secrets").  It is not anticipated that a particular * named user would be authenticated by multiple methods.  This would * make the user vulnerable to attacks which negotiate the least secure * method from among a set (such as PAP rather than CHAP).  If the same * secret was used, PAP would reveal the secret to be used later with * CHAP. * * Instead, for each user name there should be an indication of exactly * one method used to authenticate that user name.  If a user needs to * make use of different authentication methods under different * circumstances, then distinct user names SHOULD be employed, each of * which identifies exactly one authentication method. * */	    ppp_settings.refuse_pap = 0;	    ppp_settings.refuse_chap = 0;	    break;	case PPPAUTHTYPE_PAP:	    ppp_settings.refuse_pap = 0;	    ppp_settings.refuse_chap = 1;	    break;	case PPPAUTHTYPE_CHAP:	    ppp_settings.refuse_pap = 1;	    ppp_settings.refuse_chap = 0;	    break;    }    if(user) {	strncpy(ppp_settings.user, user, sizeof(ppp_settings.user)-1);	ppp_settings.user[sizeof(ppp_settings.user)-1] = '\0';    } else	ppp_settings.user[0] = '\0';    if(passwd) {	strncpy(ppp_settings.passwd, passwd, sizeof(ppp_settings.passwd)-1);	ppp_settings.passwd[sizeof(ppp_settings.passwd)-1] = '\0';    } else	ppp_settings.passwd[0] = '\0';}/* Open a new PPP connection using the given I/O device. * This initializes the PPP control block but does not * attempt to negotiate the LCP session.  If this port * connects to a modem, the modem connection must be * established before calling this. * Return a new PPP connection descriptor on success or * an error code (negative) on failure. */int pppOpen(sio_fd_t fd, void (*linkStatusCB)(void *ctx, int errCode, void *arg), void *linkStatusCtx){    PPPControl *pc;    int pd;    /* Find a free PPP session descriptor. Critical region? */    for (pd = 0; pd < NUM_PPP && pppControl[pd].openFlag != 0; pd++);    if (pd >= NUM_PPP)        pd = PPPERR_OPEN;    else        pppControl[pd].openFlag = !0;    /* Launch a deamon thread. */    if (pd >= 0) {        pppControl[pd].openFlag = 1;        lcp_init(pd);        pc = &pppControl[pd];        pc->fd = fd;        pc->kill_link = 0;        pc->sig_hup = 0;        pc->if_up = 0;        pc->errCode = 0;        pc->inState = PDIDLE;        pc->inHead = NULL;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久久久久久久图文区 | 日本v片在线高清不卡在线观看| 99re热这里只有精品视频| 欧美国产日本韩| 成人av第一页| 亚洲天堂2016| 精品视频1区2区3区| 日韩国产高清影视| 精品久久久久久无| 国产91丝袜在线播放九色| 亚洲国产成人在线| 99国产精品久久久久| 午夜久久久久久久久久一区二区| 欧美一区二区三区四区视频| 韩日欧美一区二区三区| 中文字幕一区二区三区视频| 欧美性高清videossexo| 免费在线观看一区| 欧美精品一区二区在线观看| 99久久久久久| 日韩电影一二三区| 国产精品毛片久久久久久久| 欧美日韩中文一区| 国产一区免费电影| 一区二区三区免费在线观看| 日韩欧美在线综合网| 国产激情偷乱视频一区二区三区 | 久久先锋影音av鲁色资源网| 99精品国产热久久91蜜凸| 亚洲国产日韩一区二区| 久久精品人人做人人爽97| 色94色欧美sute亚洲13| 黄色日韩三级电影| 亚洲一级片在线观看| 久久夜色精品一区| 精品视频在线免费观看| 国产高清精品在线| 婷婷久久综合九色综合伊人色| 国产蜜臀97一区二区三区 | 99久精品国产| 久久精品国产亚洲高清剧情介绍| 国产精品国产馆在线真实露脸| 91精品国产入口| 97久久精品人人做人人爽50路| 精品一区二区三区在线播放视频| 一区二区三区高清不卡| 国产亚洲欧洲997久久综合| 欧美在线free| 成人一区二区三区| 久久精品国产网站| 五月天一区二区三区| 欧美一卡二卡三卡| 色婷婷香蕉在线一区二区| 国产精品正在播放| 日韩**一区毛片| 亚洲综合无码一区二区| 国产精品福利电影一区二区三区四区| 欧美v日韩v国产v| 欧美福利一区二区| 欧美三区在线观看| 色噜噜狠狠成人网p站| 99精品欧美一区二区三区综合在线| 国产乱妇无码大片在线观看| 久久av资源站| 青青草97国产精品免费观看 | 91精品国产乱| 欧美在线播放高清精品| 色猫猫国产区一区二在线视频| 成人免费观看男女羞羞视频| 粉嫩av亚洲一区二区图片| 国产精品亚洲а∨天堂免在线| 精品一区二区成人精品| 经典三级在线一区| 精品一区二区三区av| 国内精品免费**视频| 国产麻豆欧美日韩一区| 国产91丝袜在线观看| 成人精品一区二区三区中文字幕| 国产精品538一区二区在线| 精品一区精品二区高清| 国产一区二区不卡老阿姨| 韩国女主播成人在线| 国产精品中文字幕一区二区三区| 国产乱人伦偷精品视频免下载| 国产91丝袜在线播放九色| a4yy欧美一区二区三区| 色综合久久精品| 欧美视频一二三区| 欧美一区二区视频在线观看2022 | 精品精品国产高清一毛片一天堂| 日韩三级在线免费观看| 精品国产麻豆免费人成网站| 久久精品视频免费| 综合分类小说区另类春色亚洲小说欧美| 国产精品理论片| 亚洲综合在线观看视频| 亚洲国产日韩综合久久精品| 久久国产夜色精品鲁鲁99| 高清成人免费视频| 色综合久久88色综合天天免费| 欧美疯狂做受xxxx富婆| 欧美精品一区二区久久久| 国产精品免费网站在线观看| 亚洲精品你懂的| 久久国产精品免费| va亚洲va日韩不卡在线观看| 欧美丝袜自拍制服另类| 欧美精品一区二区三区高清aⅴ| 成人欧美一区二区三区黑人麻豆| 一区二区久久久久久| 久久电影国产免费久久电影| 99re这里都是精品| 欧美一区二区三区四区视频| 国产精品视频你懂的| 丝袜脚交一区二区| jvid福利写真一区二区三区| 欧美日本乱大交xxxxx| 亚洲国产精品成人久久综合一区| 亚洲自拍偷拍网站| 国产麻豆精品theporn| 欧美亚洲一区二区在线观看| 久久久91精品国产一区二区精品 | 久久久午夜电影| 亚洲精品你懂的| 国产老肥熟一区二区三区| 欧美三级三级三级爽爽爽| 国产欧美日韩在线| 青青草成人在线观看| 色婷婷av一区二区三区软件| 国产视频不卡一区| 日韩二区三区四区| 日本道精品一区二区三区| 欧美激情一区三区| 蜜臀av性久久久久蜜臀aⅴ| 在线观看免费一区| 国产精品九色蝌蚪自拍| 精品一二三四在线| 91精品国产综合久久小美女| 亚洲欧洲综合另类在线| 成人毛片老司机大片| 91色porny蝌蚪| 国产农村妇女毛片精品久久麻豆 | 亚洲一区二区三区爽爽爽爽爽| 国产黄色精品网站| 日韩精品一区二区三区四区视频| 亚洲一区二区在线观看视频| 91美女视频网站| 欧美激情一区二区三区在线| 国产一区视频在线看| 日韩免费看的电影| 免费高清在线一区| 欧美人妇做爰xxxⅹ性高电影| 中文字幕中文字幕一区| 国产aⅴ综合色| 国产午夜精品久久| 国产大片一区二区| 久久久国产精品午夜一区ai换脸| 久久www免费人成看片高清| 日韩欧美电影在线| 日韩vs国产vs欧美| 这里只有精品99re| 日韩电影在线观看网站| 日韩欧美在线一区二区三区| 奇米色一区二区三区四区| 91精品国产黑色紧身裤美女| 蜜臀av性久久久久蜜臀aⅴ| 欧美精品欧美精品系列| 日韩va欧美va亚洲va久久| 日韩一区二区电影在线| 久久97超碰色| 日韩三级在线免费观看| 狠狠久久亚洲欧美| 久久久国产一区二区三区四区小说| 韩国成人精品a∨在线观看| 久久精品欧美一区二区三区不卡 | 欧美视频三区在线播放| 天天色天天操综合| 日韩欧美中文一区二区| 国产在线播放一区| 国产精品热久久久久夜色精品三区 | 国产精品亚洲一区二区三区在线| 久久久久亚洲综合| 91网站最新地址| 亚洲一区二区三区四区五区黄| 欧美挠脚心视频网站| 蜜臀久久久99精品久久久久久| 欧美精品一区二区三区很污很色的| 国产精品99久久久久久有的能看| 国产精品久久久久精k8| 日本韩国一区二区三区视频| 日韩电影在线看| 欧美激情在线免费观看| 欧美亚洲一区二区在线| 久久99精品国产91久久来源| 国产精品三级电影| 欧美少妇性性性| 国产综合久久久久影院| 最新日韩在线视频| 欧美一级夜夜爽| 成人免费高清视频在线观看|