Re: [ns] please help me , i m getting error when i introduce new packet, have tried all possibilities

2007-05-30 Thread sri_seeta_ram



modify cmutrace.cc 


mahi kapoor wrote:
 
 
 
 hello everyone
   i have introduced a new packet checkloop in maodv but when i run a tcl
 script
   regarding maodv getting error
   format_aodv:invalid AODV packet type
   also i have done a little change in mact pkt. format.
   i m attaching two files related to it.
   please help me
   regards
   mahi
 

 -
  Check out what you're missing if you're not on Yahoo! Messenger 
 /*
 Copyright (c) 1997, 1998 Carnegie Mellon University.  All Rights
 Reserved. 
 
 Permission to use, copy, modify, and distribute this
 software and its documentation is hereby granted (including for
 commercial or for-profit use), provided that both the copyright notice and
 this permission notice appear in all copies of the software, derivative
 works, or modified versions, and any portions thereof, and that both
 notices appear in supporting documentation, and that credit is given to
 Carnegie Mellon University in all publications reporting on direct or
 indirect use of this code or its derivatives.
 
 ALL CODE, SOFTWARE, PROTOCOLS, AND ARCHITECTURES DEVELOPED BY THE CMU
 MONARCH PROJECT ARE EXPERIMENTAL AND ARE KNOWN TO HAVE BUGS, SOME OF
 WHICH MAY HAVE SERIOUS CONSEQUENCES. CARNEGIE MELLON PROVIDES THIS
 SOFTWARE OR OTHER INTELLECTUAL PROPERTY IN ITS ``AS IS'' CONDITION,
 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 CARNEGIE MELLON UNIVERSITY
 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 OR
 INTELLECTUAL PROPERTY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 DAMAGE.
 
 Carnegie Mellon encourages (but does not require) users of this
 software or intellectual property to return any improvements or
 extensions that they make, and to grant Carnegie Mellon the rights to
 redistribute these changes without encumbrance.
 
 The AODV code developed by the CMU/MONARCH group was optimized and tuned
 by Samir Das and Mahesh Marina, University of Cincinnati. The work was
 partially done in Sun Microsystems.
 */
 
 
 #ifndef __aodv_packet_h__
 #define __aodv_packet_h__
 
 //#include config.h
 //#include aodv.h
 #define AODV_MAX_ERRORS 100
 
 
 /* =
Packet Formats...
=
 */
 #define AODVTYPE_HELLO0x01
 #define AODVTYPE_RREQ 0x02
 #define AODVTYPE_RREP 0x04
 #define AODVTYPE_RERR 0x08
 #define AODVTYPE_RREP_ACK 0x10
 
 /*** added for multicast ***/
 #define AODVTYPE_GRPH 0x06
 #define AODVTYPE_MACT 0x05
 //done by me
 ///
 #define AODVTYPE_CHECKLOOP0x12
 /***/
 
 /*** added for prediction in multicast***/
 #define AODVTYPE_WARN   0x07
 #define AODVTYPE_LPW0x09
 #define AODVTYPE_RPE0x03
 #define AODVTYPE_LINK_RREQ 0x11
 //
 
 /*
  * AODV Routing Protocol Header Macros
  */
 #define HDR_AODV(p)   ((struct hdr_aodv*)hdr_aodv::access(p))
 #define HDR_AODV_REQUEST(p)   ((struct
 hdr_aodv_request*)hdr_aodv::access(p))
 #define HDR_AODV_REPLY(p) ((struct hdr_aodv_reply*)hdr_aodv::access(p))
 #define HDR_AODV_ERROR(p) ((struct hdr_aodv_error*)hdr_aodv::access(p))
 #define HDR_AODV_RREP_ACK(p)  ((struct
 hdr_aodv_rrep_ack*)hdr_aodv::access(p))
 
 /*** added for multicast ***/
 #define HDR_AODV_GRPH(p)  ((struct hdr_aodv_grph*)hdr_aodv::access(p))
 #define HDR_AODV_MACT(p)  ((struct hdr_aodv_mact*)hdr_aodv::access(p))
 #define HDR_AODV_CHECKLOOP(p) ((struct
 hdr_aodv_checkloop*)hdr_aodv::access(p))
 /***/
 
 /*** added for prediction***/
 #define HDR_AODV_WARN(p)((struct hdr_aodv_warn*)hdr_aodv::access(p))
 #define HDR_AODV_REQUEST_LINK(p) ((struct hdr_aodv_request_link
 *)hdr_aodv::access(p))
 #define HDR_AODV_RPE(p) ((struct hdr_aodv_rpe *)hdr_aodv::access(p))
 #define HDR_AODV_LPW(p) ((struct hdr_aodv_lpw *)hdr_aodv::access(p))
 /**/
 
 
 /*
  * General AODV Header - shared by all formats
  */
 struct hdr_aodv {
 u_int8_tah_type;
   /*
 u_int8_tah_reserved[2];
 u_int8_tah_hopcount;
   */
   // Header access methods
   static int offset_; // required by PacketHeaderManager
   inline 

[ns] please help me , i m getting error when i introduce new packet, have tried all possibilities

2007-04-10 Thread mahi kapoor

hello everyone
  i have introduced a new packet checkloop in maodv but when i run a tcl script
  regarding maodv getting error
  format_aodv:invalid AODV packet type
  also i have done a little change in mact pkt. format.
  i m attaching two files related to it.
  please help me
  regards
  mahi

   
-
 Check out what you're missing if you're not on Yahoo! Messenger /*
Copyright (c) 1997, 1998 Carnegie Mellon University.  All Rights
Reserved. 

Permission to use, copy, modify, and distribute this
software and its documentation is hereby granted (including for
commercial or for-profit use), provided that both the copyright notice and this 
permission notice appear in all copies of the software, derivative works, or 
modified versions, and any portions thereof, and that both notices appear in 
supporting documentation, and that credit is given to Carnegie Mellon 
University in all publications reporting on direct or indirect use of this code 
or its derivatives.

ALL CODE, SOFTWARE, PROTOCOLS, AND ARCHITECTURES DEVELOPED BY THE CMU
MONARCH PROJECT ARE EXPERIMENTAL AND ARE KNOWN TO HAVE BUGS, SOME OF
WHICH MAY HAVE SERIOUS CONSEQUENCES. CARNEGIE MELLON PROVIDES THIS
SOFTWARE OR OTHER INTELLECTUAL PROPERTY IN ITS ``AS IS'' CONDITION,
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 CARNEGIE MELLON UNIVERSITY
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 OR
INTELLECTUAL PROPERTY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

Carnegie Mellon encourages (but does not require) users of this
software or intellectual property to return any improvements or
extensions that they make, and to grant Carnegie Mellon the rights to 
redistribute these changes without encumbrance.

The AODV code developed by the CMU/MONARCH group was optimized and tuned by 
Samir Das and Mahesh Marina, University of Cincinnati. The work was partially 
done in Sun Microsystems.
*/


#ifndef __aodv_packet_h__
#define __aodv_packet_h__

//#include config.h
//#include aodv.h
#define AODV_MAX_ERRORS 100


/* =
   Packet Formats...
   = */
#define AODVTYPE_HELLO  0x01
#define AODVTYPE_RREQ   0x02
#define AODVTYPE_RREP   0x04
#define AODVTYPE_RERR   0x08
#define AODVTYPE_RREP_ACK   0x10

/*** added for multicast ***/
#define AODVTYPE_GRPH   0x06
#define AODVTYPE_MACT   0x05
//done by me 
///
#define AODVTYPE_CHECKLOOP  0x12
/***/

/*** added for prediction in multicast***/
#define AODVTYPE_WARN   0x07
#define AODVTYPE_LPW0x09
#define AODVTYPE_RPE0x03
#define AODVTYPE_LINK_RREQ 0x11
//

/*
 * AODV Routing Protocol Header Macros
 */
#define HDR_AODV(p) ((struct hdr_aodv*)hdr_aodv::access(p))
#define HDR_AODV_REQUEST(p) ((struct hdr_aodv_request*)hdr_aodv::access(p))
#define HDR_AODV_REPLY(p)   ((struct hdr_aodv_reply*)hdr_aodv::access(p))
#define HDR_AODV_ERROR(p)   ((struct hdr_aodv_error*)hdr_aodv::access(p))
#define HDR_AODV_RREP_ACK(p)((struct hdr_aodv_rrep_ack*)hdr_aodv::access(p))

/*** added for multicast ***/
#define HDR_AODV_GRPH(p)((struct hdr_aodv_grph*)hdr_aodv::access(p))
#define HDR_AODV_MACT(p)((struct hdr_aodv_mact*)hdr_aodv::access(p))
#define HDR_AODV_CHECKLOOP(p)   ((struct 
hdr_aodv_checkloop*)hdr_aodv::access(p))
/***/

/*** added for prediction***/
#define HDR_AODV_WARN(p)((struct hdr_aodv_warn*)hdr_aodv::access(p))
#define HDR_AODV_REQUEST_LINK(p) ((struct hdr_aodv_request_link 
*)hdr_aodv::access(p))
#define HDR_AODV_RPE(p) ((struct hdr_aodv_rpe *)hdr_aodv::access(p))
#define HDR_AODV_LPW(p) ((struct hdr_aodv_lpw *)hdr_aodv::access(p))
/**/


/*
 * General AODV Header - shared by all formats
 */
struct hdr_aodv {
u_int8_tah_type;
/*
u_int8_tah_reserved[2];
u_int8_tah_hopcount;
*/
// Header access methods
static int offset_; // required by PacketHeaderManager
inline static int offset() { return offset_; }
inline static hdr_aodv* access(const Packet* p) {
return