#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"
Include dependency graph for packet.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Data Structures | |
| struct | hdr_cmn |
| class | iface_literal |
| class | p_info |
| class | Packet |
| class | PacketData |
| class | PacketHeaderClass |
Defines | |
| #define | DATA_PACKET(type) |
| #define | HDR_ARP(p) (hdr_arp::access(p)) |
| #define | HDR_CDIFF(p) (hdr_cdiff::access(p)) |
| #define | HDR_CMN(p) (hdr_cmn::access(p)) |
| #define | HDR_HDLC(p) ((hdr_hdlc *)hdr_ll::access(p)) |
| #define | HDR_IMEP(p) (hdr_imep::access(p)) |
| #define | HDR_IP(p) (hdr_ip::access(p)) |
| #define | HDR_LL(p) (hdr_ll::access(p)) |
| #define | HDR_LMS(p) (hdr_lms::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)) |
| #define | HDR_RTP(p) (hdr_rtp::access(p)) |
| #define | HDR_SCTP(p) (hdr_sctp::access(p)) |
| #define | HDR_SMAC(p) ((hdr_smac *)hdr_mac::access(p)) |
| #define | HDR_SR(p) (hdr_sr::access(p)) |
| #define | HDR_TCP(p) (hdr_tcp::access(p)) |
| #define | HDR_TFRC(p) (hdr_tfrc::access(p)) |
| #define | HDR_TORA(p) (hdr_tora::access(p)) |
| #define | OFFSET(type, field) ((long) &((type *)0)->field) |
| #define | RT_PORT 255 |
| #define | XMIT_REASON_ACK 0x02 |
| #define | XMIT_REASON_RTS 0x01 |
Typedefs | |
| typedef void(* | FailureCallback )(Packet *, void *) |
Enumerations | |
| enum | ns_af_enum { NS_AF_NONE, NS_AF_ILINK, NS_AF_INET } |
| 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, PT_REQUEST, PT_ACCEPT, PT_CONFIRM, PT_TEARDOWN, PT_LIVE, PT_REJECT, PT_TELNET, PT_FTP, PT_PARETO, PT_EXP, PT_INVAL, PT_HTTP, PT_ENCAPSULATED, PT_MFTP, PT_ARP, PT_MAC, PT_TORA, PT_DSR, PT_AODV, PT_IMEP, PT_RAP_DATA, PT_RAP_ACK, PT_TFRC, PT_TFRC_ACK, PT_PING, PT_DIFF, PT_RTPROTO_LS, PT_LDP, PT_GAF, PT_REALAUDIO, PT_PUSHBACK, PT_LMS, PT_LMS_SETUP, PT_SCTP, PT_SCTP_APP1, PT_SMAC, PT_XCP, PT_HDLC, PT_NTYPE } |
Variables | |
| static const iface_literal | ANY_IFACE (iface_literal::ANY_IFACE,"*") |
| p_info | packet_info |
| static const iface_literal | UNKN_IFACE (iface_literal::UNKN_IFACE,"?") |
|
|
Value: ( (type) == PT_TCP || \ (type) == PT_TELNET || \ (type) == PT_CBR || \ (type) == PT_AUDIO || \ (type) == PT_VIDEO || \ (type) == PT_ACK || \ (type) == PT_SCTP || \ (type) == PT_SCTP_APP1 \ ) Definition at line 291 of file packet.h. Referenced by imepAgent::recv_incoming(), imepAgent::recv_outgoing(), AODV::rt_ll_failed(), and toraAgent::rtRoutePacket(). |
|
|
Definition at line 54 of file packet.h. Referenced by ARPTable::arpinput(), ARPTable::arprequest(), and CMUTrace::format_arp(). |
|
|
|
|
|
|
|
Definition at line 59 of file packet.h. Referenced by ARPTable::arpinput(), ARPTable::arprequest(), SatLL::sendDown(), and LL::sendDown(). |
|
|
|
|
|
Definition at line 57 of file packet.h. Referenced by MacTdma::makePreamble(), MacTdma::recvHandler(), MacTdma::send(), MacTdma::sendDown(), and MacTdma::trace_pkt(). |
|
|
Definition at line 62 of file packet.h. Referenced by LMSErrorModel::corrupt(), CMUTrace::format_rtp(), PLMLossMonitor::recv(), LmsReceiver::recv(), LmsSender::send_dmcast(), LmsReceiver::send_dmcast(), and LmsSender::sendmsg(). |
|
|
Definition at line 64 of file packet.h. Referenced by CMUTrace::format_sctp(). |
|
|
Definition at line 58 of file packet.h. Referenced by SMAC::bcastMsg(), SMAC::checkToSend(), SMAC::discard(), SMAC::drop_DATA(), CMUTrace::format_mac_common(), CMUTrace::format_smac(), SMAC::handleDATA(), SMAC::handleRecvTimer(), SMAC::handleSendTimer(), SMAC::sendDATA(), SMAC::sendMsg(), SMAC::sentDATA(), SMAC::startBcast(), SMAC::startUcast(), SMAC::txtime(), and SMAC::unicastMsg(). |
|
|
Definition at line 65 of file packet.h. Referenced by DSRAgent::handlePktWithoutSR(). |
|
|
Definition at line 63 of file packet.h. Referenced by CMUTrace::format_tcp(), TCPTapAgent::processpkt(), SimpleTcpAgent::sendmsg(), and TCPTapAgent::tcp_gen(). |
|
|
|
|
|
Definition at line 67 of file packet.h. Referenced by imepAgent::aggregateObjectBlock(), CMUTrace::format_tora(), toraAgent::recvTORA(), imepAgent::toraCreateHeader(), and imepAgent::toraExtractHeader(). |
|
|
Definition at line 302 of file packet.h. Referenced by ResvHeaderClass::export_offsets(), CommonHeaderClass::export_offsets(), MacHeaderClass::export_offsets(), and IPHeaderClass::export_offsets(). |
|
|
|
|
|
|
Definition at line 479 of file packet.h. Referenced by Mac802_11::RetransmitRTS(). |
|
|
|
|
|
Definition at line 445 of file packet.h. 00445 { NS_AF_NONE, NS_AF_ILINK, NS_AF_INET };
|
|
|
Definition at line 75 of file packet.h. 00075 { 00076 PT_TCP, 00077 PT_UDP, 00078 PT_CBR, 00079 PT_AUDIO, 00080 PT_VIDEO, 00081 PT_ACK, 00082 PT_START, 00083 PT_STOP, 00084 PT_PRUNE, 00085 PT_GRAFT, 00086 PT_GRAFTACK, 00087 PT_JOIN, 00088 PT_ASSERT, 00089 PT_MESSAGE, 00090 PT_RTCP, 00091 PT_RTP, 00092 PT_RTPROTO_DV, 00093 PT_CtrMcast_Encap, 00094 PT_CtrMcast_Decap, 00095 PT_SRM, 00096 /* simple signalling messages */ 00097 PT_REQUEST, 00098 PT_ACCEPT, 00099 PT_CONFIRM, 00100 PT_TEARDOWN, 00101 PT_LIVE, // packet from live network 00102 PT_REJECT, 00103 00104 PT_TELNET, // not needed: telnet use TCP 00105 PT_FTP, 00106 PT_PARETO, 00107 PT_EXP, 00108 PT_INVAL, 00109 PT_HTTP, 00110 00111 /* new encapsulator */ 00112 PT_ENCAPSULATED, 00113 PT_MFTP, 00114 00115 /* CMU/Monarch's extnsions */ 00116 PT_ARP, 00117 PT_MAC, 00118 PT_TORA, 00119 PT_DSR, 00120 PT_AODV, 00121 PT_IMEP, 00122 00123 // RAP packets 00124 PT_RAP_DATA, 00125 PT_RAP_ACK, 00126 00127 PT_TFRC, 00128 PT_TFRC_ACK, 00129 PT_PING, 00130 00131 // Diffusion packets - Chalermek 00132 PT_DIFF, 00133 00134 // LinkState routing update packets 00135 PT_RTPROTO_LS, 00136 00137 // MPLS LDP header 00138 PT_LDP, 00139 00140 // GAF packet 00141 PT_GAF, 00142 00143 // ReadAudio traffic 00144 PT_REALAUDIO, 00145 00146 // Pushback Messages 00147 PT_PUSHBACK, 00148 00149 #ifdef HAVE_STL 00150 // Pragmatic General Multicast 00151 PT_PGM, 00152 #endif //STL 00153 00154 // LMS packets 00155 PT_LMS, 00156 PT_LMS_SETUP, 00157 00158 PT_SCTP, 00159 PT_SCTP_APP1, 00160 00161 // SMAC packet 00162 PT_SMAC, 00163 00164 // XCP packet 00165 PT_XCP, 00166 00167 // HDLC packet 00168 PT_HDLC, 00169 00170 // insert new packet types here 00171 PT_NTYPE // This MUST be the LAST one 00172 };
|
|
|
Referenced by MCastClassifier::classify(), MCastBSTClassifier::classify(), MCastClassifier::command(), MCastClassifier::lookup(), and MCastClassifier::lookup_star(). |
|
|
Definition at line 43 of file packet.cc. Referenced by SatTrace::format(), Trace::format(), CMUTrace::format_ip(), Mac802_15_4Class::method(), CMUTrace::nam_format(), nam_pktName2Type(), SatDequeTrace::recv(), DequeTrace::recv(), LmsSender::sendmsg(), DSRAgent::sendOutPacketWithRoute(), God::stampPacket(), Mac802_11::trace_pkt(), MacTdma::trace_pkt(), and wpan_pName(). |
|
|
Referenced by MCastClassifier::command(), Agent::initpkt(), SMAC::sendACK(), SMAC::sendCTS(), SMAC::sendRTS(), and SMAC::sendSYNC(). |
1.4.6