/* -*- Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */
/* Modified and extended by Pablo Martin and Paula Ballester,
* Strathclyde University, Glasgow.
* June, 2003.
*/
/* Copyright (c) 2003 Strathclyde University of Glasgow, Scotland.
* 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 and binary code must contain
* the above copyright notice, this list of conditions and the following
* disclaimer.
*
* 2. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed at Strathclyde University of
* Glasgow, Scotland.
*
* 3. The name of the University may not be used to endorse or promote
* products derived from this software without specific prior written
* permission.
* STRATHCLYDE UNIVERSITY OF GLASGOW, MAKES NO REPRESENTATIONS
* CONCERNING EITHER THE MERCHANTABILITY OF THIS SOFTWARE OR THE
* SUITABILITY OF THIS SOFTWARE FOR ANY PARTICULAR PURPOSE. The software
* is provided "as is" without express or implied warranty of any kind.
*/
/*
* Copyright (c) 1997 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 Computer Systems
* Engineering Group at Lawrence Berkeley Laboratory.
* 4. Neither the name of the University nor of the Laboratory 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.
*
* @(#) $Header: /nfs/jade/vint/CVSROOT/ns-2/common/packet.h,v 1.92 2002/09/18 05:41:50 sundarra Exp $ (LBL)
*/
#ifndef ns_packet_h
#define ns_packet_h
#include <string.h>
#include <assert.h>
#include "config.h"
#include "scheduler.h"
#include "object.h"
#include "lib/bsd-list.h"
#include "packet-stamp.h"
#include "ns-process.h"
// Used by wireless routing code to attach routing agent
#define RT_PORT 255 /* port that all route msgs are sent to */
#define HDR_CMN(p) (hdr_cmn::access(p))
#define HDR_ARP(p) (hdr_arp::access(p))
#define HDR_MAC(p) (hdr_mac::access(p))
#define HDR_MAC802_11(p) ((hdr_mac802_11 *)hdr_mac::access(p))
#define HDR_MAC_TDMA(p) ((hdr_mac_tdma *)hdr_mac::access(p))
// P.M. & P.B. modifications
#define HDR_PHY_UMTS(p) (hdr_phy::access(p))
#define HDR_RLC_UMTS(p) (hdr_rlc_umts::access(p))
#define HDR_SMAC(p) ((hdr_smac *)hdr_mac::access(p))
#define HDR_LL(p) (hdr_ll::access(p))
#define HDR_IP(p) (hdr_ip::access(p))
#define HDR_RTP(p) (hdr_rtp::access(p))
#define HDR_TCP(p) (hdr_tcp::access(p))
#define HDR_SR(p) (hdr_sr::access(p))
#define HDR_TFRC(p) (hdr_tfrc::access(p))
#define HDR_TORA(p) (hdr_tora::access(p))
#define HDR_IMEP(p) (hdr_imep::access(p))
#define HDR_CDIFF(p) (hdr_cdiff::access(p)) /* chalermak's diffusion*/
//#define HDR_DIFF(p) (hdr_diff::access(p)) /* SCADD's diffusion ported into ns */
#define HDR_LMS(p) (hdr_lms::access(p))
/* --------------------------------------------------------------------*/
enum packet_t {
PT_TCP,
PT_UDP,
PT_CBR,
PT_AUDIO,
PT_VIDEO,
PT_ACK,
PT_START,
PT_STOP,
PT_PRUNE,
PT_GRAFT,
PT_GRAFTACK,
PT_JOIN,
PT_ASSERT,
PT_MESSAGE,
PT_RTCP,
PT_RTP,
PT_RTPROTO_DV,
PT_CtrMcast_Encap,
PT_CtrMcast_Decap,
PT_SRM,
/* simple signalling messages */
PT_REQUEST,
PT_ACCEPT,
PT_CONFIRM,
PT_TEARDOWN,
PT_LIVE, // packet from live network
PT_REJECT,
PT_TELNET, // not needed: telnet use TCP
PT_FTP,
PT_PARETO,
PT_EXP,
PT_INVAL,
PT_HTTP,
/* new encapsulator */
PT_ENCAPSULATED,
PT_MFTP,
/* CMU/Monarch's extnsions */
PT_ARP,
PT_MAC,
PT_TORA,
PT_DSR,
PT_AODV,
PT_IMEP,
// RAP packets
PT_RAP_DATA,
PT_RAP_ACK,
PT_TFRC,
PT_TFRC_ACK,
PT_PING,
// Diffusion packets - Chalermek
PT_DIFF,
// LinkState routing update packets
PT_RTPROTO_LS,
// MPLS LDP header
PT_LDP,
// GAF packet
PT_GAF,
// ReadAudio traffic
PT_REALAUDIO,
// Pushback Messages
PT_PUSHBACK,
// P.M. & P.B. modifications
PT_PREAMBLE, // RACH preamble to NodeB
PT_RRC_FAILURE, // PHY->RRC if there is no AICH
#ifdef HAVE_STL
// Pragmatic General Multicast
PT_PGM,
#endif //STL
// LMS packets
PT_LMS,
PT_LMS_SETUP,
// insert new packet types here
PT_NTYPE // This MUST be the LAST one
};
class p_info {
public:
p_info() {
name_[PT_TCP]= "tcp";
name_[PT_UDP]= "udp";
name_[PT_CBR]= "cbr";
name_[PT_AUDIO]= "audio";
name_[PT_VIDEO]= "video";
name_[PT_ACK]= "ack";
name_[PT_START]= "start";
name_[PT_STOP]= "stop";
name_[PT_PRUNE]= "prune";
name_[PT_GRAFT]= "graft";
name_[PT_GRAFTACK]= "graftAck";
name_[PT_JOIN]= "join";
name_[PT_ASSERT]= "assert";
name_[PT_MESSAGE]= "message";
name_[PT_RTCP]= "rtcp";
name_[PT_RTP]= "rtp";
name_[PT_RTPROTO_DV]= "rtProtoDV";
name_[PT_CtrMcast_Encap]= "CtrMcast_Encap";
name_[PT_CtrMcast_Decap]= "CtrMcast_Decap";
name_[PT_SRM]= "SRM";
name_[PT_REQUEST]= "sa_req";
name_[PT_ACCEPT]= "sa_accept";
name_[PT_CONFIRM]= "sa_conf";
name_[PT_TEARDOWN]= "sa_teardown";
name_[PT_LIVE]= "live";
name_[PT_REJECT]= "sa_reject";
name_[PT_TELNET]= "telnet";
name_[PT_FTP]= "ftp";
name_[PT_PARETO]= "pareto";
name_[PT_EXP]= "exp";
name_[PT_INVAL]= "httpInval";
name_[PT_HTTP]= "http";
name_[PT_ENCAPSULATED]= "encap";
name_[PT_MFTP]= "mftp";
name_[PT_ARP]= "ARP";
name_[PT_MAC]= "MAC";
name_[PT_TORA]= "TORA";
name_[PT_DSR]= "DSR";
name_[PT_AODV]= "AODV";
name_[PT_IMEP]= "IMEP";
name_[PT_RAP_DATA] = "rap_data";
name_[PT_RAP_ACK] = "rap_ack";
name_[PT_TFRC]= "tcpFriend";
name_[PT_TFRC_ACK]= "tcpFriendCtl";
name_[PT_PING]="ping";
/* For diffusion : Chalermek */
name_[PT_DIFF] = "diffusion";
// Link state routing updates
name_[PT_RTPROTO_LS] = "rtProtoLS";
// MPLS LDP packets
name_[PT_LDP] = "LDP";
// for GAF
name_[PT_GAF] = "gaf";
// RealAudio packets
name_[PT_REALAUDIO] = "ra";
//pushback
name_[PT_PUSHBACK] = "pushback";
// P.M. & P.B. modifications
name_[PT_PREAMBLE] = "preamble";
name_[PT_RRC_FAILURE] = "rrc_failure";
#ifdef HAVE_STL
// for PGM
name_[PT_PGM] = "PGM";
#endif //STL
// LMS entries
name_[PT_LMS]="LMS";
name_[PT_LMS_SETUP]="LMS_SETUP";
name_[PT_NTYPE]= "undefined";
}
const char* name(packet_t p) const {
if ( p <= PT_NTYPE ) return name_[p];
return 0;
}
static bool data_packet(packet_t type) {
return ( (type) == PT_TCP
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
ns-umts-extensions.zip_BCCH_UMTS PHY_ns-3_ns-allinone-2.31_umts (109个子文件)
delay.awk 1KB
ll-nodeb.cc 51KB
phy-umts.cc 41KB
phy-umts-nodeb.cc 38KB
cmu-trace.cc 32KB
ll-ue.cc 29KB
rlc-umts.cc 24KB
rlc-umts-nodeb.cc 20KB
mobilenode.cc 17KB
rtmodule.cc 15KB
wireless-phy.cc 13KB
node.cc 11KB
noah.cc 7KB
ll.cc 7KB
phy.cc 7KB
mac-umts-nodeb.cc 6KB
mac.cc 6KB
bsfc-queue.cc 6KB
tworayground.cc 6KB
phy-timers.cc 6KB
mac-umts.cc 5KB
fc-queue.cc 5KB
tree.cc 4KB
classifier-umts.cc 4KB
wired-flows.cc 4KB
ll-flows.cc 4KB
linked-list.cc 2KB
ex1-scen 311B
ex1-traffic 505B
ex2-scen 708B
ex2-traffic 2KB
ex3-scen 2KB
ex3-traffic 3KB
image002.gif 7KB
image024.gif 5KB
image026.gif 3KB
image004.gif 3KB
image022.gif 2KB
image006.gif 612B
image020.gif 593B
image016.gif 588B
image014.gif 534B
image008.gif 469B
image018.gif 381B
image010.gif 365B
image012.gif 313B
packet.h 18KB
phy-umts.h 11KB
mac.h 9KB
ll-nodeb.h 8KB
node.h 8KB
mobilenode.h 7KB
rlc-umts.h 7KB
queue.h 6KB
ll.h 6KB
rtmodule.h 6KB
cmu-trace.h 6KB
phy-umts-nodeb.h 6KB
rlc-umts-nodeb.h 6KB
ll-ue.h 5KB
phy-timers.h 5KB
mac-umts-nodeb.h 4KB
mac-umts.h 3KB
bsfc-queue.h 3KB
fc-queue.h 3KB
ll-flows.h 2KB
wired-flows.h 2KB
classifier-umts.h 2KB
tree.h 2KB
linked-list.h 2KB
noah.h 935B
bler.h 616B
documentation.htm 782KB
header.htm 3KB
Makefile.in 17KB
install 2KB
manual 2KB
oledata.mso 7KB
umts.patch 147KB
README 2KB
ns-lib.tcl 58KB
ns-default.tcl 37KB
route-proto.tcl 24KB
ns-mobilenode.tcl 21KB
ns-uenode.tcl 18KB
ns-node.tcl 17KB
ns-namsupp.tcl 15KB
ns-rtmodule.tcl 11KB
ns-packet.tcl 9KB
ns-nodeb.tcl 8KB
example3.tcl 7KB
example2.tcl 7KB
example1.tcl 7KB
noah.tcl 3KB
www.pudn.com.txt 218B
image001.wmz 28KB
image003.wmz 3KB
image023.wmz 3KB
image025.wmz 2KB
image021.wmz 1KB
共 109 条
- 1
- 2
资源评论
JonSco
- 粉丝: 66
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功