00001 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 00002 /* 00003 * Copyright 2007 University of Washington 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 version 2 as 00007 * published by the Free Software Foundation; 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 * 00018 * Authors: Craig Dowell (craigdo@ee.washington.edu) 00019 * Tom Henderson (tomhend@u.washington.edu) 00020 */ 00021 00022 #ifndef GLOBAL_ROUTER_INTERFACE_H 00023 #define GLOBAL_ROUTER_INTERFACE_H 00024 00025 #include <stdint.h> 00026 #include <list> 00027 #include "ns3/object.h" 00028 #include "ns3/ptr.h" 00029 #include "ns3/node.h" 00030 #include "ns3/channel.h" 00031 #include "ns3/ipv4-address.h" 00032 #include "ns3/net-device-container.h" 00033 #include "ns3/bridge-net-device.h" 00034 #include "ns3/global-route-manager.h" 00035 00036 namespace ns3 { 00037 00038 class GlobalRouter; 00039 00040 /** 00041 * @brief A single link record for a link state advertisement. 00042 * 00043 * The GlobalRoutingLinkRecord is modeled after the OSPF link record field of 00044 * a Link State Advertisement. Right now we will only see two types of link 00045 * records corresponding to a stub network and a point-to-point link (channel). 00046 */ 00047 class GlobalRoutingLinkRecord 00048 { 00049 public: 00050 friend class GlobalRoutingLSA; 00051 /** 00052 * @enum LinkType 00053 * @brief Enumeration of the possible types of Global Routing Link Records. 00054 * 00055 * These values are defined in the OSPF spec. We currently only use 00056 * PointToPoint and StubNetwork types. 00057 */ 00058 enum LinkType { 00059 Unknown = 0, /**< Uninitialized Link Record */ 00060 PointToPoint, /**< Record representing a point to point channel */ 00061 TransitNetwork, /**< Unused -- for future OSPF compatibility */ 00062 StubNetwork, /**< Record represents a leaf node network */ 00063 VirtualLink /**< Unused -- for future OSPF compatibility */ 00064 }; 00065 00066 /** 00067 * @brief Construct an empty ("uninitialized") Global Routing Link Record. 00068 * 00069 * The Link ID and Link Data Ipv4 addresses are set to "0.0.0.0"; 00070 * The Link Type is set to Unknown; 00071 * The metric is set to 0. 00072 */ 00073 GlobalRoutingLinkRecord (); 00074 00075 /** 00076 * Construct an initialized Global Routing Link Record. 00077 * 00078 * @param linkType The type of link record to construct. 00079 * @param linkId The link ID for the record. 00080 * @param linkData The link data field for the record. 00081 * @param metric The metric field for the record. 00082 * @see LinkType 00083 * @see SetLinkId 00084 * @see SetLinkData 00085 */ 00086 GlobalRoutingLinkRecord ( 00087 LinkType linkType, 00088 Ipv4Address linkId, 00089 Ipv4Address linkData, 00090 uint16_t metric); 00091 00092 /** 00093 * @brief Destroy a Global Routing Link Record. 00094 * 00095 * Currently does nothing. Here as a placeholder only. 00096 */ 00097 ~GlobalRoutingLinkRecord (); 00098 00099 /** 00100 * Get the Link ID field of the Global Routing Link Record. 00101 * 00102 * For an OSPF type 1 link (PointToPoint) the Link ID will be the Router ID 00103 * of the neighboring router. 00104 * 00105 * For an OSPF type 3 link (StubNetwork), the Link ID will be the adjacent 00106 * neighbor's IP address 00107 * 00108 * @returns The Ipv4Address corresponding to the Link ID field of the record. 00109 */ 00110 Ipv4Address GetLinkId(void) const; 00111 00112 /** 00113 * @brief Set the Link ID field of the Global Routing Link Record. 00114 * 00115 * For an OSPF type 1 link (PointToPoint) the Link ID must be the Router ID 00116 * of the neighboring router. 00117 * 00118 * For an OSPF type 3 link (StubNetwork), the Link ID must be the adjacent 00119 * neighbor's IP address 00120 * 00121 * @param addr An Ipv4Address to store in the Link ID field of the record. 00122 */ 00123 void SetLinkId(Ipv4Address addr); 00124 00125 /** 00126 * @brief Get the Link Data field of the Global Routing Link Record. 00127 * 00128 * For an OSPF type 1 link (PointToPoint) the Link Data will be the IP 00129 * address of the node of the local side of the link. 00130 * 00131 * For an OSPF type 3 link (StubNetwork), the Link Data will be the 00132 * network mask 00133 * 00134 * @returns The Ipv4Address corresponding to the Link Data field of the record. 00135 */ 00136 Ipv4Address GetLinkData(void) const; 00137 00138 /** 00139 * @brief Set the Link Data field of the Global Routing Link Record. 00140 * 00141 * For an OSPF type 1 link (PointToPoint) the Link Data must be the IP 00142 * address of the node of the local side of the link. 00143 * 00144 * For an OSPF type 3 link (StubNetwork), the Link Data must be set to the 00145 * network mask 00146 * 00147 * @param addr An Ipv4Address to store in the Link Data field of the record. 00148 */ 00149 void SetLinkData(Ipv4Address addr); 00150 00151 /** 00152 * @brief Get the Link Type field of the Global Routing Link Record. 00153 * 00154 * The Link Type describes the kind of link a given record represents. The 00155 * values are defined by OSPF. 00156 * 00157 * @see LinkType 00158 * @returns The LinkType of the current Global Routing Link Record. 00159 */ 00160 LinkType GetLinkType(void) const; 00161 00162 /** 00163 * @brief Set the Link Type field of the Global Routing Link Record. 00164 * 00165 * The Link Type describes the kind of link a given record represents. The 00166 * values are defined by OSPF. 00167 * 00168 * @see LinkType 00169 * @param linkType The new LinkType for the current Global Routing Link Record. 00170 */ 00171 void SetLinkType(LinkType linkType); 00172 00173 /** 00174 * @brief Get the Metric Data field of the Global Routing Link Record. 00175 * 00176 * The metric is an abstract cost associated with forwarding a packet across 00177 * a link. A sum of metrics must have a well-defined meaning. That is, you 00178 * shouldn't use bandwidth as a metric (how does the sum of the bandwidth of 00179 * two hops relate to the cost of sending a packet); rather you should use 00180 * something like delay. 00181 * 00182 * @returns The metric field of the Global Routing Link Record. 00183 */ 00184 uint16_t GetMetric(void) const; 00185 00186 /** 00187 * @brief Set the Metric Data field of the Global Routing Link Record. 00188 * 00189 * The metric is an abstract cost associated with forwarding a packet across 00190 * a link. A sum of metrics must have a well-defined meaning. That is, you 00191 * shouldn't use bandwidth as a metric (how does the sum of the bandwidth of 00192 * two hops relate to the cost of sending a packet); rather you should use 00193 * something like delay. 00194 * 00195 * @param metric The new metric for the current Global Routing Link Record. 00196 */ 00197 void SetMetric(uint16_t metric); 00198 00199 private: 00200 /** 00201 * m_linkId and m_linkData are defined by OSPF to have different meanings 00202 * depending on the type of link a given link records represents. They work 00203 * together. 00204 * 00205 * For Type 1 link (PointToPoint), set m_linkId to Router ID of 00206 * neighboring router. 00207 * 00208 * For Type 3 link (Stub), set m_linkId to neighbor's IP address 00209 */ 00210 Ipv4Address m_linkId; 00211 00212 /** 00213 * m_linkId and m_linkData are defined by OSPF to have different meanings 00214 * depending on the type of link a given link records represents. They work 00215 * together. 00216 * 00217 * For Type 1 link (PointToPoint), set m_linkData to local IP address 00218 * 00219 * For Type 3 link (Stub), set m_linkData to mask 00220 */ 00221 Ipv4Address m_linkData; // for links to RouterLSA, 00222 00223 /** 00224 * The type of the Global Routing Link Record. Defined in the OSPF spec. 00225 * We currently only use PointToPoint and StubNetwork types. 00226 */ 00227 LinkType m_linkType; 00228 00229 /** 00230 * The metric for a given link. 00231 * 00232 * A metric is abstract cost associated with forwarding a packet across a 00233 * link. A sum of metrics must have a well-defined meaning. That is, you 00234 * shouldn't use bandwidth as a metric (how does the sum of the bandwidth 00235 * of two hops relate to the cost of sending a packet); rather you should 00236 * use something like delay. 00237 */ 00238 uint16_t m_metric; 00239 }; 00240 00241 /** 00242 * @brief a Link State Advertisement (LSA) for a router, used in global 00243 * routing. 00244 * 00245 * Roughly equivalent to a global incarnation of the OSPF link state header 00246 * combined with a list of Link Records. Since it's global, there's 00247 * no need for age or sequence number. See RFC 2328, Appendix A. 00248 */ 00249 class GlobalRoutingLSA 00250 { 00251 public: 00252 /** 00253 * @enum LSType 00254 * @brief corresponds to LS type field of RFC 2328 OSPF LSA header 00255 */ 00256 enum LSType { 00257 Unknown = 0, /**< Uninitialized Type */ 00258 RouterLSA, 00259 NetworkLSA, 00260 SummaryLSA, 00261 SummaryLSA_ASBR, 00262 ASExternalLSAs 00263 }; 00264 /** 00265 * @enum SPFStatus 00266 * @brief Enumeration of the possible values of the status flag in the Routing 00267 * Link State Advertisements. 00268 */ 00269 enum SPFStatus { 00270 LSA_SPF_NOT_EXPLORED = 0, /**< New vertex not yet considered */ 00271 LSA_SPF_CANDIDATE, /**< Vertex is in the SPF candidate queue */ 00272 LSA_SPF_IN_SPFTREE /**< Vertex is in the SPF tree */ 00273 }; 00274 /** 00275 * @brief Create a blank Global Routing Link State Advertisement. 00276 * 00277 * On completion Ipv4Address variables initialized to 0.0.0.0 and the 00278 * list of Link State Records is empty. 00279 */ 00280 GlobalRoutingLSA(); 00281 00282 /** 00283 * @brief Create an initialized Global Routing Link State Advertisement. 00284 * 00285 * On completion the list of Link State Records is empty. 00286 * 00287 * @param status The status to of the new LSA. 00288 * @param linkStateId The Ipv4Address for the link state ID field. 00289 * @param advertisingRtr The Ipv4Address for the advertising router field. 00290 */ 00291 GlobalRoutingLSA(SPFStatus status, Ipv4Address linkStateId, 00292 Ipv4Address advertisingRtr); 00293 00294 /** 00295 * @brief Copy constructor for a Global Routing Link State Advertisement. 00296 * 00297 * Takes a piece of memory and constructs a semantically identical copy of 00298 * the given LSA. 00299 * 00300 * @param lsa The existing LSA to be used as the source. 00301 */ 00302 GlobalRoutingLSA (GlobalRoutingLSA& lsa); 00303 00304 /** 00305 * @brief Destroy an existing Global Routing Link State Advertisement. 00306 * 00307 * Any Global Routing Link Records present in the list are freed. 00308 */ 00309 ~GlobalRoutingLSA(); 00310 00311 /** 00312 * @brief Assignment operator for a Global Routing Link State Advertisement. 00313 * 00314 * Takes an existing Global Routing Link State Advertisement and overwrites 00315 * it to make a semantically identical copy of a given prototype LSA. 00316 * 00317 * If there are any Global Routing Link Records present in the existing 00318 * LSA, they are freed before the assignment happens. 00319 * 00320 * @param lsa The existing LSA to be used as the source. 00321 * @returns Reference to the overwritten LSA. 00322 */ 00323 GlobalRoutingLSA& operator= (const GlobalRoutingLSA& lsa); 00324 00325 /** 00326 * @brief Copy any Global Routing Link Records in a given Global Routing Link 00327 * State Advertisement to the current LSA. 00328 * 00329 * Existing Link Records are not deleted -- this is a concatenation of Link 00330 * Records. 00331 * 00332 * @see ClearLinkRecords () 00333 * @param lsa The LSA to copy the Link Records from. 00334 */ 00335 void CopyLinkRecords (const GlobalRoutingLSA& lsa); 00336 00337 /** 00338 * @brief Add a given Global Routing Link Record to the LSA. 00339 * 00340 * @param lr The Global Routing Link Record to be added. 00341 * @returns The number of link records in the list. 00342 */ 00343 uint32_t AddLinkRecord (GlobalRoutingLinkRecord* lr); 00344 00345 /** 00346 * @brief Return the number of Global Routing Link Records in the LSA. 00347 * 00348 * @returns The number of link records in the list. 00349 */ 00350 uint32_t GetNLinkRecords (void) const; 00351 00352 /** 00353 * @brief Return a pointer to the specified Global Routing Link Record. 00354 * 00355 * @param n The LSA number desired. 00356 * @returns The number of link records in the list. 00357 */ 00358 GlobalRoutingLinkRecord* GetLinkRecord (uint32_t n) const; 00359 00360 /** 00361 * @brief Release all of the Global Routing Link Records present in the Global 00362 * Routing Link State Advertisement and make the list of link records empty. 00363 */ 00364 void ClearLinkRecords(void); 00365 00366 /** 00367 * @brief Check to see if the list of Global Routing Link Records present in the 00368 * Global Routing Link State Advertisement is empty. 00369 * 00370 * @returns True if the list is empty, false otherwise. 00371 */ 00372 bool IsEmpty(void) const; 00373 00374 /** 00375 * @brief Print the contents of the Global Routing Link State Advertisement and 00376 * any Global Routing Link Records present in the list. Quite verbose. 00377 */ 00378 void Print (std::ostream &os) const; 00379 00380 /** 00381 * @brief Return the LSType field of the LSA 00382 */ 00383 LSType GetLSType (void) const; 00384 /** 00385 * @brief Set the LS type field of the LSA 00386 */ 00387 void SetLSType (LSType typ); 00388 00389 /** 00390 * @brief Get the Link State ID as defined by the OSPF spec. We always set it 00391 * to the router ID of the router making the advertisement. 00392 * 00393 * @see RoutingEnvironment::AllocateRouterId () 00394 * @see GlobalRouting::GetRouterId () 00395 * @returns The Ipv4Address stored as the link state ID. 00396 */ 00397 Ipv4Address GetLinkStateId (void) const; 00398 00399 /** 00400 * @brief Set the Link State ID is defined by the OSPF spec. We always set it 00401 * to the router ID of the router making the advertisement. 00402 * 00403 * @see RoutingEnvironment::AllocateRouterId () 00404 * @see GlobalRouting::GetRouterId () 00405 */ 00406 void SetLinkStateId (Ipv4Address addr); 00407 00408 /** 00409 * @brief Get the Advertising Router as defined by the OSPF spec. We always 00410 * set it to the router ID of the router making the advertisement. 00411 * 00412 * @see RoutingEnvironment::AllocateRouterId () 00413 * @see GlobalRouting::GetRouterId () 00414 * @returns The Ipv4Address stored as the advetising router. 00415 */ 00416 Ipv4Address GetAdvertisingRouter (void) const; 00417 00418 /** 00419 * @brief Set the Advertising Router as defined by the OSPF spec. We always 00420 * set it to the router ID of the router making the advertisement. 00421 * 00422 * @see RoutingEnvironment::AllocateRouterId () 00423 * @see GlobalRouting::GetRouterId () 00424 */ 00425 void SetAdvertisingRouter (Ipv4Address rtr); 00426 00427 /** 00428 * @brief For a Network LSA, set the Network Mask field that precedes 00429 * the list of attached routers. 00430 */ 00431 void SetNetworkLSANetworkMask (Ipv4Mask mask); 00432 00433 /** 00434 * @brief For a Network LSA, get the Network Mask field that precedes 00435 * the list of attached routers. 00436 * 00437 * @returns the NetworkLSANetworkMask 00438 */ 00439 Ipv4Mask GetNetworkLSANetworkMask (void) const; 00440 00441 /** 00442 * @brief Add an attached router to the list in the NetworkLSA 00443 * 00444 * @param addr The Ipv4Address of the interface on the network link 00445 * @returns The number of addresses in the list. 00446 */ 00447 uint32_t AddAttachedRouter (Ipv4Address addr); 00448 00449 /** 00450 * @brief Return the number of attached routers listed in the NetworkLSA 00451 * 00452 * @returns The number of attached routers. 00453 */ 00454 uint32_t GetNAttachedRouters (void) const; 00455 00456 /** 00457 * @brief Return an Ipv4Address corresponding to the specified attached router 00458 * 00459 * @param n The attached router number desired (number in the list). 00460 * @returns The Ipv4Address of the requested router 00461 */ 00462 Ipv4Address GetAttachedRouter (uint32_t n) const; 00463 00464 /** 00465 * @brief Get the SPF status of the advertisement. 00466 * 00467 * @see SPFStatus 00468 * @returns The SPFStatus of the LSA. 00469 */ 00470 SPFStatus GetStatus (void) const; 00471 00472 /** 00473 * @brief Set the SPF status of the advertisement 00474 * 00475 * @see SPFStatus 00476 */ 00477 void SetStatus (SPFStatus status); 00478 00479 private: 00480 /** 00481 * The type of the LSA. Each LSA type has a separate advertisement 00482 * format. 00483 */ 00484 LSType m_lsType; 00485 /** 00486 * The Link State ID is defined by the OSPF spec. We always set it to the 00487 * router ID of the router making the advertisement. 00488 * 00489 * @see RoutingEnvironment::AllocateRouterId () 00490 * @see GlobalRouting::GetRouterId () 00491 */ 00492 Ipv4Address m_linkStateId; 00493 00494 /** 00495 * The Advertising Router is defined by the OSPF spec. We always set it to 00496 * the router ID of the router making the advertisement. 00497 * 00498 * @see RoutingEnvironment::AllocateRouterId () 00499 * @see GlobalRouting::GetRouterId () 00500 */ 00501 Ipv4Address m_advertisingRtr; 00502 00503 /** 00504 * A convenience typedef to avoid too much writers cramp. 00505 */ 00506 typedef std::list<GlobalRoutingLinkRecord*> ListOfLinkRecords_t; 00507 00508 /** 00509 * Each Link State Advertisement contains a number of Link Records that 00510 * describe the kinds of links that are attached to a given node. We 00511 * consider PointToPoint and StubNetwork links. 00512 * 00513 * m_linkRecords is an STL list container to hold the Link Records that have 00514 * been discovered and prepared for the advertisement. 00515 * 00516 * @see GlobalRouting::DiscoverLSAs () 00517 */ 00518 ListOfLinkRecords_t m_linkRecords; 00519 00520 /** 00521 * Each Network LSA contains the network mask of the attached network 00522 */ 00523 Ipv4Mask m_networkLSANetworkMask; 00524 00525 /** 00526 * A convenience typedef to avoid too much writers cramp. 00527 */ 00528 typedef std::list<Ipv4Address> ListOfAttachedRouters_t; 00529 00530 /** 00531 * Each Network LSA contains a list of attached routers 00532 * 00533 * m_attachedRouters is an STL list container to hold the addresses that have 00534 * been discovered and prepared for the advertisement. 00535 * 00536 * @see GlobalRouting::DiscoverLSAs () 00537 */ 00538 ListOfAttachedRouters_t m_attachedRouters; 00539 00540 /** 00541 * This is a tristate flag used internally in the SPF computation to mark 00542 * if an SPFVertex (a data structure representing a vertex in the SPF tree 00543 * -- a router) is new, is a candidate for a shortest path, or is in its 00544 * proper position in the tree. 00545 */ 00546 SPFStatus m_status; 00547 }; 00548 00549 std::ostream& operator<< (std::ostream& os, GlobalRoutingLSA& lsa); 00550 00551 /** 00552 * @brief An interface aggregated to a node to provide global routing info 00553 * 00554 * An interface aggregated to a node that provides global routing information 00555 * to a global route manager. The presence of the interface indicates that 00556 * the node is a router. The interface is the mechanism by which the router 00557 * advertises its connections to neighboring routers. We're basically 00558 * allowing the route manager to query for link state advertisements. 00559 */ 00560 class GlobalRouter : public Object 00561 { 00562 public: 00563 /** 00564 * @brief The Interface ID of the Global Router interface. 00565 * 00566 * @see Object::GetObject () 00567 */ 00568 static TypeId GetTypeId (void); 00569 00570 /** 00571 * @brief Create a Global Router class 00572 */ 00573 GlobalRouter (); 00574 00575 /** 00576 * @brief Get the Router ID associated with this Global Router. 00577 * 00578 * The Router IDs are allocated in the RoutingEnvironment -- one per Router, 00579 * starting at 0.0.0.1 and incrementing with each instantiation of a router. 00580 * 00581 * @see RoutingEnvironment::AllocateRouterId () 00582 * @returns The Router ID associated with the Global Router. 00583 */ 00584 Ipv4Address GetRouterId (void) const; 00585 00586 /** 00587 * @brief Walk the connected channels, discover the adjacent routers and build 00588 * the associated number of Global Routing Link State Advertisements that 00589 * this router can export. 00590 * 00591 * This is a fairly expensive operation in that every time it is called 00592 * the current list of LSAs is built by walking connected point-to-point 00593 * channels and peeking into adjacent IPV4 stacks to get address information. 00594 * This is done to allow for limited dymanics of the Global Routing 00595 * environment. By that we mean that you can discover new link state 00596 * advertisements after a network topology change by calling DiscoverLSAs 00597 * and then by reading those advertisements. 00598 * 00599 * @see GlobalRoutingLSA 00600 * @see GlobalRouter::GetLSA () 00601 * @returns The number of Global Routing Link State Advertisements. 00602 */ 00603 uint32_t DiscoverLSAs (void); 00604 00605 /** 00606 * @brief Get the Number of Global Routing Link State Advertisements that this 00607 * router can export. 00608 * 00609 * To get meaningful information you must have previously called DiscoverLSAs. 00610 * After you know how many LSAs are present in the router, you may call 00611 * GetLSA () to retrieve the actual advertisement. 00612 * 00613 * @see GlobalRouterLSA 00614 * @see GlobalRouting::DiscoverLSAs () 00615 * @see GlobalRouting::GetLSA () 00616 * @returns The number of Global Routing Link State Advertisements. 00617 */ 00618 uint32_t GetNumLSAs (void) const; 00619 00620 /** 00621 * @brief Get a Global Routing Link State Advertisements that this router has 00622 * said that it can export. 00623 * 00624 * This is a fairly inexpensive expensive operation in that the hard work 00625 * was done in GetNumLSAs. We just copy the indicated Global Routing Link 00626 * State Advertisement into the requested GlobalRoutingLSA object. 00627 * 00628 * You must call GlobalRouter::GetNumLSAs before calling this method in 00629 * order to discover the adjacent routers and build the advertisements. 00630 * GetNumLSAs will return the number of LSAs this router advertises. 00631 * The parameter n (requested LSA number) must be in the range 0 to 00632 * GetNumLSAs() - 1. 00633 * 00634 * @see GlobalRoutingLSA 00635 * @see GlobalRouting::GetNumLSAs () 00636 * @param n The index number of the LSA you want to read. 00637 * @param lsa The GlobalRoutingLSA class to receive the LSA information. 00638 * @returns The number of Global Router Link State Advertisements. 00639 */ 00640 bool GetLSA (uint32_t n, GlobalRoutingLSA &lsa) const; 00641 00642 private: 00643 virtual ~GlobalRouter (); 00644 void ClearLSAs (void); 00645 00646 Ptr<NetDevice> GetAdjacent(Ptr<NetDevice> nd, Ptr<Channel> ch) const; 00647 bool FindIfIndexForDevice(Ptr<Node> node, Ptr<NetDevice> nd, uint32_t &index) const; 00648 Ipv4Address FindDesignatedRouterForLink (Ptr<NetDevice> ndLocal, bool allowRecursion) const; 00649 bool AnotherRouterOnLink (Ptr<NetDevice> nd, bool allowRecursion) const; 00650 void ProcessBroadcastLink (Ptr<NetDevice> nd, GlobalRoutingLSA *pLSA, NetDeviceContainer &c); 00651 void ProcessSingleBroadcastLink (Ptr<NetDevice> nd, GlobalRoutingLSA *pLSA, NetDeviceContainer &c); 00652 void ProcessBridgedBroadcastLink (Ptr<NetDevice> nd, GlobalRoutingLSA *pLSA, NetDeviceContainer &c); 00653 00654 void ProcessPointToPointLink (Ptr<NetDevice> ndLocal, GlobalRoutingLSA *pLSA); 00655 void BuildNetworkLSAs (NetDeviceContainer c); 00656 Ptr<BridgeNetDevice> NetDeviceIsBridged (Ptr<NetDevice> nd) const; 00657 00658 00659 typedef std::list<GlobalRoutingLSA*> ListOfLSAs_t; 00660 ListOfLSAs_t m_LSAs; 00661 00662 Ipv4Address m_routerId; 00663 00664 // inherited from Object 00665 virtual void DoDispose (void); 00666 00667 /** 00668 * @brief Global Router copy construction is disallowed. 00669 */ 00670 GlobalRouter (GlobalRouter& sr); 00671 00672 /** 00673 * @brief Global Router assignment operator is disallowed. 00674 */ 00675 GlobalRouter& operator= (GlobalRouter& sr); 00676 }; 00677 00678 } // namespace ns3 00679 00680 #endif /* GLOBAL_ROUTER_INTERFACE_H */