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

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

?? ipxcp.c

?? 自己精簡過的PPPD代碼。在嵌入中應用可以更好的發揮。比原先的小了很多
?? C
?? 第 1 頁 / 共 3 頁
字號:
}/* * ipxcp_resetci - Reset our CI. */static voidipxcp_resetci(f)    fsm *f;{    wo->req_node = wo->neg_node && ao->neg_node;    wo->req_nn	 = wo->neg_nn	&& ao->neg_nn;    if (wo->our_network == 0) {	wo->neg_node	   = 1;	ao->accept_network = 1;    }/* * If our node number is zero then change it. */    if (zero_node (wo->our_node)) {	inc_node (wo->our_node);	ao->accept_local = 1;	wo->neg_node	 = 1;    }/* * If his node number is zero then change it. */    if (zero_node (wo->his_node)) {	inc_node (wo->his_node);	ao->accept_remote = 1;    }/* * If no routing agent was specified then we do RIP/SAP according to the * RFC documents. If you have specified something then OK. Otherwise, we * do RIP/SAP. */    if (ao->router == 0) {	ao->router |= BIT(RIP_SAP);	wo->router |= BIT(RIP_SAP);    }    /* Always specify a routing protocol unless it was REJected. */    wo->neg_router = 1;/* * Start with these default values */    *go = *wo;}/* * ipxcp_cilen - Return length of our CI. */static intipxcp_cilen(f)    fsm *f;{    int len;    len	 = go->neg_nn	    ? CILEN_NETN     : 0;    len += go->neg_node	    ? CILEN_NODEN    : 0;    len += go->neg_name	    ? CILEN_NAME + strlen (go->name) - 1 : 0;    /* RFC says that defaults should not be included. */    if (go->neg_router && to_external(go->router) != RIP_SAP)        len += CILEN_PROTOCOL;    return (len);}/* * ipxcp_addci - Add our desired CIs to a packet. */static voidipxcp_addci(f, ucp, lenp)    fsm *f;    u_char *ucp;    int *lenp;{/* * Add the options to the record. */    if (go->neg_nn) {	PUTCHAR (IPX_NETWORK_NUMBER, ucp);	PUTCHAR (CILEN_NETN, ucp);	PUTLONG (go->our_network, ucp);    }    if (go->neg_node) {	int indx;	PUTCHAR (IPX_NODE_NUMBER, ucp);	PUTCHAR (CILEN_NODEN, ucp);	for (indx = 0; indx < sizeof (go->our_node); ++indx)	    PUTCHAR (go->our_node[indx], ucp);    }    if (go->neg_name) {	int cilen = strlen (go->name);	int indx;	PUTCHAR (IPX_ROUTER_NAME, ucp);	PUTCHAR (CILEN_NAME + cilen - 1, ucp);	for (indx = 0; indx < cilen; ++indx)	    PUTCHAR (go->name [indx], ucp);    }    if (go->neg_router) {        short external = to_external (go->router);	if (external != RIP_SAP) {	    PUTCHAR  (IPX_ROUTER_PROTOCOL, ucp);	    PUTCHAR  (CILEN_PROTOCOL,      ucp);	    PUTSHORT (external,            ucp);	}    }}/* * ipxcp_ackci - Ack our CIs. * * Returns: *	0 - Ack was bad. *	1 - Ack was good. */static intipxcp_ackci(f, p, len)    fsm *f;    u_char *p;    int len;{    u_short cilen, citype, cishort;    u_char cichar;    u_int32_t cilong;#define ACKCIVOID(opt, neg) \    if (neg) { \	if ((len -= CILEN_VOID) < 0) \	    break; \	GETCHAR(citype, p); \	GETCHAR(cilen, p); \	if (cilen != CILEN_VOID || \	    citype != opt) \	    break; \    }#define ACKCICOMPLETE(opt,neg)	ACKCIVOID(opt, neg)#define ACKCICHARS(opt, neg, val, cnt) \    if (neg) { \	int indx, count = cnt; \	len -= (count + 2); \	if (len < 0) \	    break; \	GETCHAR(citype, p); \	GETCHAR(cilen, p); \	if (cilen != (count + 2) || \	    citype != opt) \	    break; \	for (indx = 0; indx < count; ++indx) {\	    GETCHAR(cichar, p); \	    if (cichar != ((u_char *) &val)[indx]) \	       break; \	}\	if (indx != count) \	    break; \    }#define ACKCINODE(opt,neg,val) ACKCICHARS(opt,neg,val,sizeof(val))#define ACKCINAME(opt,neg,val) ACKCICHARS(opt,neg,val,strlen(val))#define ACKCINETWORK(opt, neg, val) \    if (neg) { \	if ((len -= CILEN_NETN) < 0) \	    break; \	GETCHAR(citype, p); \	GETCHAR(cilen, p); \	if (cilen != CILEN_NETN || \	    citype != opt) \	    break; \	GETLONG(cilong, p); \	if (cilong != val) \	    break; \    }#define ACKCIPROTO(opt, neg, val) \    if (neg) { \	if (len < 2) \	    break; \	GETCHAR(citype, p); \	GETCHAR(cilen, p); \	if (cilen != CILEN_PROTOCOL || citype != opt) \	    break; \	len -= cilen; \	if (len < 0) \	    break; \	GETSHORT(cishort, p); \	if (cishort != to_external (val) || cishort == RIP_SAP) \	    break; \      }/* * Process the ACK frame in the order in which the frame was assembled */    do {	ACKCINETWORK  (IPX_NETWORK_NUMBER,  go->neg_nn,	    go->our_network);	ACKCINODE     (IPX_NODE_NUMBER,	    go->neg_node,   go->our_node);	ACKCINAME     (IPX_ROUTER_NAME,	    go->neg_name,   go->name);	if (len > 0)		ACKCIPROTO    (IPX_ROUTER_PROTOCOL, go->neg_router, go->router);/* * This is the end of the record. */	if (len == 0)	    return (1);    } while (0);/* * The frame is invalid */    IPXCPDEBUG(("ipxcp_ackci: received bad Ack!"));    return (0);}/* * ipxcp_nakci - Peer has sent a NAK for some of our CIs. * This should not modify any state if the Nak is bad * or if IPXCP is in the OPENED state. * * Returns: *	0 - Nak was bad. *	1 - Nak was good. */static intipxcp_nakci(f, p, len, treat_as_reject)    fsm *f;    u_char *p;    int len;    int treat_as_reject;{    u_char citype, cilen, *next;    u_short s;    u_int32_t l;    ipxcp_options no;		/* options we've seen Naks for */    ipxcp_options try;		/* options to request next time */    BZERO(&no, sizeof(no));    try = *go;    while (len >= CILEN_VOID) {	GETCHAR (citype, p);	GETCHAR (cilen,	 p);	len -= cilen;	if (cilen < CILEN_VOID || len < 0)	    goto bad;	next = &p [cilen - CILEN_VOID];	switch (citype) {	case IPX_NETWORK_NUMBER:	    if (!go->neg_nn || no.neg_nn || (cilen != CILEN_NETN))		goto bad;	    no.neg_nn = 1;	    GETLONG(l, p);	    if (treat_as_reject)		try.neg_nn = 0;	    else if (l && ao->accept_network)		try.our_network = l;	    break;	case IPX_NODE_NUMBER:	    if (!go->neg_node || no.neg_node || (cilen != CILEN_NODEN))		goto bad;	    no.neg_node = 1;	    if (treat_as_reject)		try.neg_node = 0;	    else if (!zero_node (p) && ao->accept_local &&		     ! compare_node (p, ho->his_node))		copy_node (p, try.our_node);	    break;	    /* This has never been sent. Ignore the NAK frame */	case IPX_COMPRESSION_PROTOCOL:	    goto bad;	case IPX_ROUTER_PROTOCOL:	    if (!go->neg_router || (cilen < CILEN_PROTOCOL))		goto bad;	    GETSHORT (s, p);	    if (s > 15)         /* This is just bad, but ignore for now. */	        break;	    s = BIT(s);	    if (no.router & s)  /* duplicate NAKs are always bad */		goto bad;	    if (no.router == 0) /* Reset on first NAK only */		try.router = 0;	    no.router      |= s;	    try.router     |= s;	    try.neg_router  = 1;	    break;	    /* These, according to the RFC, must never be NAKed. */	case IPX_ROUTER_NAME:	case IPX_COMPLETE:	    goto bad;	    /* These are for options which we have not seen. */	default:	    break;	}	p = next;    }    /*     * Do not permit the peer to force a router protocol which we do not     * support. However, default to the condition that will accept "NONE".     */    try.router &= (ao->router | BIT(IPX_NONE));    if (try.router == 0 && ao->router != 0)	try.router = BIT(IPX_NONE);    if (try.router != 0)        try.neg_router = 1;        /*     * OK, the Nak is good.  Now we can update state.     * If there are any options left, we ignore them.     */    if (f->state != OPENED)	*go = try;    return 1;bad:    IPXCPDEBUG(("ipxcp_nakci: received bad Nak!"));    return 0;}/* * ipxcp_rejci - Reject some of our CIs. */static intipxcp_rejci(f, p, len)    fsm *f;    u_char *p;    int len;{    u_short cilen, citype, cishort;    u_char cichar;    u_int32_t cilong;    ipxcp_options try;		/* options to request next time */#define REJCINETWORK(opt, neg, val) \    if (neg && p[0] == opt) { \	if ((len -= CILEN_NETN) < 0) \	    break; \	GETCHAR(citype, p); \	GETCHAR(cilen, p); \	if (cilen != CILEN_NETN || \	    citype != opt) \	    break; \	GETLONG(cilong, p); \	if (cilong != val) \	    break; \	neg = 0; \    }#define REJCICHARS(opt, neg, val, cnt) \    if (neg && p[0] == opt) { \	int indx, count = cnt; \	len -= (count + 2); \	if (len < 0) \	    break; \	GETCHAR(citype, p); \	GETCHAR(cilen, p); \	if (cilen != (count + 2) || \	    citype != opt) \	    break; \	for (indx = 0; indx < count; ++indx) {\	    GETCHAR(cichar, p); \	    if (cichar != ((u_char *) &val)[indx]) \	       break; \	}\	if (indx != count) \	    break; \	neg = 0; \    }#define REJCINODE(opt,neg,val) REJCICHARS(opt,neg,val,sizeof(val))#define REJCINAME(opt,neg,val) REJCICHARS(opt,neg,val,strlen(val))#define REJCIVOID(opt, neg) \    if (neg && p[0] == opt) { \	if ((len -= CILEN_VOID) < 0) \	    break; \	GETCHAR(citype, p); \	GETCHAR(cilen, p); \	if (cilen != CILEN_VOID || citype != opt) \	    break; \	neg = 0; \    }/* a reject for RIP/SAP is invalid since we don't send it and you can't   reject something which is not sent. (You can NAK, but you can't REJ.) */#define REJCIPROTO(opt, neg, val, bit) \    if (neg && p[0] == opt) { \	if ((len -= CILEN_PROTOCOL) < 0) \	    break; \	GETCHAR(citype, p); \	GETCHAR(cilen, p); \	if (cilen != CILEN_PROTOCOL) \	    break; \	GETSHORT(cishort, p); \	if (cishort != to_external (val) || cishort == RIP_SAP) \	    break; \	neg = 0; \    }/* * Any Rejected CIs must be in exactly the same order that we sent. * Check packet length and CI length at each step. * If we find any deviations, then this packet is bad. */    try = *go;    do {	REJCINETWORK (IPX_NETWORK_NUMBER,  try.neg_nn,	   try.our_network);	REJCINODE    (IPX_NODE_NUMBER,	   try.neg_node,   try.our_node);	REJCINAME    (IPX_ROUTER_NAME,	   try.neg_name,   try.name);	REJCIPROTO   (IPX_ROUTER_PROTOCOL, try.neg_router, try.router, 0);/* * This is the end of the record. */	if (len == 0) {	    if (f->state != OPENED)		*go = try;	    return (1);	}    } while (0);/* * The frame is invalid at this point. */    IPXCPDEBUG(("ipxcp_rejci: received bad Reject!"));    return 0;}/* * ipxcp_reqci - Check the peer's requested CIs and send appropriate response. * * Returns: CONFACK, CONFNAK or CONFREJ and input packet modified * appropriately.  If reject_if_disagree is non-zero, doesn't return * CONFNAK; returns CONFREJ if it can't return CONFACK. */static intipxcp_reqci(f, inp, len, reject_if_disagree)    fsm *f;    u_char *inp;		/* Requested CIs */    int *len;			/* Length of requested CIs */    int reject_if_disagree;{    u_char *cip, *next;		/* Pointer to current and next CIs */    u_short cilen, citype;	/* Parsed len, type */    u_short cishort;		/* Parsed short value */    u_int32_t cinetwork;	/* Parsed address values */    int rc = CONFACK;		/* Final packet return code */    int orc;			/* Individual option return code */    u_char *p;			/* Pointer to next char to parse */    u_char *ucp = inp;		/* Pointer to current output char */    int l = *len;		/* Length left */    /*     * Reset all his options.     */    BZERO(ho, sizeof(*ho));        /*     * Process all his options.     */    next = inp;    while (l) {	orc = CONFACK;			/* Assume success */	cip = p = next;			/* Remember begining of CI */	if (l < 2 ||			/* Not enough data for CI header or */	    p[1] < 2 ||			/*  CI length too small or */	    p[1] > l) {			/*  CI length too big? */	    IPXCPDEBUG(("ipxcp_reqci: bad CI length!"));	    orc = CONFREJ;		/* Reject bad CI */	    cilen = l;			/* Reject till end of packet */	    l = 0;			/* Don't loop again */	    goto endswitch;	}	GETCHAR(citype, p);		/* Parse CI type */	GETCHAR(cilen, p);		/* Parse CI length */	l -= cilen;			/* Adjust remaining length */	next += cilen;			/* Step to next CI */	switch (citype) {		/* Check CI type *//* * The network number must match. Choose the larger of the two. */	case IPX_NETWORK_NUMBER:	    /* if we wont negotiate the network number or the length is wrong	       then reject the option */	    if ( !ao->neg_nn || cilen != CILEN_NETN ) {		orc = CONFREJ;		break;			    }	    GETLONG(cinetwork, p);	    /* If the network numbers match then acknowledge them. */	    if (cinetwork != 0) {		ho->his_network = cinetwork;		ho->neg_nn	= 1;		if (wo->our_network == cinetwork)		    break;/* * If the network number is not given or we don't accept their change or * the network number is too small then NAK it. */		if (! ao->accept_network || cinetwork < wo->our_network) {		    DECPTR (sizeof (u_int32_t), p);		    PUTLONG (wo->our_network, p);		    orc = CONFNAK;		}		break;	    }/* * The peer sent '0' for the network. Give it ours if we have one. */	    if (go->our_network != 0) {		DECPTR (sizeof (u_int32_t), p);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
丝袜美腿成人在线| 一二三四区精品视频| 91精品国产91久久久久久最新毛片 | 欧美日韩在线播放| 色婷婷香蕉在线一区二区| 99久久国产综合色|国产精品| 国产福利一区二区三区视频在线| 九九**精品视频免费播放| 久久国产精品99精品国产| 日本vs亚洲vs韩国一区三区| 美女性感视频久久| 国产一区二区在线观看免费| 国产精品一区2区| av午夜一区麻豆| 欧美在线观看18| 日韩美一区二区三区| 精品国产成人在线影院| 国产精品久久国产精麻豆99网站| 中文字幕永久在线不卡| 亚洲第一主播视频| 久久疯狂做爰流白浆xx| 成人午夜看片网址| 欧美色视频在线观看| 日韩欧美二区三区| 中文字幕亚洲欧美在线不卡| 亚洲国产精品久久久久婷婷884| 美女网站在线免费欧美精品| 波多野结衣中文字幕一区| 欧美在线观看你懂的| 精品sm捆绑视频| 亚洲精品中文在线影院| 麻豆精品在线观看| 91久久人澡人人添人人爽欧美| 欧美一级夜夜爽| 亚洲少妇30p| 激情综合一区二区三区| 91国偷自产一区二区使用方法| 精品91自产拍在线观看一区| 亚洲精品免费在线播放| 国模无码大尺度一区二区三区| 色av一区二区| 2014亚洲片线观看视频免费| 亚洲国产精品一区二区www在线| 国产精品乡下勾搭老头1| 欧美性大战久久久久久久蜜臀| 国产欧美一区二区三区沐欲| 亚洲777理论| 91亚洲永久精品| 国产三级三级三级精品8ⅰ区| 亚洲成人av一区二区三区| aaa国产一区| 久久久精品免费免费| 奇米影视一区二区三区小说| 色菇凉天天综合网| 亚洲欧洲成人自拍| 国产成人在线影院 | 国产精品综合在线视频| 欧美日韩精品一区二区三区蜜桃 | 一个色妞综合视频在线观看| 国产精品亚洲人在线观看| 日韩午夜中文字幕| 五月激情综合色| 欧美午夜精品免费| 亚洲一区在线观看免费| 99r国产精品| 中文字幕一区二区三区在线观看| 国产精品白丝jk白祙喷水网站| 日韩欧美国产午夜精品| 免费视频最近日韩| 日韩一级免费一区| 日本美女一区二区| 日韩午夜激情电影| 久久国产生活片100| 日韩欧美成人一区| 久久99精品国产麻豆婷婷洗澡| 日韩欧美一二三区| 国内精品嫩模私拍在线| 2020国产精品自拍| 国产成a人亚洲| 中文字幕av免费专区久久| 国产suv精品一区二区883| 欧美国产日产图区| 99精品久久久久久| 一区二区三区四区国产精品| 欧美色偷偷大香| 六月丁香综合在线视频| 精品久久人人做人人爰| 国产一区二区网址| 国产精品无人区| 欧美综合一区二区| 日韩av电影免费观看高清完整版 | 国产精品热久久久久夜色精品三区| 国产成人精品一区二区三区四区| 欧美韩日一区二区三区四区| av在线不卡免费看| 亚洲一区二区成人在线观看| 7777精品伊人久久久大香线蕉最新版 | 午夜久久久久久久久| 欧美一区二区私人影院日本| 国产精品原创巨作av| 亚洲精品成人少妇| 日韩欧美电影一区| 不卡视频免费播放| 青草av.久久免费一区| 久久免费看少妇高潮| 99国产精品久久久久| 蜜臀av性久久久久蜜臀aⅴ| 国产香蕉久久精品综合网| 欧美怡红院视频| 国产一区 二区 三区一级| 亚洲综合偷拍欧美一区色| 精品国产一区二区三区久久影院| 成人午夜视频在线观看| 日本美女一区二区三区| 亚洲视频在线观看一区| 精品国产伦一区二区三区观看体验 | 中文字幕欧美一| 欧美一卡二卡三卡| 91浏览器在线视频| 国内成人免费视频| 天天综合网 天天综合色| 国产精品白丝在线| 欧美成人伊人久久综合网| 91麻豆国产香蕉久久精品| 精东粉嫩av免费一区二区三区| 一区二区三区美女视频| 久久久久久久久岛国免费| 91精品国产高清一区二区三区蜜臀 | 久久久国产午夜精品| 在线观看亚洲一区| 99久久伊人精品| 国产精品69毛片高清亚洲| 日韩激情中文字幕| 亚洲一区二区欧美日韩| 中文字幕一区二区在线观看 | 91麻豆国产香蕉久久精品| 国产精品一区二区男女羞羞无遮挡| 日韩vs国产vs欧美| 亚洲国产aⅴ天堂久久| 亚洲精品免费一二三区| 中文av一区二区| 国产视频一区在线观看| 欧美r级电影在线观看| 这里是久久伊人| 欧美日韩精品一区二区三区蜜桃| 色婷婷久久久综合中文字幕 | 国模无码大尺度一区二区三区| 日本午夜精品视频在线观看 | 欧美在线播放高清精品| 91成人在线免费观看| 色菇凉天天综合网| 色妞www精品视频| 91久久精品一区二区三| 欧美亚洲国产怡红院影院| 在线观看国产91| 欧美午夜精品久久久久久超碰 | 国内成+人亚洲+欧美+综合在线| 免费成人av资源网| 韩国欧美国产1区| 国产黄色精品网站| 不卡一区中文字幕| 91色porny在线视频| 欧美在线小视频| 91精品国产丝袜白色高跟鞋| 日韩一区二区三区在线| 久久亚洲一区二区三区明星换脸 | 日韩精品乱码免费| 秋霞电影一区二区| 国产黄色成人av| 91论坛在线播放| 欧美一区二区三区免费在线看| 欧美乱熟臀69xxxxxx| 欧美成人艳星乳罩| 国产精品激情偷乱一区二区∴| 综合激情成人伊人| 天涯成人国产亚洲精品一区av| 精彩视频一区二区三区| 91麻豆国产福利在线观看| 日韩视频一区在线观看| 国产欧美日韩不卡免费| 亚洲国产中文字幕在线视频综合| 免费看欧美女人艹b| 盗摄精品av一区二区三区| 日本高清不卡一区| 精品久久久久久久一区二区蜜臀| 国产精品青草久久| 婷婷国产在线综合| 99亚偷拍自图区亚洲| 欧美一区二区播放| 亚洲私人黄色宅男| 韩国女主播成人在线| 欧美三级韩国三级日本一级| 久久人人爽爽爽人久久久| 亚洲一区自拍偷拍| 成人免费看视频| 日韩欧美一区二区久久婷婷| 一区二区三区不卡视频 | 欧洲一区二区三区免费视频| 精品久久免费看| 三级精品在线观看|