Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

p_info Class Reference

#include <packet.h>

Collaboration diagram for p_info:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 p_info ()
const char * name (packet_t p) const

Static Public Member Functions

bool data_packet (packet_t type)

Static Private Attributes

char * name_ [PT_NTYPE+1]

Constructor & Destructor Documentation

p_info::p_info  )  [inline]
 

Definition at line 162 of file packet.h.

References name_, PT_ACCEPT, PT_ACK, PT_AODV, PT_ARP, PT_ASSERT, PT_AUDIO, PT_CBR, PT_CONFIRM, PT_CtrMcast_Decap, PT_CtrMcast_Encap, PT_DIFF, PT_DSR, PT_ENCAPSULATED, PT_EXP, PT_FTP, PT_GAF, PT_GRAFT, PT_GRAFTACK, PT_HTTP, PT_IMEP, PT_INVAL, PT_JOIN, PT_LDP, PT_LIVE, PT_LMS, PT_LMS_SETUP, PT_MAC, PT_MESSAGE, PT_MFTP, PT_NTYPE, PT_PARETO, PT_PING, PT_PRUNE, PT_PUSHBACK, PT_RAP_ACK, PT_RAP_DATA, PT_REALAUDIO, PT_REJECT, PT_REQUEST, PT_RTCP, PT_RTP, PT_RTPROTO_DV, PT_RTPROTO_LS, PT_SRM, PT_START, PT_STOP, PT_TCP, PT_TEARDOWN, PT_TELNET, PT_TFRC, PT_TFRC_ACK, PT_TORA, PT_UDP, and PT_VIDEO.

00162                  {
00163                 name_[PT_TCP]= "tcp";
00164                 name_[PT_UDP]= "udp";
00165                 name_[PT_CBR]= "cbr";
00166                 name_[PT_AUDIO]= "audio";
00167                 name_[PT_VIDEO]= "video";
00168                 name_[PT_ACK]= "ack";
00169                 name_[PT_START]= "start";
00170                 name_[PT_STOP]= "stop";
00171                 name_[PT_PRUNE]= "prune";
00172                 name_[PT_GRAFT]= "graft";
00173                 name_[PT_GRAFTACK]= "graftAck";
00174                 name_[PT_JOIN]= "join";
00175                 name_[PT_ASSERT]= "assert";
00176                 name_[PT_MESSAGE]= "message";
00177                 name_[PT_RTCP]= "rtcp";
00178                 name_[PT_RTP]= "rtp";
00179                 name_[PT_RTPROTO_DV]= "rtProtoDV";
00180                 name_[PT_CtrMcast_Encap]= "CtrMcast_Encap";
00181                 name_[PT_CtrMcast_Decap]= "CtrMcast_Decap";
00182                 name_[PT_SRM]= "SRM";
00183 
00184                 name_[PT_REQUEST]= "sa_req";    
00185                 name_[PT_ACCEPT]= "sa_accept";
00186                 name_[PT_CONFIRM]= "sa_conf";
00187                 name_[PT_TEARDOWN]= "sa_teardown";
00188                 name_[PT_LIVE]= "live"; 
00189                 name_[PT_REJECT]= "sa_reject";
00190 
00191                 name_[PT_TELNET]= "telnet";
00192                 name_[PT_FTP]= "ftp";
00193                 name_[PT_PARETO]= "pareto";
00194                 name_[PT_EXP]= "exp";
00195                 name_[PT_INVAL]= "httpInval";
00196                 name_[PT_HTTP]= "http";
00197                 name_[PT_ENCAPSULATED]= "encap";
00198                 name_[PT_MFTP]= "mftp";
00199                 name_[PT_ARP]= "ARP";
00200                 name_[PT_MAC]= "MAC";
00201                 name_[PT_TORA]= "TORA";
00202                 name_[PT_DSR]= "DSR";
00203                 name_[PT_AODV]= "AODV";
00204                 name_[PT_IMEP]= "IMEP";
00205 
00206                 name_[PT_RAP_DATA] = "rap_data";
00207                 name_[PT_RAP_ACK] = "rap_ack";
00208 
00209                 name_[PT_TFRC]= "tcpFriend";
00210                 name_[PT_TFRC_ACK]= "tcpFriendCtl";
00211                 name_[PT_PING]="ping";
00212 
00213                 /* For diffusion : Chalermek */
00214                 name_[PT_DIFF] = "diffusion";
00215 
00216                 // Link state routing updates
00217                 name_[PT_RTPROTO_LS] = "rtProtoLS";
00218 
00219                 // MPLS LDP packets
00220                 name_[PT_LDP] = "LDP";
00221 
00222                 // for GAF
00223                 name_[PT_GAF] = "gaf";      
00224 
00225                 // RealAudio packets
00226                 name_[PT_REALAUDIO] = "ra";
00227 
00228                 //pushback 
00229                 name_[PT_PUSHBACK] = "pushback";
00230 
00231 #ifdef HAVE_STL
00232                 // for PGM
00233                 name_[PT_PGM] = "PGM";
00234 #endif //STL
00235 
00236                 // LMS entries
00237                 name_[PT_LMS]="LMS";
00238                 name_[PT_LMS_SETUP]="LMS_SETUP";
00239 
00240                 name_[PT_NTYPE]= "undefined";
00241         }


Member Function Documentation

bool p_info::data_packet packet_t  type  )  [inline, static]
 

Definition at line 246 of file packet.h.

References PT_ACK, PT_AUDIO, PT_CBR, PT_TCP, PT_TELNET, and PT_VIDEO.

Referenced by God::stampPacket().

00246                                                {
00247                 return ( (type) == PT_TCP || \
00248                          (type) == PT_TELNET || \
00249                          (type) == PT_CBR || \
00250                          (type) == PT_AUDIO || \
00251                          (type) == PT_VIDEO || \
00252                          (type) == PT_ACK \
00253                          );
00254         }

const char* p_info::name packet_t  p  )  const [inline]
 

Definition at line 242 of file packet.h.

References name_, and PT_NTYPE.

Referenced by Trace::format(), SatTrace::format(), CMUTrace::format(), CMUTrace::format_ip(), CMUTrace::format_mac(), main(), CMUTrace::nam_format(), DequeTrace::recv(), SatDequeTrace::recv(), LmsSender::send_dmcast(), LmsSender::sendmsg(), DSRAgent::sendOutPacketWithRoute(), MacTdma::trace_pkt(), and Mac802_11::trace_pkt().

00242                                            { 
00243                 if ( p <= PT_NTYPE ) return name_[p];
00244                 return 0;
00245         }


Member Data Documentation

char * p_info::name_ [static, private]
 

Definition at line 13 of file ptypes2tcl.cc.

Referenced by name(), and p_info().


The documentation for this class was generated from the following files:
Generated on Tue Apr 20 13:06:36 2004 for NS2.26SourcesOriginal by doxygen 1.3.3