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

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

?? raw_ip.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* raw_ip.c - raw interface to IP protocol *//* Copyright 1984 - 2002 Wind River Systems, Inc. */#include "copyright_wrs.h"/* * Copyright (c) 1982, 1986, 1988, 1993, 1995 *	The Regents of the University of California.  All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software *    must display the following acknowledgement: *	This product includes software developed by the University of *	California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors *    may be used to endorse or promote products derived from this software *    without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND 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 REGENTS OR 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. * *	@(#)raw_ip.c	8.7 (Berkeley) 5/15/95 *//*modification history--------------------01j,20may02,vvv  fixed rip_input to send ICMP protocol unreachable errors 		 only when called directly from ip_input (SPR #75405)01i,21mar02,rae  Allow ICMP to be excluded (SPR #73703)01h,12oct01,rae  merge from truestack ver 01o, base 01g (SPRs 69657,                 35258, etc)01g,26aug98,n_s  corrected rip_output for IP_HDRINCL case. spr #2224601f,26aug98,n_s  added return val check for M_PREPEND in rip_output and                 mBufClGet in rip_ctloutput. spr # 22238.01e,16apr97,vin	 added PRU_CONTROL support to rip_usrreq().01d,08apr97,vin  include pcb hashing changes from FREEBSD2.2.1, removed		 ip_mrouter, added mCastRouteCmdHook. removed all MROUTING01c,31jan97,vin  changed declaration according to prototype decl in protosw.h01b,22nov96,vin  added cluster support replaced m_get(..) with mBufClGet(..).01a,03mar96,vin  created from BSD4.4 stuff,integrated with 02i of raw_usrreq.c*//*DESCRIPTION*/#include "vxWorks.h"#include "net/mbuf.h"#include "sys/socket.h"#include "net/protosw.h"#include "net/socketvar.h"#include "errno.h"#include "net/if.h"#include "net/route.h"#include "net/raw_cb.h"#include "netinet/in.h"#include "netinet/in_systm.h"#include "netinet/in_var.h"#include "netinet/ip.h"#include "netinet/ip_icmp.h"#include "netinet/ip_var.h"#include "netinet/ip_mroute.h"#include "netinet/in_pcb.h"#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET#include "wvNetLib.h"#endif#endif/* externs */extern FUNCPTR _mCastRouteCmdHook;	/* WRS mcast route command hook */extern VOIDFUNCPTR _icmpErrorHook;extern int icmp_ctloutput (int, struct socket *, int, int, struct mbuf **);extern struct protosw inetsw[];extern u_char ip_protox[IPPROTO_MAX];/* globals */#ifndef VIRTUAL_STACKstatic struct inpcbhead ripcb;static struct inpcbinfo ripcbinfo;static struct sockaddr_in ripsrc = { sizeof(ripsrc), AF_INET };#endif /* VIRTUAL_STACK */#ifdef VIRTUAL_STACK#include "netinet/vsLib.h"#endif/* * Nominal space allocated to a raw ip socket. */#define	RIPSNDQ		8192#define	RIPRCVQ		8192/* locals */static int _mCastCtlOutput (int option, int optName, struct socket * sockPtr,                            struct mbuf ** pPtrMbuf); #ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /* Set common fields of event identifiers for this module. */LOCAL UCHAR wvNetModuleId = WV_NET_RAWIP_MODULE;   /* Value for raw_ip.c */LOCAL UCHAR wvNetLocalFilter = WV_NET_NONE;     /* Available event filter */LOCAL ULONG wvNetEventId;       /* Event identifier: see wvNetLib.h */#endif    /* INCLUDE_WVNET */#endif/* * Raw interface to IP protocol. *//* * Initialize raw connection block q. */voidrip_init(){#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /* WV_NET_VERBOSE event */    WV_NET_MARKER_0 (NET_AUX_EVENT, WV_NET_VERBOSE, 31, 11,                     WV_NETEVENT_RAWIPINIT_START)#endif  /* INCLUDE_WVNET */#endif	LIST_INIT(&ripcb);        ripcbinfo.listhead = &ripcb;        /*         * XXX We don't use the hash list for raw IP, but it's easier         * to allocate a one entry hash list than it is to check all         * over the place for hashbase == NULL.         */        ripcbinfo.hashbase = hashinit(1, MT_PCB, &ripcbinfo.hashmask);#ifdef VIRTUAL_STACK        rip_sendspace = RIPSNDQ;        rip_recvspace = RIPRCVQ;        ripsrc.sin_len = sizeof(struct sockaddr_in);        ripsrc.sin_family = AF_INET;#endif /* VIRTUAL_STACK */}/* * Setup generic address and protocol structures * for raw_input routine, then pass them along with * mbuf chain. */voidrip_input(m)	struct mbuf *m;{	register struct ip *ip = mtod(m, struct ip *);	register struct inpcb *inp;	struct socket *last = 0;#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /* WV_NET_NOTICE event */    WV_NET_EVENT_0 (NET_CORE_EVENT, WV_NET_NOTICE, 14, 7,                     WV_NETEVENT_RAWIPIN_START, WV_NET_RECV)#endif  /* INCLUDE_WVNET */#endif	ripsrc.sin_addr = ip->ip_src;        * (int *)ripsrc.sin_zero = m->m_pkthdr.rcvif->if_index;        for (inp = ripcb.lh_first; inp != NULL; inp = inp->inp_list.le_next) {		if (inp->inp_ip.ip_p && inp->inp_ip.ip_p != ip->ip_p)			continue;		if (inp->inp_laddr.s_addr &&		    inp->inp_laddr.s_addr != ip->ip_dst.s_addr)			continue;		if (inp->inp_faddr.s_addr &&		    inp->inp_faddr.s_addr != ip->ip_src.s_addr)			continue;		if (last) {			struct mbuf *n;			if ((n = m_copy(m, 0, (int)M_COPYALL))) {				if (sbappendaddr(&last->so_rcv,				    (struct sockaddr *)&ripsrc, n,				    (struct mbuf *)0) == 0)                                    {#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /* WV_NET_WARNING event */                WV_NET_ADDRIN_EVENT_3 (NET_CORE_EVENT, WV_NET_WARNING, 9, 6,                                       ip->ip_src.s_addr, ip->ip_dst.s_addr,                                       WV_NETEVENT_RAWIPIN_LOST, WV_NET_RECV,                                       last->so_fd, ip->ip_src.s_addr,                                       ip->ip_dst.s_addr)#endif  /* INCLUDE_WVNET */#endif					/* should notify about lost packet */					m_freem(n);                                    }				else					sorwakeup(last);			}		}		last = inp->inp_socket;	}	if (last) {		if (sbappendaddr(&last->so_rcv, (struct sockaddr *)&ripsrc,		    m, (struct mbuf *)0) == 0)                    {#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /* WV_NET_WARNING event */                WV_NET_ADDRIN_EVENT_3 (NET_CORE_EVENT, WV_NET_WARNING, 9, 6,                                       ip->ip_src.s_addr, ip->ip_dst.s_addr,                                       WV_NETEVENT_RAWIPIN_LOST, WV_NET_RECV,                                       last->so_fd, ip->ip_src.s_addr,                                       ip->ip_dst.s_addr)#endif  /* INCLUDE_WVNET */#endif			m_freem(m);                    }		else			sorwakeup(last);	} else {#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /* WV_NET_ERROR event */            WV_NET_ADDRIN_EVENT_2 (NET_CORE_EVENT, WV_NET_ERROR, 35, 5,                                   ip->ip_src.s_addr, ip->ip_dst.s_addr,                                   WV_NETEVENT_RAWIPIN_NOSOCK, WV_NET_RECV,                                   ip->ip_src.s_addr, ip->ip_dst.s_addr)#endif  /* INCLUDE_WVNET */#endif                if ((_icmpErrorHook) && 		    (inetsw[ip_protox[ip->ip_p]].pr_protocol == IPPROTO_RAW))                    _icmpErrorHook (m, ICMP_UNREACH, ICMP_UNREACH_PROTOCOL,                                     ip->ip_src.s_addr, 0);		m_freem(m);#ifdef VIRTUAL_STACK		_ipstat.ips_noproto++;		_ipstat.ips_delivered--;#else		ipstat.ips_noproto++;		ipstat.ips_delivered--;#endif /* VIRTUAL_STACK */	}	return;}/* * Generate IP header and pass packet to ip_output. * Tack on options user may have setup with control call. */intrip_output(m, so, dst)	register struct mbuf *m;	struct socket *so;	u_long dst;{	register struct ip *ip;	register struct inpcb *inp = sotoinpcb(so);	struct mbuf *opts;	int flags = (so->so_options & SO_DONTROUTE) | IP_ALLOWBROADCAST;        int result;	/*	 * If the user handed us a complete IP packet, use it.	 * Otherwise, allocate an mbuf for a header and fill it in.	 */	if ((inp->inp_flags & INP_HDRINCL) == 0) {		M_PREPEND(m, sizeof(struct ip), M_WAIT);		if (m == (struct mbuf *) NULL)		    {		    return (ENOBUFS);		    }		    		ip = mtod(m, struct ip *);		ip->ip_tos = 0;		ip->ip_off = 0;		ip->ip_p = inp->inp_ip.ip_p;		ip->ip_len = m->m_pkthdr.len;		ip->ip_src = inp->inp_laddr;		ip->ip_dst.s_addr = dst;		ip->ip_ttl = inp->inp_ip.ip_ttl;		opts = inp->inp_options;	} else {	        if (m->m_len < sizeof (struct ip) &&		    (m = m_pullup (m, sizeof (struct ip))) == NULL)		    {		    return (ENOBUFS);		    }		ip = mtod(m, struct ip *);		if (ip->ip_id == 0)#ifdef VIRTUAL_STACK			ip->ip_id = htons(_ip_id++);#else			ip->ip_id = htons(ip_id++);#endif /* VIRTUAL_STACK */		opts = NULL;		/* XXX prevent ip_output from overwriting header fields */		flags |= IP_RAWOUTPUT;#ifdef VIRTUAL_STACK		_ipstat.ips_rawout++;#else		ipstat.ips_rawout++;#endif /* VIRTUAL_STACK */	}    result = ip_output(m, opts, &inp->inp_route, flags, inp->inp_moptions);#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /* WV_NET_NOTICE event */    WV_NET_ADDROUT_EVENT_3 (NET_CORE_EVENT, WV_NET_NOTICE, 15, 8,                            inp->inp_laddr.s_addr, dst,                            WV_NETEVENT_RAWIPOUT_FINISH, WV_NET_SEND,                            result, inp->inp_laddr.s_addr, dst)#endif  /* INCLUDE_WVNET */#endif    return (result);}/* * Raw IP socket option processing. */intrip_ctloutput(op, so, level, optname, m)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一本一本久久a久久精品综合麻豆| 国产综合色在线| 欧美高清在线一区二区| 日韩一区二区三区在线| 欧美区一区二区三区| 欧洲一区在线电影| 欧美私模裸体表演在线观看| 在线免费不卡电影| 欧美三级蜜桃2在线观看| 欧美在线观看一区| 欧美午夜不卡视频| 欧美一区二区三区四区五区 | 久久色.com| 国产亚洲欧美色| 亚洲国产成人午夜在线一区| 亚洲国产高清aⅴ视频| 亚洲欧美精品午睡沙发| 亚洲精品欧美激情| 日韩在线卡一卡二| 激情综合色综合久久综合| 国产成人免费视频网站| 不卡在线视频中文字幕| 色美美综合视频| 91麻豆精品国产自产在线| 国产视频在线观看一区二区三区| 国产成人av一区| 成人午夜免费av| 欧美伊人久久大香线蕉综合69| 91精品国模一区二区三区| 国产欧美日韩激情| 亚洲激情图片qvod| 精品在线播放午夜| 91久久精品网| 国产亚洲精品福利| 亚洲一区二区三区四区在线| 激情五月婷婷综合| 99久久久久久| 精品福利一区二区三区| 一区二区三区四区激情| 黑人巨大精品欧美一区| 色先锋资源久久综合| 亚洲精品一区二区三区99| 亚洲精品成a人| 高清在线不卡av| 欧美日韩免费电影| 亚洲欧美一区二区视频| 九一九一国产精品| 欧美亚洲国产一区在线观看网站| 国产视频一区在线播放| 午夜精品成人在线| www.亚洲免费av| 久久久久久日产精品| 无吗不卡中文字幕| 91九色最新地址| 自拍偷拍国产亚洲| 国产黄人亚洲片| 日韩午夜精品电影| 三级亚洲高清视频| 欧美日韩在线亚洲一区蜜芽| 国产精品久久久久一区二区三区共| 全国精品久久少妇| 欧美亚洲图片小说| 亚洲男同1069视频| 成人黄色小视频在线观看| 久久品道一品道久久精品| 爽好多水快深点欧美视频| 欧美丝袜自拍制服另类| 亚洲永久精品大片| 一本色道亚洲精品aⅴ| 中文字幕亚洲区| 99视频有精品| 国产精品久久久久久久浪潮网站| 国产白丝网站精品污在线入口| 欧美mv日韩mv国产网站app| 美女在线一区二区| 日韩欧美在线影院| 日本成人在线网站| 日韩免费视频一区| 国产在线麻豆精品观看| 欧美精品一区二区三区蜜臀| 黄色小说综合网站| 精品国产不卡一区二区三区| 狠狠色丁香婷婷综合| 久久天堂av综合合色蜜桃网| 国产一区二区不卡老阿姨| 久久精品一区二区三区不卡 | 中文字幕一区在线观看| 高清国产一区二区三区| 中文字幕一区二区三区四区不卡| 色欧美日韩亚洲| 亚洲成人精品一区| 91麻豆精品国产| 国产精华液一区二区三区| 国产精品乱码人人做人人爱| 91亚洲永久精品| 午夜欧美在线一二页| 日韩精品最新网址| 成人中文字幕合集| 亚洲综合免费观看高清完整版在线 | 国产无一区二区| 成人久久18免费网站麻豆| 一区二区三区欧美| 欧美一区午夜视频在线观看| 国产一区高清在线| 亚洲精品老司机| 欧美不卡一区二区三区四区| jizz一区二区| 亚洲成人av在线电影| 精品理论电影在线观看 | 亚洲精品国产视频| 日韩一区二区三区视频在线观看| 国产超碰在线一区| 亚洲成av人片在线| 国产精品网站在线| 欧美一区二区播放| av中文字幕一区| 韩国女主播成人在线| 亚洲免费高清视频在线| 久久综合一区二区| 欧美午夜精品理论片a级按摩| 国产呦精品一区二区三区网站| 亚洲日本丝袜连裤袜办公室| 欧美r级在线观看| 欧美色图第一页| 国产91富婆露脸刺激对白| 午夜精品久久久| 亚洲免费在线观看视频| 国产精品2024| 一区二区三区波多野结衣在线观看| 日韩精品中文字幕在线不卡尤物| 色诱视频网站一区| 国产乱人伦偷精品视频免下载| 亚洲午夜免费视频| 国产精品三级av| 2023国产精品视频| 日韩欧美一二区| 欧美一级视频精品观看| 色婷婷久久久亚洲一区二区三区 | 欧美日韩国产精品自在自线| 国产成人综合网站| 国产综合色精品一区二区三区| 丝袜诱惑亚洲看片| 亚洲成人一二三| 一卡二卡三卡日韩欧美| 中文字幕欧美一| 中文字幕国产一区| 日本一区二区视频在线观看| 精品国产伦一区二区三区观看方式| 欧美酷刑日本凌虐凌虐| 欧美亚洲一区三区| 在线日韩av片| 91精品91久久久中77777| 成人国产免费视频| 成人开心网精品视频| 成人av第一页| youjizz国产精品| 91免费国产在线观看| 91片黄在线观看| 欧美亚洲日本一区| 7777精品伊人久久久大香线蕉超级流畅 | 欧美精品乱人伦久久久久久| 欧美绝品在线观看成人午夜影视| 欧美老年两性高潮| 欧美va亚洲va香蕉在线| 久久精品一区蜜桃臀影院| 国产精品系列在线| 亚洲视频在线一区| 亚洲成人激情自拍| 久久精品国产澳门| 国产激情视频一区二区在线观看 | 欧美日韩一区视频| 91精品在线麻豆| 久久久www免费人成精品| 中文字幕一区av| 日韩激情中文字幕| 国产在线观看免费一区| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 国产精品一二三四区| 99精品国产91久久久久久 | 日本免费新一区视频| 国产精品一区免费视频| 色综合视频一区二区三区高清| 欧美久久一二区| 久久久.com| 亚洲自拍都市欧美小说| 国产综合成人久久大片91| 99视频在线精品| 欧美一区二区三区精品| 国产精品看片你懂得| 免费欧美在线视频| 国产 欧美在线| 这里是久久伊人| 最近中文字幕一区二区三区| 蜜桃av噜噜一区| 色综合久久久久综合99| 久久色中文字幕| 亚洲成人综合视频| av色综合久久天堂av综合| 91麻豆精品久久久久蜜臀 | 精品久久久久久久一区二区蜜臀|