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

rtProtoDV.h

Go to the documentation of this file.
00001 /* -*-  Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */
00002 /*
00003  * rtProtoDV.h
00004  * Copyright (C) 1997 by USC/ISI
00005  * All rights reserved.                                            
00006  *                                                                
00007  * Redistribution and use in source and binary forms are permitted
00008  * provided that the above copyright notice and this paragraph are
00009  * duplicated in all such forms and that any documentation, advertising
00010  * materials, and other materials related to such distribution and use
00011  * acknowledge that the software was developed by the University of
00012  * Southern California, Information Sciences Institute.  The name of the
00013  * University may not be used to endorse or promote products derived from
00014  * this software without specific prior written permission.
00015  * 
00016  * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
00017  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
00018  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00019  * 
00020  * @(#) $Header: /nfs/jade/vint/CVSROOT/ns-2/routing/rtProtoDV.h,v 1.6 2000/09/01 03:04:06 haoboy Exp $ (USC/ISI)
00021  */
00022 
00023 #ifndef ns_rtprotodv_h
00024 #define ns_rtprotodv_h
00025 
00026 #include "packet.h"
00027 #include "ip.h"
00028 
00029 struct hdr_DV {
00030         u_int32_t mv_;                  // metrics variable identifier
00031 
00032         static int offset_;
00033         inline static int& offset() { return offset_; }
00034         inline static hdr_DV* access(const Packet* p) {
00035                 return (hdr_DV*) p->access(offset_);
00036         }
00037 
00038         // per field member functions
00039         u_int32_t& metricsVar() { return mv_; }
00040 };
00041 
00042 class rtProtoDV : public Agent {
00043 public:
00044         rtProtoDV() : Agent(PT_RTPROTO_DV) {}
00045         int command(int argc, const char*const* argv);
00046         void sendpkt(ns_addr_t dst, u_int32_t z, u_int32_t mtvar);
00047         void recv(Packet* p, Handler*);
00048 };
00049 
00050 #endif

Generated on Tue Apr 20 12:14:30 2004 for NS2.26SourcesOriginal by doxygen 1.3.3