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

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

?? inetlib.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* inetLib.c - Internet address manipulation routines *//* Copyright 1984 - 2001 Wind River Systems, Inc. */#include "copyright_wrs.h"/* * Copyright (c) 1983 Regents of the University of California. * All rights reserved.  The Berkeley software License Agreement * specify the terms and conditions for redistribution. *//*modification history--------------------02k,10may02,kbw  making man page edits02j,05nov01,vvv  fixed compilation warnings02i,15oct01,rae  merge from truestack ver 02p, base 02h (SPRs 9424, 21740,                 65809, 34949, 36026)02h,13dec97,kbw  made man page edits02g,31jul97,kbw  fixed man page problems found in beta review02f,15apr97,kbw  fixing man page format and minor wording issues02e,16dec96,jag  added function inet_aton, added stricter check for invalid		 IP addresses to inet_addr. Cleaned up warnings.02d,06sep96,vin  upgraded to BSD44. Added CLASSD network and host processing.		 removed call to in_makeaddr_b, no longer necessary.02d,07oct96,dgp  doc: inet_ntoa and inet_ntoa_b - update descriptions02c,16may96,dgp  doc fixes, SPR 5991 & 5993.02b,09jan96,gnn	 Added a define for MAX_PARTS for inet_addr.  Fixed		 and array bounds checking error.  (SPR 5217)02a,31oct95,jdi  doc: changed in.h to inet.h (SPR 5306).01z,16oct95,jdi  doc: removed extra zeroes in some inet addresses (SPR 4869).01y,16feb94,caf  added check for NULL pointer in inet_addr() (SPR #2920).01x,20jan93,jdi  documentation cleanup for 5.1.01w,18jul92,smb  Changed errno.h to errnoLib.h.01v,26may92,rrr  the tree shuffle		  -changed includes to have absolute path from h/01u,10dec91,gae  added includes for ANSI.01t,04oct91,rrr  passed through the ansification filter                  -changed functions to ansi style		  -changed includes to have absolute path from h/		  -changed VOID to void		  -changed copyright notice01s,20may91,jdi	 documentation tweak.01r,30apr91,jdi	 documentation tweaks.01q,05apr91,jdi	 documentation -- removed header parens and x-ref numbers;		 doc review by dnw.01p,12feb91,jaa	 documentation.01o,26jun90,hjb  moved Show routines to netShow.c.01n,11may90,yao  added missing modification history (01m) for the last checkin.01m,09may90,yao  typecasted malloc to (char *).01l,11apr90,hjb  de-linted.01k,08sep89,hjb  added tcpstatShow(), udpstatShow(), icmpstatShow(),		 inetstatShow().01j,29sep88,gae  documentation.01i,18aug88,gae  documentation.01h,30may88,dnw  changed to v4 names.01g,18feb88,dnw  changed inet_netof_string() to be work with subnet masks		   by changing to call in_{makeaddr_b,netof} instead of		   inet_{...}.		 lint.01f,15dec87,gae  appeased lint; checked malloc's for NULL.01e,17nov87,ecs  lint.01d,16nov87,jlf  documentation.01c,16nov87,llk  documentation.		 changed to use more descriptive variable names.01b,06nov87,dnw  cleanup.01a,01nov87,llk  written.		 modified routines for VxWorks style (setStatus(), etc.)		 added inet_netof_string(), inet_makeaddr_b(), inet_ntoa_b().		 changed inet_ntoa() and inet_makeaddr() so that they malloc		   the structures that they return.		 NOTE: inet_addr returns u_long as specified in SUN documenta-		   tion, NOT in ISI documentation and arpa/inet.h header file.*//*DESCRIPTIONThis library provides routines for manipulating Internet addresses,including the UNIX BSD 4.3 'inet_' routines.  It includes routines forconverting between character addresses in Internet standard dotted decimal notation and integer addresses, routines for extracting the network and host portions out of an Internet address, and routines for constructing Internet addresses given the network and host address parts.All Internet addresses are returned in network order (bytes ordered fromleft to right).  All network numbers and local address parts are returnedas machine format integer values.INTERNET ADDRESSESInternet addresses are typically specified in dotted decimal notation or as a 4-byte number.  Values specified using the dotted decimal notation take one of the following forms:.CS	a.b.c.d	a.b.c	a.b	a.CEIf four parts are specified, each is interpreted as a byte of data andassigned, from left to right, to the four bytes of an Internet address.Note that when an Internet address is viewed as a 32-bit integer quantityon any MC68000 family machine, the bytes referred to above appear as"a.b.c.d" and are ordered from left to right.If a three-part address is specified, the last part is interpreted as a16-bit quantity and placed in the right-most two bytes of the networkaddress.  This makes the three-part address format convenient forspecifying Class B network addresses as "128.net.host".If a two-part address is supplied, the last part is interpreted as a24-bit quantity and placed in the right-most three bytes of the networkaddress.  This makes the two-part address format convenient for specifyingClass A network addresses as "net.host".If only one part is given, the value is stored directly in the networkaddress without any byte rearrangement.Although dotted decimal notation is the default, it is possible to use the dot notation with hexadecimal or octal numbers.  The base is indicatedusing the same prefixes as are used in C.  That is, a leading 0x or 0X indicates a hexadecimal number.  A leading 0 indicates anoctal number.  If there is no prefix, the number is interpreted as decimal.To use this feature, include the following component:INCLUDE_NETWRS_INETLIBINCLUDE FILES:inetLib.h, inet.hSEE ALSO: UNIX BSD 4.3 manual entry for inet(3N)*/#include "vxWorks.h"#include "sys/types.h"#include "ctype.h"#include "netinet/in.h"#include "memLib.h"#include "string.h"#include "inetLib.h"#include "stdlib.h"#include "errnoLib.h"#include "stdio.h"/********************************************************************************* inet_addr - convert a dot notation Internet address to a long integer** This routine interprets an Internet address.  All the network library* routines call this routine to interpret entries in the data bases* which are expected to be an address.  The value returned is in network order.* Numbers will be interpreted as octal if preceded by a zero (e.g. "017.0.0.3"),* as hexadecimal if preceded by 0x (e.g. "0x17.0.0.4"), and as decimal in all* other cases.** EXAMPLE* The following example returns 0x5a000002:* .CS*     inet_addr ("90.0.0.2");* .CE** RETURNS: The Internet address, or ERROR.*/u_long inet_addr    (    register char *inetString    /* string inet address */    )    {#define MAX_PARTS 4 	/* Maximum number of parts in an IP address. */    register u_long val, base, n;    register char c;    u_long parts[MAX_PARTS], *pp = parts;    /* check for NULL pointer */    if (inetString == (char *) NULL)	{	(void) errnoSet (S_inetLib_ILLEGAL_INTERNET_ADDRESS);	return (ERROR);	}again:    /* Collect number up to ``.''.  Values are specified as for C:     * 0x=hex, 0=octal, other=decimal. */    val = 0; base = 10;    if (*inetString == '0')	{	base = 8, inetString++;        if (*inetString == 'x' || *inetString == 'X')	    base = 16, inetString++;        }    while ((c = *inetString))	{	if (isdigit ((int) c))	    {	    val = (val * base) + (c - '0');	    inetString++;	    continue;	    }	if (base == 16 && isxdigit ((int) c))	    {	    val = (val << 4) + (c + 10 - (islower ((int) c) ? 'a' : 'A'));		inetString++;		continue;	    }	    break;	} /* while */    if (*inetString == '.')	{	/*	 * Internet format:	 *	a.b.c.d	 *	a.b.c	(with c treated as 16-bits)	 *	a.b	(with b treated as 24 bits)	 * Check each value for greater than 0xff for each part of the IP addr.	 */	if ((pp >= parts + (MAX_PARTS - 1)) || val > 0xff)	    {	    (void) errnoSet (S_inetLib_ILLEGAL_INTERNET_ADDRESS);	    return (ERROR);	    }	*pp++ = val, inetString++;	goto again;	}    /* Check for trailing characters */    if (*inetString && !isspace ((int) *inetString)) 	{	(void) errnoSet (S_inetLib_ILLEGAL_INTERNET_ADDRESS);	return (ERROR);	}    *pp++ = val;    /* Concoct the address according to the number of parts specified. */    n = pp - parts;    switch ((int) n)	{	case 1:				/* a -- 32 bits */	    val = parts[0];	    break;	case 2:				/* a.b -- 8.24 bits */	    if (val > 0xffffff)	        {		(void) errnoSet (S_inetLib_ILLEGAL_INTERNET_ADDRESS);		return (ERROR);		}	    val = (parts[0] << 24) | parts[1];	    break;	case 3:				/* a.b.c -- 8.8.16 bits */	    if (val > 0xffff)	        {		(void) errnoSet (S_inetLib_ILLEGAL_INTERNET_ADDRESS);		return (ERROR);		}	    val = (parts[0] << 24) | (parts[1] << 16) | parts[2];	    break;	case 4:				/* a.b.c.d -- 8.8.8.8 bits */	    if (val > 0xff)	        {		(void) errnoSet (S_inetLib_ILLEGAL_INTERNET_ADDRESS);		return (ERROR);		}	    val = (parts[0] << 24) | (parts[1] << 16) |		  (parts[2] << 8) | parts[3];	    break;	default:	    (void) errnoSet (S_inetLib_ILLEGAL_INTERNET_ADDRESS);	    return (ERROR);	}    return (htonl (val));    }#ifndef	STANDALONE_AGENT/********************************************************************************* inet_lnaof - get the local address (host number) from the Internet address** This routine returns the local network address portion of an Internet address.* The routine handles class A, B, and C network number formats.** EXAMPLE* The following example returns 2:* .CS*     inet_lnaof (0x5a000002);* .CE** RETURNS: The local address portion of <inetAddress>.*/int inet_lnaof    (    int inetAddress   /* inet addr from which to extract local portion */    )    {    register u_long i = ntohl ((u_long) inetAddress);    if (IN_CLASSA (i))	return ((i) &IN_CLASSA_HOST);    else if (IN_CLASSB (i))	return ((i) &IN_CLASSB_HOST);    else if (IN_CLASSC (i))	return ((i) &IN_CLASSC_HOST);    else	return ((i) &IN_CLASSD_HOST);     }/********************************************************************************* inet_makeaddr_b - form an Internet address from network and host numbers** This routine constructs the Internet address from the network number and* local host address.  This routine is identical to the UNIX inet_makeaddr()* routine except that you must provide a buffer for the resulting value.** EXAMPLE* The following copies the address 0x5a000002 to the location * pointed to by <pInetAddr>:* .CS*     inet_makeaddr_b (0x5a, 2, pInetAddr);* .CE** RETURNS: N/A*/void inet_makeaddr_b    (

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品综合二区| 欧美日韩国产首页| 色偷偷久久人人79超碰人人澡| 在线观看网站黄不卡| www欧美成人18+| 亚洲综合成人在线视频| 国产精品羞羞答答xxdd| 91精品欧美福利在线观看 | 成人福利视频网站| 欧美日韩另类国产亚洲欧美一级| 国产精品无码永久免费888| 蜜桃视频第一区免费观看| 91麻豆精东视频| 国产精品成人免费在线| 国产一区二区精品久久99| 欧美日韩国产小视频| 亚洲免费电影在线| gogogo免费视频观看亚洲一| 亚洲精品在线电影| 理论片日本一区| 欧美福利电影网| 婷婷综合久久一区二区三区| 欧洲国内综合视频| 一区二区三区四区不卡视频| 色视频成人在线观看免| 亚洲九九爱视频| 97精品超碰一区二区三区| 国产精品久久99| 成人av在线观| 亚洲免费观看高清完整版在线观看熊| 成人午夜免费视频| 亚洲欧洲三级电影| 91免费精品国自产拍在线不卡| 国产精品美女久久久久aⅴ国产馆| 韩国av一区二区| 久久久综合视频| 成人免费观看av| 亚洲色图欧洲色图| 欧美亚洲日本国产| 视频一区欧美日韩| 精品欧美一区二区久久| 国产一区欧美一区| 国产精品另类一区| caoporn国产一区二区| 专区另类欧美日韩| 欧美日韩一级大片网址| 青娱乐精品视频| 久久久www免费人成精品| 国产91精品免费| 亚洲精品国产无套在线观| 欧美综合天天夜夜久久| 免费视频一区二区| 国产欧美日韩在线视频| eeuss鲁片一区二区三区在线观看| 亚洲男同性视频| 欧美一区二区免费视频| 国产一区二区福利视频| 亚洲三级在线观看| 欧美电视剧免费全集观看| 国产凹凸在线观看一区二区| 亚洲欧洲综合另类| 欧美电视剧在线看免费| caoporn国产一区二区| 午夜精品免费在线观看| 久久亚洲精华国产精华液 | 91麻豆精品国产91久久久| 黄色精品一二区| 亚洲人成电影网站色mp4| 欧美日韩成人综合天天影院| 国产福利精品导航| 亚洲一级二级三级在线免费观看| 欧美成人一区二区| 色婷婷激情一区二区三区| 久久66热偷产精品| 一区二区三区丝袜| 久久天天做天天爱综合色| 欧洲国内综合视频| 成人精品视频一区二区三区| 五月综合激情网| 亚洲天堂成人在线观看| 精品日韩av一区二区| 欧美三级在线视频| 97se亚洲国产综合自在线不卡| 日韩成人午夜电影| 亚洲六月丁香色婷婷综合久久 | 久久av资源站| 一区二区三区在线视频免费观看| 久久综合精品国产一区二区三区| 欧美最猛黑人xxxxx猛交| 国产成人在线免费| 久久精品国产精品亚洲精品| 亚洲一区免费在线观看| 中文字幕一区视频| 国产欧美一区二区三区在线老狼| 91精品国产综合久久久久久久久久 | 国产精品久久久久久亚洲伦| 日韩欧美色综合网站| 欧美午夜片在线看| proumb性欧美在线观看| 国产精品一区二区不卡| 国产资源精品在线观看| 毛片不卡一区二区| 日本一道高清亚洲日美韩| 亚洲自拍与偷拍| 亚洲影视在线播放| 玉足女爽爽91| 亚洲精品国产视频| 亚洲影视在线播放| 五月婷婷综合激情| 同产精品九九九| 日本女优在线视频一区二区| 天堂一区二区在线免费观看| 亚洲一卡二卡三卡四卡五卡| 亚洲综合免费观看高清在线观看| 亚洲主播在线播放| 一区二区激情小说| 亚洲超碰精品一区二区| 亚洲国产精品视频| 天天综合日日夜夜精品| 天堂影院一区二区| 久久激情综合网| 国产一区二区免费看| 成人一区二区在线观看| 97久久精品人人爽人人爽蜜臀| 99久久99久久精品免费观看| 在线精品亚洲一区二区不卡| 欧美精品在线观看播放| 欧美一区二区三区免费| 精品国产网站在线观看| 国产欧美日韩另类视频免费观看 | 日韩一区二区电影| 精品对白一区国产伦| 国产精品免费视频网站| 一区二区三区在线免费播放| 秋霞午夜av一区二区三区| 精品一区二区成人精品| 成人黄动漫网站免费app| 色综合中文综合网| 中文字幕在线观看一区| 依依成人综合视频| 日韩高清在线电影| 国产成人在线观看免费网站| 91视频观看视频| 91精品国产色综合久久不卡蜜臀| 精品国产乱码久久久久久夜甘婷婷| 久久久久久久久一| 一级女性全黄久久生活片免费| 日本三级亚洲精品| 99久久久免费精品国产一区二区| 精品污污网站免费看| 精品国产sm最大网站免费看| 亚洲丝袜制服诱惑| 久久国产精品色| 色综合色狠狠天天综合色| 91精品国产全国免费观看 | 91在线视频播放| 日韩欧美在线不卡| 亚洲精品ww久久久久久p站| 美女在线视频一区| 91久久久免费一区二区| 久久久美女毛片| 五月激情丁香一区二区三区| 成人黄色综合网站| 日韩免费观看高清完整版在线观看| 国产精品九色蝌蚪自拍| 蜜桃视频一区二区三区 | 日韩专区一卡二卡| eeuss鲁片一区二区三区在线观看| 欧美一卡二卡在线| 亚洲精品水蜜桃| 成人动漫中文字幕| 久久丝袜美腿综合| 久久精品久久久精品美女| 欧美性感一区二区三区| 国产精品理论片| 国产一区二区三区在线观看免费视频| 欧美亚洲一区二区在线| 日韩美女视频19| 国产成人av电影| 久久网站热最新地址| 美女看a上一区| 欧美精品黑人性xxxx| 一个色综合av| 91免费在线播放| 中文字幕一区不卡| 成人午夜免费av| 国产免费观看久久| 国产一区二区三区免费看| 日韩精品中文字幕一区二区三区| 亚洲bt欧美bt精品| 欧美体内she精视频| 亚洲精品视频免费看| 91网站在线播放| 亚洲精品日产精品乱码不卡| 99久久婷婷国产综合精品电影| 国产精品久久久久久久久久免费看| 国产99久久久精品| 中文字幕不卡三区| 成人av资源在线| 国产精品国产a级|