• Main Page
  • Classes
  • Files
  • File List

/Users/yzchen/ns/ns-allinone-2.33/ns-2.33/um-olsr-0.8.8/OLSR_rtable.h

00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Francisco J. Ros                                *
00003  *   fjrm@dif.um.es                                                        *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 
00025 
00026 #ifndef __OLSR_rtable_h__
00027 #define __OLSR_rtable_h__
00028 
00029 #include <olsr/OLSR_repositories.h>
00030 #include <trace.h>
00031 #include <map>
00032 
00039 typedef std::map<nsaddr_t, OLSR_rt_entry*> rtable_t;
00040 
00044 class OLSR_rtable {
00045         rtable_t        rt_;    
00046 
00047 public:
00048         
00049         OLSR_rtable();
00050         ~OLSR_rtable();
00051         
00052         void            clear();
00053         void            rm_entry(nsaddr_t dest);
00054         OLSR_rt_entry*  add_entry(nsaddr_t dest, nsaddr_t next, nsaddr_t iface, u_int32_t dist);
00055         OLSR_rt_entry*  lookup(nsaddr_t dest);
00056         OLSR_rt_entry*  find_send_entry(OLSR_rt_entry*);
00057         u_int32_t       size();
00058         void            print(Trace*);
00059 };
00060 
00061 #endif

Generated on Tue Aug 10 2010 16:16:09 for ns-2.33 by  doxygen 1.7.1