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

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

?? udp.cc

?? ns2.31下的UWB(Ultra WideBand)實現
?? CC
字號:
/* -*-	Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- *//* * Copyright (C) Xerox Corporation 1997. All rights reserved. *   * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA * * Linking this file statically or dynamically with other modules is making * a combined work based on this file.  Thus, the terms and conditions of * the GNU General Public License cover the whole combination. * * In addition, as a special exception, the copyright holders of this file * give you permission to combine this file with free software programs or * libraries that are released under the GNU LGPL and with code included in * the standard release of ns-2 under the Apache 2.0 license or under * otherwise-compatible licenses with advertising requirements (or modified * versions of such code, with unchanged license).  You may copy and * distribute such a system following the terms of the GNU GPL for this * file and the licenses of the other code concerned, provided that you * include the source code of that other code when and as the GNU GPL * requires distribution of source code. * * Note that people who make modified versions of this file are not * obligated to grant this special exception for their modified versions; * it is their choice whether to do so.  The GNU General Public License * gives permission to release a modified version without this exception; * this exception also makes it possible to release a modified version * which carries forward this exception. */#ifndef lintstatic const char rcsid[] =    "@(#) $Header: /cvsroot/nsnam/ns-2/apps/udp.cc,v 1.21 2005/08/26 05:05:28 tomh Exp $ (Xerox)";#endif#include "udp.h"#include "rtp.h"#include "random.h"#include "address.h"#include "ip.h"// Dapengextern int global_flowid;extern int flow_to_tag[];static class UdpAgentClass : public TclClass {public:	UdpAgentClass() : TclClass("Agent/UDP") {}	TclObject* create(int, const char*const*) {		return (new UdpAgent());	}} class_udp_agent;UdpAgent::UdpAgent() : Agent(PT_UDP), seqno_(-1){	bind("packetSize_", &size_);	// Dapeng	global_flowid++;        flow_id = global_flowid;        flow_to_tag[flow_id] = -1;}UdpAgent::UdpAgent(packet_t type) : Agent(type){	bind("packetSize_", &size_);	global_flowid++;        flow_id = global_flowid;        flow_to_tag[flow_id] = -1;}// put in timestamp and sequence number, even though UDP doesn't usually // have one.void UdpAgent::sendmsg(int nbytes, AppData* data, const char* flags){	Packet *p;	int n;	assert (size_ > 0);	n = nbytes / size_;	if (nbytes == -1) {		printf("Error:  sendmsg() for UDP should not be -1\n");		return;	}		// If they are sending data, then it must fit within a single packet.	if (data && nbytes > size_) {		printf("Error: data greater than maximum UDP packet size\n");		return;	}	double local_time = Scheduler::instance().clock();	while (n-- > 0) {		p = allocpkt();		hdr_cmn::access(p)->size() = size_;		// Dapeng		hdr_cmn::access(p)->_flowid_ = flow_id;                hdr_cmn::access(p)->_tag_ = -1;		hdr_rtp* rh = hdr_rtp::access(p);		rh->flags() = 0;		rh->seqno() = ++seqno_;		hdr_cmn::access(p)->timestamp() = 		    (u_int32_t)(SAMPLERATE*local_time);		// add "beginning of talkspurt" labels (tcl/ex/test-rcvr.tcl)		if (flags && (0 ==strcmp(flags, "NEW_BURST")))			rh->flags() |= RTP_M;		p->setdata(data);		target_->recv(p);	}	n = nbytes % size_;	if (n > 0) {		p = allocpkt();		hdr_cmn::access(p)->size() = n;		// Dapeng		hdr_cmn::access(p)->_flowid_ = flow_id;                hdr_cmn::access(p)->_tag_ = -1;		hdr_rtp* rh = hdr_rtp::access(p);		rh->flags() = 0;		rh->seqno() = ++seqno_;		hdr_cmn::access(p)->timestamp() = 		    (u_int32_t)(SAMPLERATE*local_time);		// add "beginning of talkspurt" labels (tcl/ex/test-rcvr.tcl)		if (flags && (0 == strcmp(flags, "NEW_BURST")))			rh->flags() |= RTP_M;		p->setdata(data);		target_->recv(p);	}	idle();}void UdpAgent::recv(Packet* pkt, Handler*){	if (app_ ) {		// If an application is attached, pass the data to the app		hdr_cmn* h = hdr_cmn::access(pkt);		app_->process_data(h->size(), pkt->userdata());	} else if (pkt->userdata() && pkt->userdata()->type() == PACKET_DATA) {		// otherwise if it's just PacketData, pass it to Tcl		//		// Note that a Tcl procedure Agent/Udp recv {from data}		// needs to be defined.  For example,		//		// Agent/Udp instproc recv {from data} {puts data}		PacketData* data = (PacketData*)pkt->userdata();		hdr_ip* iph = hdr_ip::access(pkt);                Tcl& tcl = Tcl::instance();		tcl.evalf("%s process_data %d {%s}", name(),		          iph->src_.addr_ >> Address::instance().NodeShift_[1],			  data->data());	}	Packet::free(pkt);}int UdpAgent::command(int argc, const char*const* argv){	if (argc == 4) {		if (strcmp(argv[1], "send") == 0) {			PacketData* data = new PacketData(1 + strlen(argv[3]));			strcpy((char*)data->data(), argv[3]);			sendmsg(atoi(argv[2]), data);			return (TCL_OK);		}	} else if (argc == 5) {		if (strcmp(argv[1], "sendmsg") == 0) {			PacketData* data = new PacketData(1 + strlen(argv[3]));			strcpy((char*)data->data(), argv[3]);			sendmsg(atoi(argv[2]), data, argv[4]);			return (TCL_OK);		}	}	return (Agent::command(argc, argv));}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区在线电影| 欧美在线不卡一区| 六月丁香综合在线视频| 午夜精品久久久久久久99樱桃| 国产精品乱码一区二三区小蝌蚪| 久久人人97超碰com| www国产亚洲精品久久麻豆| 欧美videofree性高清杂交| 日韩欧美国产系列| 精品日本一线二线三线不卡| 91麻豆精品国产91久久久使用方法 | 欧美色视频一区| 久久久亚洲精品石原莉奈| 精品国产露脸精彩对白| 精品99久久久久久| 中文字幕不卡三区| 亚洲欧洲另类国产综合| 亚洲综合精品久久| 午夜精品久久久久久不卡8050 | 日韩三级中文字幕| 精品国产成人在线影院| 国产无一区二区| 亚洲欧美成aⅴ人在线观看 | 全国精品久久少妇| 捆绑调教美女网站视频一区| 国产精品羞羞答答xxdd| 91麻豆精东视频| 日本韩国一区二区三区视频| 337p亚洲精品色噜噜| wwww国产精品欧美| 亚洲免费在线观看| 麻豆91精品视频| 9久草视频在线视频精品| 欧美日韩日本视频| 日本一区二区成人| 亚洲国产欧美在线| 国产成人午夜电影网| 91官网在线观看| 2021中文字幕一区亚洲| 日韩码欧中文字| 精品一区二区国语对白| 成人国产精品免费观看动漫| 欧美日韩国产大片| 中文字幕一区二区三区在线播放| 亚洲成人av免费| 99热精品一区二区| 26uuu亚洲综合色| 亚洲无人区一区| 成人免费高清在线| 精品国偷自产国产一区| 夜夜操天天操亚洲| 国产在线观看免费一区| 欧美色图一区二区三区| 国产嫩草影院久久久久| 久久精品国产一区二区| 欧美三级欧美一级| 亚洲欧美一区二区三区国产精品| 久久99九九99精品| 制服丝袜av成人在线看| 亚洲另类春色国产| 99久久婷婷国产精品综合| 26uuu亚洲婷婷狠狠天堂| 天天操天天综合网| 欧美午夜电影网| 亚洲乱码中文字幕| 99精品视频在线播放观看| 国产欧美视频在线观看| 久久精品国产一区二区三区免费看 | 欧美一区二区三区视频免费 | 久久精品一区二区三区av| 天天综合色天天综合色h| 欧美性xxxxxx少妇| 一区二区国产盗摄色噜噜| 91在线视频网址| 亚洲靠逼com| 欧美性猛交xxxxxxxx| 一区二区三区中文字幕| 91丝袜美腿高跟国产极品老师 | 不卡的av网站| 中文字幕视频一区二区三区久| 成人久久久精品乱码一区二区三区| 精品国产一区二区精华| 国产一区二区中文字幕| 久久久www成人免费毛片麻豆| 国产乱一区二区| 亚洲国产高清不卡| 色综合色综合色综合色综合色综合 | 日韩一区二区在线观看| 麻豆精品视频在线观看免费| 欧美成人a∨高清免费观看| 精品在线视频一区| 国产精品丝袜91| 93久久精品日日躁夜夜躁欧美| 亚洲免费观看在线观看| 91精品国产品国语在线不卡| 精品无人码麻豆乱码1区2区| 久久久精品人体av艺术| 色婷婷av一区二区三区大白胸| 亚洲精品视频一区| 91精品国产一区二区三区蜜臀| 久久精品99国产国产精| 国产欧美日韩激情| 欧美在线短视频| 国精产品一区一区三区mba桃花| 亚洲国产精品激情在线观看| 色综合一区二区三区| 婷婷亚洲久悠悠色悠在线播放| 日韩欧美一区中文| www.亚洲人| 男人的j进女人的j一区| 中文字幕在线播放不卡一区| 欧美日本不卡视频| 成人久久18免费网站麻豆 | 国产亚洲一区二区在线观看| 99精品偷自拍| 精品在线你懂的| 夜夜嗨av一区二区三区中文字幕| 日韩手机在线导航| 91精品福利在线| 高清成人免费视频| 日韩国产欧美在线播放| 国产精品国产自产拍高清av王其| 在线不卡免费欧美| 99在线精品视频| 激情图片小说一区| 亚洲成人综合视频| 亚洲日本青草视频在线怡红院| 91精品国产综合久久精品性色| 99久久精品免费看国产| 国产乱码精品一区二区三区忘忧草| 亚洲美女偷拍久久| 中文在线资源观看网站视频免费不卡| 欧美日韩精品欧美日韩精品一综合| 国产成人99久久亚洲综合精品| 蜜臀av性久久久久蜜臀aⅴ流畅| 艳妇臀荡乳欲伦亚洲一区| 国产欧美一区二区精品秋霞影院| 日韩欧美一区二区在线视频| 欧美日韩精品免费观看视频| 91一区一区三区| 成人午夜伦理影院| 福利一区二区在线观看| 精品午夜久久福利影院| 伦理电影国产精品| 麻豆精品新av中文字幕| 日韩 欧美一区二区三区| 亚洲午夜精品网| 一区二区三区自拍| 夜夜揉揉日日人人青青一国产精品| 亚洲丝袜自拍清纯另类| 国产性做久久久久久| 国产亚洲污的网站| 久久综合五月天婷婷伊人| 欧美va亚洲va| 欧美精品一区二区久久久| 51精品视频一区二区三区| 国产精品拍天天在线| 久久奇米777| 国产色产综合产在线视频| 久久久不卡影院| 国产欧美日韩在线看| 国产精品萝li| 亚洲欧美另类久久久精品2019| 亚洲美女区一区| 亚洲一区二区av电影| 日韩av电影免费观看高清完整版| 青椒成人免费视频| 国产在线看一区| 国产v日产∨综合v精品视频| 99久久综合99久久综合网站| 99re这里只有精品6| 欧美午夜电影在线播放| 欧美一二三区精品| 国产女主播在线一区二区| 亚洲视频在线观看三级| 视频一区中文字幕| 激情欧美一区二区三区在线观看| 国产剧情在线观看一区二区| a4yy欧美一区二区三区| 欧美人与z0zoxxxx视频| 久久精品欧美日韩精品| 一区二区三区不卡视频| 全国精品久久少妇| 成人免费视频视频| 欧美三级乱人伦电影| 久久久久久免费网| 亚洲电影在线播放| 国产麻豆成人精品| 欧美日韩你懂得| 欧美精品一区二区三区蜜桃 | 亚洲国产aⅴ天堂久久| 国产一区二区伦理| 91福利视频网站| 国产视频一区二区三区在线观看| 亚洲色图视频网| 国产综合色视频| 欧美怡红院视频| 国产欧美日韩卡一| 午夜精品在线视频一区| 99re这里只有精品视频首页|