bindings/python/ns3_module_global_routing.py
changeset 4654 2eaebe77d66b
parent 4474 19e2b7ff3482
     1.1 --- a/bindings/python/ns3_module_global_routing.py	Thu May 28 21:38:49 2009 -0700
     1.2 +++ b/bindings/python/ns3_module_global_routing.py	Sat Jul 04 08:15:48 2009 +0200
     1.3 @@ -17,6 +17,8 @@
     1.4      module.add_enum('LinkType', ['Unknown', 'PointToPoint', 'TransitNetwork', 'StubNetwork', 'VirtualLink'], outer_class=root_module['ns3::GlobalRoutingLinkRecord'])
     1.5      ## global-router-interface.h: ns3::GlobalRouter [class]
     1.6      module.add_class('GlobalRouter', is_singleton=True, parent=root_module['ns3::Object'])
     1.7 +    ## ipv4-global-routing.h: ns3::Ipv4GlobalRouting [class]
     1.8 +    module.add_class('Ipv4GlobalRouting', parent=root_module['ns3::Ipv4RoutingProtocol'])
     1.9      
    1.10      ## Register a nested module for the namespace Config
    1.11      
    1.12 @@ -73,6 +75,7 @@
    1.13      register_Ns3GlobalRoutingLSA_methods(root_module, root_module['ns3::GlobalRoutingLSA'])
    1.14      register_Ns3GlobalRoutingLinkRecord_methods(root_module, root_module['ns3::GlobalRoutingLinkRecord'])
    1.15      register_Ns3GlobalRouter_methods(root_module, root_module['ns3::GlobalRouter'])
    1.16 +    register_Ns3Ipv4GlobalRouting_methods(root_module, root_module['ns3::Ipv4GlobalRouting'])
    1.17      return
    1.18  
    1.19  def register_Ns3GlobalRouteManager_methods(root_module, cls):
    1.20 @@ -81,31 +84,11 @@
    1.21                     'void', 
    1.22                     [], 
    1.23                     is_static=True)
    1.24 -    ## global-route-manager.h: static void ns3::GlobalRouteManager::PopulateRoutingTables(ns3::NodeContainer c) [member function]
    1.25 -    cls.add_method('PopulateRoutingTables', 
    1.26 -                   'void', 
    1.27 -                   [param('ns3::NodeContainer', 'c')], 
    1.28 -                   is_static=True)
    1.29      ## global-route-manager.h: static void ns3::GlobalRouteManager::RecomputeRoutingTables() [member function]
    1.30      cls.add_method('RecomputeRoutingTables', 
    1.31                     'void', 
    1.32                     [], 
    1.33                     is_static=True)
    1.34 -    ## global-route-manager.h: static void ns3::GlobalRouteManager::DeleteGlobalRoutes() [member function]
    1.35 -    cls.add_method('DeleteGlobalRoutes', 
    1.36 -                   'void', 
    1.37 -                   [], 
    1.38 -                   is_static=True)
    1.39 -    ## global-route-manager.h: static void ns3::GlobalRouteManager::SelectRouterNodes() [member function]
    1.40 -    cls.add_method('SelectRouterNodes', 
    1.41 -                   'void', 
    1.42 -                   [], 
    1.43 -                   is_static=True)
    1.44 -    ## global-route-manager.h: static void ns3::GlobalRouteManager::SelectRouterNodes(ns3::NodeContainer c) [member function]
    1.45 -    cls.add_method('SelectRouterNodes', 
    1.46 -                   'void', 
    1.47 -                   [param('ns3::NodeContainer', 'c')], 
    1.48 -                   is_static=True)
    1.49      ## global-route-manager.h: static uint32_t ns3::GlobalRouteManager::AllocateRouterId() [member function]
    1.50      cls.add_method('AllocateRouterId', 
    1.51                     'uint32_t', 
    1.52 @@ -267,6 +250,14 @@
    1.53                     is_static=True)
    1.54      ## global-router-interface.h: ns3::GlobalRouter::GlobalRouter() [constructor]
    1.55      cls.add_constructor([])
    1.56 +    ## global-router-interface.h: void ns3::GlobalRouter::SetRoutingProtocol(ns3::Ptr<ns3::Ipv4GlobalRouting> routing) [member function]
    1.57 +    cls.add_method('SetRoutingProtocol', 
    1.58 +                   'void', 
    1.59 +                   [param('ns3::Ptr< ns3::Ipv4GlobalRouting >', 'routing')])
    1.60 +    ## global-router-interface.h: ns3::Ptr<ns3::Ipv4GlobalRouting> ns3::GlobalRouter::GetRoutingProtocol() [member function]
    1.61 +    cls.add_method('GetRoutingProtocol', 
    1.62 +                   'ns3::Ptr< ns3::Ipv4GlobalRouting >', 
    1.63 +                   [])
    1.64      ## global-router-interface.h: ns3::Ipv4Address ns3::GlobalRouter::GetRouterId() const [member function]
    1.65      cls.add_method('GetRouterId', 
    1.66                     'ns3::Ipv4Address', 
    1.67 @@ -293,6 +284,86 @@
    1.68                     visibility='private', is_virtual=True)
    1.69      return
    1.70  
    1.71 +def register_Ns3Ipv4GlobalRouting_methods(root_module, cls):
    1.72 +    ## ipv4-global-routing.h: ns3::Ipv4GlobalRouting::Ipv4GlobalRouting(ns3::Ipv4GlobalRouting const & arg0) [copy constructor]
    1.73 +    cls.add_constructor([param('ns3::Ipv4GlobalRouting const &', 'arg0')])
    1.74 +    ## ipv4-global-routing.h: static ns3::TypeId ns3::Ipv4GlobalRouting::GetTypeId() [member function]
    1.75 +    cls.add_method('GetTypeId', 
    1.76 +                   'ns3::TypeId', 
    1.77 +                   [], 
    1.78 +                   is_static=True)
    1.79 +    ## ipv4-global-routing.h: ns3::Ipv4GlobalRouting::Ipv4GlobalRouting() [constructor]
    1.80 +    cls.add_constructor([])
    1.81 +    ## ipv4-global-routing.h: ns3::Ptr<ns3::Ipv4Route> ns3::Ipv4GlobalRouting::RouteOutput(ns3::Ptr<ns3::Packet> p, ns3::Ipv4Header const & header, uint32_t oif, ns3::Socket::SocketErrno & sockerr) [member function]
    1.82 +    cls.add_method('RouteOutput', 
    1.83 +                   'ns3::Ptr< ns3::Ipv4Route >', 
    1.84 +                   [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('uint32_t', 'oif'), param('ns3::Socket::SocketErrno &', 'sockerr')], 
    1.85 +                   is_virtual=True)
    1.86 +    ## ipv4-global-routing.h: bool ns3::Ipv4GlobalRouting::RouteInput(ns3::Ptr<ns3::Packet const> p, ns3::Ipv4Header const & header, ns3::Ptr<const ns3::NetDevice> idev, ns3::Callback<void,ns3::Ptr<ns3::Ipv4Route>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback<void,ns3::Ptr<ns3::Ipv4MulticastRoute>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv4Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv4Header&,ns3::Socket::SocketErrno,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ecb) [member function]
    1.87 +    cls.add_method('RouteInput', 
    1.88 +                   'bool', 
    1.89 +                   [param('ns3::Ptr< ns3::Packet const >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'lcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')], 
    1.90 +                   is_virtual=True)
    1.91 +    ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::NotifyInterfaceUp(uint32_t interface) [member function]
    1.92 +    cls.add_method('NotifyInterfaceUp', 
    1.93 +                   'void', 
    1.94 +                   [param('uint32_t', 'interface')], 
    1.95 +                   is_virtual=True)
    1.96 +    ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::NotifyInterfaceDown(uint32_t interface) [member function]
    1.97 +    cls.add_method('NotifyInterfaceDown', 
    1.98 +                   'void', 
    1.99 +                   [param('uint32_t', 'interface')], 
   1.100 +                   is_virtual=True)
   1.101 +    ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::NotifyAddAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function]
   1.102 +    cls.add_method('NotifyAddAddress', 
   1.103 +                   'void', 
   1.104 +                   [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], 
   1.105 +                   is_virtual=True)
   1.106 +    ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::NotifyRemoveAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function]
   1.107 +    cls.add_method('NotifyRemoveAddress', 
   1.108 +                   'void', 
   1.109 +                   [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], 
   1.110 +                   is_virtual=True)
   1.111 +    ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::SetIpv4(ns3::Ptr<ns3::Ipv4> ipv4) [member function]
   1.112 +    cls.add_method('SetIpv4', 
   1.113 +                   'void', 
   1.114 +                   [param('ns3::Ptr< ns3::Ipv4 >', 'ipv4')], 
   1.115 +                   is_virtual=True)
   1.116 +    ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::AddHostRouteTo(ns3::Ipv4Address dest, ns3::Ipv4Address nextHop, uint32_t interface) [member function]
   1.117 +    cls.add_method('AddHostRouteTo', 
   1.118 +                   'void', 
   1.119 +                   [param('ns3::Ipv4Address', 'dest'), param('ns3::Ipv4Address', 'nextHop'), param('uint32_t', 'interface')])
   1.120 +    ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::AddHostRouteTo(ns3::Ipv4Address dest, uint32_t interface) [member function]
   1.121 +    cls.add_method('AddHostRouteTo', 
   1.122 +                   'void', 
   1.123 +                   [param('ns3::Ipv4Address', 'dest'), param('uint32_t', 'interface')])
   1.124 +    ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::AddNetworkRouteTo(ns3::Ipv4Address network, ns3::Ipv4Mask networkMask, ns3::Ipv4Address nextHop, uint32_t interface) [member function]
   1.125 +    cls.add_method('AddNetworkRouteTo', 
   1.126 +                   'void', 
   1.127 +                   [param('ns3::Ipv4Address', 'network'), param('ns3::Ipv4Mask', 'networkMask'), param('ns3::Ipv4Address', 'nextHop'), param('uint32_t', 'interface')])
   1.128 +    ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::AddNetworkRouteTo(ns3::Ipv4Address network, ns3::Ipv4Mask networkMask, uint32_t interface) [member function]
   1.129 +    cls.add_method('AddNetworkRouteTo', 
   1.130 +                   'void', 
   1.131 +                   [param('ns3::Ipv4Address', 'network'), param('ns3::Ipv4Mask', 'networkMask'), param('uint32_t', 'interface')])
   1.132 +    ## ipv4-global-routing.h: uint32_t ns3::Ipv4GlobalRouting::GetNRoutes() [member function]
   1.133 +    cls.add_method('GetNRoutes', 
   1.134 +                   'uint32_t', 
   1.135 +                   [])
   1.136 +    ## ipv4-global-routing.h: ns3::Ipv4RoutingTableEntry * ns3::Ipv4GlobalRouting::GetRoute(uint32_t i) [member function]
   1.137 +    cls.add_method('GetRoute', 
   1.138 +                   'ns3::Ipv4RoutingTableEntry *', 
   1.139 +                   [param('uint32_t', 'i')])
   1.140 +    ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::RemoveRoute(uint32_t i) [member function]
   1.141 +    cls.add_method('RemoveRoute', 
   1.142 +                   'void', 
   1.143 +                   [param('uint32_t', 'i')])
   1.144 +    ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::DoDispose() [member function]
   1.145 +    cls.add_method('DoDispose', 
   1.146 +                   'void', 
   1.147 +                   [], 
   1.148 +                   visibility='protected', is_virtual=True)
   1.149 +    return
   1.150 +
   1.151  def register_functions(root_module):
   1.152      module = root_module
   1.153      register_functions_ns3_Config(module.get_submodule('Config'), root_module)