00001 /* -*- Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */ 00002 /* 00003 * Copyright (c) Xerox Corporation 1997. All rights reserved. 00004 * 00005 * License is granted to copy, to use, and to make and to use derivative 00006 * works for research and evaluation purposes, provided that Xerox is 00007 * acknowledged in all documentation pertaining to any such copy or derivative 00008 * work. Xerox grants no other licenses expressed or implied. The Xerox trade 00009 * name should not be used in any advertising without its written permission. 00010 * 00011 * XEROX CORPORATION MAKES NO REPRESENTATIONS CONCERNING EITHER THE 00012 * MERCHANTABILITY OF THIS SOFTWARE OR THE SUITABILITY OF THIS SOFTWARE 00013 * FOR ANY PARTICULAR PURPOSE. The software is provided "as is" without 00014 * express or implied warranty of any kind. 00015 * 00016 * These notices must be retained in any copies of any part of this software. 00017 * 00018 * @(#) $Header: /nfs/jade/vint/CVSROOT/ns-2/apps/udp.h,v 1.14 2001/11/16 22:29:59 buchheim Exp $ (Xerox) 00019 */ 00020 00021 #ifndef ns_udp_h 00022 #define ns_udp_h 00023 00024 #include "agent.h" 00025 #include "trafgen.h" 00026 #include "packet.h" 00027 00028 //"rtp timestamp" needs the samplerate 00029 #define SAMPLERATE 8000 00030 #define RTP_M 0x0080 // marker for significant events 00031 00032 class UdpAgent : public Agent { 00033 public: 00034 UdpAgent(); 00035 UdpAgent(packet_t); 00036 virtual void sendmsg(int nbytes, const char *flags = 0) 00037 { 00038 sendmsg(nbytes, NULL, flags); 00039 } 00040 virtual void sendmsg(int nbytes, AppData* data, const char *flags = 0); 00041 virtual void recv(Packet* pkt, Handler*); 00042 virtual int command(int argc, const char*const* argv); 00043 protected: 00044 int seqno_; 00045 }; 00046 00047 #endif
1.3.3