bindings/python/ns3_module_tap_bridge.py
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Sat, 04 Jul 2009 08:15:48 +0200
changeset 4654 2eaebe77d66b
parent 4474 19e2b7ff3482
permissions -rw-r--r--
Added tag ns-3.5 for changeset c975274c9707
tomh@4474
     1
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
gjc@4204
     2
gjc@4204
     3
def register_types(module):
gjc@4204
     4
    root_module = module.get_root()
gjc@4204
     5
    
gjc@4204
     6
    ## tap-bridge.h: ns3::TapBridge [class]
gjc@4204
     7
    module.add_class('TapBridge', parent=root_module['ns3::NetDevice'])
craigdo@4298
     8
    ## tap-bridge.h: ns3::TapBridge::Mode [enumeration]
craigdo@4298
     9
    module.add_enum('Mode', ['ILLEGAL', 'CONFIGURE_LOCAL', 'USE_LOCAL', 'USE_BRIDGE'], outer_class=root_module['ns3::TapBridge'])
gjc@4204
    10
    
gjc@4204
    11
    ## Register a nested module for the namespace Config
gjc@4204
    12
    
gjc@4204
    13
    nested_module = module.add_cpp_namespace('Config')
gjc@4204
    14
    register_types_ns3_Config(nested_module)
gjc@4204
    15
    
gjc@4204
    16
    
gjc@4204
    17
    ## Register a nested module for the namespace TimeStepPrecision
gjc@4204
    18
    
gjc@4204
    19
    nested_module = module.add_cpp_namespace('TimeStepPrecision')
gjc@4204
    20
    register_types_ns3_TimeStepPrecision(nested_module)
gjc@4204
    21
    
gjc@4204
    22
    
tomh@4474
    23
    ## Register a nested module for the namespace addressUtils
tomh@4474
    24
    
tomh@4474
    25
    nested_module = module.add_cpp_namespace('addressUtils')
tomh@4474
    26
    register_types_ns3_addressUtils(nested_module)
tomh@4474
    27
    
tomh@4474
    28
    
gjc@4204
    29
    ## Register a nested module for the namespace internal
gjc@4204
    30
    
gjc@4204
    31
    nested_module = module.add_cpp_namespace('internal')
gjc@4204
    32
    register_types_ns3_internal(nested_module)
gjc@4204
    33
    
gjc@4204
    34
    
gjc@4204
    35
    ## Register a nested module for the namespace olsr
gjc@4204
    36
    
gjc@4204
    37
    nested_module = module.add_cpp_namespace('olsr')
gjc@4204
    38
    register_types_ns3_olsr(nested_module)
gjc@4204
    39
    
gjc@4204
    40
gjc@4204
    41
def register_types_ns3_Config(module):
gjc@4204
    42
    root_module = module.get_root()
gjc@4204
    43
    
gjc@4204
    44
gjc@4204
    45
def register_types_ns3_TimeStepPrecision(module):
gjc@4204
    46
    root_module = module.get_root()
gjc@4204
    47
    
gjc@4204
    48
tomh@4474
    49
def register_types_ns3_addressUtils(module):
tomh@4474
    50
    root_module = module.get_root()
tomh@4474
    51
    
tomh@4474
    52
gjc@4204
    53
def register_types_ns3_internal(module):
gjc@4204
    54
    root_module = module.get_root()
gjc@4204
    55
    
gjc@4204
    56
gjc@4204
    57
def register_types_ns3_olsr(module):
gjc@4204
    58
    root_module = module.get_root()
gjc@4204
    59
    
gjc@4204
    60
gjc@4204
    61
def register_methods(root_module):
gjc@4204
    62
    register_Ns3TapBridge_methods(root_module, root_module['ns3::TapBridge'])
gjc@4204
    63
    return
gjc@4204
    64
gjc@4204
    65
def register_Ns3TapBridge_methods(root_module, cls):
mathieu@4241
    66
    ## tap-bridge.h: ns3::TapBridge::TapBridge(ns3::TapBridge const & arg0) [copy constructor]
mathieu@4241
    67
    cls.add_constructor([param('ns3::TapBridge const &', 'arg0')])
gjc@4204
    68
    ## tap-bridge.h: static ns3::TypeId ns3::TapBridge::GetTypeId() [member function]
gjc@4204
    69
    cls.add_method('GetTypeId', 
gjc@4204
    70
                   'ns3::TypeId', 
gjc@4204
    71
                   [], 
gjc@4204
    72
                   is_static=True)
gjc@4204
    73
    ## tap-bridge.h: ns3::TapBridge::TapBridge() [constructor]
gjc@4204
    74
    cls.add_constructor([])
gjc@4204
    75
    ## tap-bridge.h: ns3::Ptr<ns3::NetDevice> ns3::TapBridge::GetBridgedNetDevice() [member function]
gjc@4204
    76
    cls.add_method('GetBridgedNetDevice', 
gjc@4204
    77
                   'ns3::Ptr< ns3::NetDevice >', 
gjc@4204
    78
                   [])
gjc@4204
    79
    ## tap-bridge.h: void ns3::TapBridge::SetBridgedNetDevice(ns3::Ptr<ns3::NetDevice> bridgedDevice) [member function]
gjc@4204
    80
    cls.add_method('SetBridgedNetDevice', 
gjc@4204
    81
                   'void', 
gjc@4204
    82
                   [param('ns3::Ptr< ns3::NetDevice >', 'bridgedDevice')])
gjc@4204
    83
    ## tap-bridge.h: void ns3::TapBridge::Start(ns3::Time tStart) [member function]
gjc@4204
    84
    cls.add_method('Start', 
gjc@4204
    85
                   'void', 
gjc@4204
    86
                   [param('ns3::Time', 'tStart')])
gjc@4204
    87
    ## tap-bridge.h: void ns3::TapBridge::Stop(ns3::Time tStop) [member function]
gjc@4204
    88
    cls.add_method('Stop', 
gjc@4204
    89
                   'void', 
gjc@4204
    90
                   [param('ns3::Time', 'tStop')])
craigdo@4298
    91
    ## tap-bridge.h: void ns3::TapBridge::SetMode(ns3::TapBridge::Mode mode) [member function]
craigdo@4298
    92
    cls.add_method('SetMode', 
craigdo@4298
    93
                   'void', 
craigdo@4298
    94
                   [param('ns3::TapBridge::Mode', 'mode')])
craigdo@4298
    95
    ## tap-bridge.h: ns3::TapBridge::Mode ns3::TapBridge::GetMode() [member function]
craigdo@4298
    96
    cls.add_method('GetMode', 
craigdo@4298
    97
                   'ns3::TapBridge::Mode', 
craigdo@4298
    98
                   [])
gjc@4204
    99
    ## tap-bridge.h: void ns3::TapBridge::SetIfIndex(uint32_t const index) [member function]
gjc@4204
   100
    cls.add_method('SetIfIndex', 
gjc@4204
   101
                   'void', 
gjc@4204
   102
                   [param('uint32_t const', 'index')], 
gjc@4204
   103
                   is_virtual=True)
gjc@4204
   104
    ## tap-bridge.h: uint32_t ns3::TapBridge::GetIfIndex() const [member function]
gjc@4204
   105
    cls.add_method('GetIfIndex', 
gjc@4204
   106
                   'uint32_t', 
gjc@4204
   107
                   [], 
gjc@4204
   108
                   is_const=True, is_virtual=True)
gjc@4204
   109
    ## tap-bridge.h: ns3::Ptr<ns3::Channel> ns3::TapBridge::GetChannel() const [member function]
gjc@4204
   110
    cls.add_method('GetChannel', 
gjc@4204
   111
                   'ns3::Ptr< ns3::Channel >', 
gjc@4204
   112
                   [], 
gjc@4204
   113
                   is_const=True, is_virtual=True)
tomh@4589
   114
    ## tap-bridge.h: void ns3::TapBridge::SetAddress(ns3::Address address) [member function]
tomh@4589
   115
    cls.add_method('SetAddress', 
tomh@4589
   116
                   'void', 
tomh@4589
   117
                   [param('ns3::Address', 'address')], 
tomh@4589
   118
                   is_virtual=True)
gjc@4204
   119
    ## tap-bridge.h: ns3::Address ns3::TapBridge::GetAddress() const [member function]
gjc@4204
   120
    cls.add_method('GetAddress', 
gjc@4204
   121
                   'ns3::Address', 
gjc@4204
   122
                   [], 
gjc@4204
   123
                   is_const=True, is_virtual=True)
gjc@4204
   124
    ## tap-bridge.h: bool ns3::TapBridge::SetMtu(uint16_t const mtu) [member function]
gjc@4204
   125
    cls.add_method('SetMtu', 
gjc@4204
   126
                   'bool', 
gjc@4204
   127
                   [param('uint16_t const', 'mtu')], 
gjc@4204
   128
                   is_virtual=True)
gjc@4204
   129
    ## tap-bridge.h: uint16_t ns3::TapBridge::GetMtu() const [member function]
gjc@4204
   130
    cls.add_method('GetMtu', 
gjc@4204
   131
                   'uint16_t', 
gjc@4204
   132
                   [], 
gjc@4204
   133
                   is_const=True, is_virtual=True)
gjc@4204
   134
    ## tap-bridge.h: bool ns3::TapBridge::IsLinkUp() const [member function]
gjc@4204
   135
    cls.add_method('IsLinkUp', 
gjc@4204
   136
                   'bool', 
gjc@4204
   137
                   [], 
gjc@4204
   138
                   is_const=True, is_virtual=True)
gjc@4204
   139
    ## tap-bridge.h: void ns3::TapBridge::SetLinkChangeCallback(ns3::Callback<void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function]
gjc@4204
   140
    cls.add_method('SetLinkChangeCallback', 
gjc@4204
   141
                   'void', 
gjc@4204
   142
                   [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], 
gjc@4204
   143
                   is_virtual=True)
gjc@4204
   144
    ## tap-bridge.h: bool ns3::TapBridge::IsBroadcast() const [member function]
gjc@4204
   145
    cls.add_method('IsBroadcast', 
gjc@4204
   146
                   'bool', 
gjc@4204
   147
                   [], 
gjc@4204
   148
                   is_const=True, is_virtual=True)
gjc@4204
   149
    ## tap-bridge.h: ns3::Address ns3::TapBridge::GetBroadcast() const [member function]
gjc@4204
   150
    cls.add_method('GetBroadcast', 
gjc@4204
   151
                   'ns3::Address', 
gjc@4204
   152
                   [], 
gjc@4204
   153
                   is_const=True, is_virtual=True)
gjc@4204
   154
    ## tap-bridge.h: bool ns3::TapBridge::IsMulticast() const [member function]
gjc@4204
   155
    cls.add_method('IsMulticast', 
gjc@4204
   156
                   'bool', 
gjc@4204
   157
                   [], 
gjc@4204
   158
                   is_const=True, is_virtual=True)
gjc@4204
   159
    ## tap-bridge.h: ns3::Address ns3::TapBridge::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function]
gjc@4204
   160
    cls.add_method('GetMulticast', 
gjc@4204
   161
                   'ns3::Address', 
gjc@4204
   162
                   [param('ns3::Ipv4Address', 'multicastGroup')], 
gjc@4204
   163
                   is_const=True, is_virtual=True)
gjc@4204
   164
    ## tap-bridge.h: bool ns3::TapBridge::IsPointToPoint() const [member function]
gjc@4204
   165
    cls.add_method('IsPointToPoint', 
gjc@4204
   166
                   'bool', 
gjc@4204
   167
                   [], 
gjc@4204
   168
                   is_const=True, is_virtual=True)
gjc@4204
   169
    ## tap-bridge.h: bool ns3::TapBridge::IsBridge() const [member function]
gjc@4204
   170
    cls.add_method('IsBridge', 
gjc@4204
   171
                   'bool', 
gjc@4204
   172
                   [], 
gjc@4204
   173
                   is_const=True, is_virtual=True)
gjc@4204
   174
    ## tap-bridge.h: bool ns3::TapBridge::Send(ns3::Ptr<ns3::Packet> packet, ns3::Address const & dest, uint16_t protocolNumber) [member function]
gjc@4204
   175
    cls.add_method('Send', 
gjc@4204
   176
                   'bool', 
gjc@4204
   177
                   [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], 
gjc@4204
   178
                   is_virtual=True)
gjc@4204
   179
    ## tap-bridge.h: bool ns3::TapBridge::SendFrom(ns3::Ptr<ns3::Packet> packet, ns3::Address const & source, ns3::Address const & dest, uint16_t protocolNumber) [member function]
gjc@4204
   180
    cls.add_method('SendFrom', 
gjc@4204
   181
                   'bool', 
gjc@4204
   182
                   [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], 
gjc@4204
   183
                   is_virtual=True)
gjc@4204
   184
    ## tap-bridge.h: ns3::Ptr<ns3::Node> ns3::TapBridge::GetNode() const [member function]
gjc@4204
   185
    cls.add_method('GetNode', 
gjc@4204
   186
                   'ns3::Ptr< ns3::Node >', 
gjc@4204
   187
                   [], 
gjc@4204
   188
                   is_const=True, is_virtual=True)
gjc@4204
   189
    ## tap-bridge.h: void ns3::TapBridge::SetNode(ns3::Ptr<ns3::Node> node) [member function]
gjc@4204
   190
    cls.add_method('SetNode', 
gjc@4204
   191
                   'void', 
gjc@4204
   192
                   [param('ns3::Ptr< ns3::Node >', 'node')], 
gjc@4204
   193
                   is_virtual=True)
gjc@4204
   194
    ## tap-bridge.h: bool ns3::TapBridge::NeedsArp() const [member function]
gjc@4204
   195
    cls.add_method('NeedsArp', 
gjc@4204
   196
                   'bool', 
gjc@4204
   197
                   [], 
gjc@4204
   198
                   is_const=True, is_virtual=True)
gjc@4204
   199
    ## tap-bridge.h: void ns3::TapBridge::SetReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> cb) [member function]
gjc@4204
   200
    cls.add_method('SetReceiveCallback', 
gjc@4204
   201
                   'void', 
gjc@4204
   202
                   [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')], 
gjc@4204
   203
                   is_virtual=True)
gjc@4204
   204
    ## tap-bridge.h: void ns3::TapBridge::SetPromiscReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty> cb) [member function]
gjc@4204
   205
    cls.add_method('SetPromiscReceiveCallback', 
gjc@4204
   206
                   'void', 
gjc@4204
   207
                   [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::Address const &, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty >', 'cb')], 
gjc@4204
   208
                   is_virtual=True)
gjc@4204
   209
    ## tap-bridge.h: bool ns3::TapBridge::SupportsSendFrom() const [member function]
gjc@4204
   210
    cls.add_method('SupportsSendFrom', 
gjc@4204
   211
                   'bool', 
gjc@4204
   212
                   [], 
gjc@4204
   213
                   is_const=True, is_virtual=True)
gjc@4204
   214
    ## tap-bridge.h: ns3::Address ns3::TapBridge::GetMulticast(ns3::Ipv6Address addr) const [member function]
gjc@4204
   215
    cls.add_method('GetMulticast', 
gjc@4204
   216
                   'ns3::Address', 
gjc@4204
   217
                   [param('ns3::Ipv6Address', 'addr')], 
gjc@4204
   218
                   is_const=True, is_virtual=True)
gjc@4204
   219
    ## tap-bridge.h: void ns3::TapBridge::DoDispose() [member function]
gjc@4204
   220
    cls.add_method('DoDispose', 
gjc@4204
   221
                   'void', 
gjc@4204
   222
                   [], 
gjc@4204
   223
                   visibility='protected', is_virtual=True)
tomh@4589
   224
    ## tap-bridge.h: bool ns3::TapBridge::ReceiveFromBridgedDevice(ns3::Ptr<ns3::NetDevice> device, ns3::Ptr<ns3::Packet const> packet, uint16_t protocol, ns3::Address const & src, ns3::Address const & dst, ns3::NetDevice::PacketType packetType) [member function]
gjc@4204
   225
    cls.add_method('ReceiveFromBridgedDevice', 
tomh@4589
   226
                   'bool', 
gjc@4204
   227
                   [param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'protocol'), param('ns3::Address const &', 'src'), param('ns3::Address const &', 'dst'), param('ns3::NetDevice::PacketType', 'packetType')], 
gjc@4204
   228
                   visibility='protected')
tomh@4589
   229
    ## tap-bridge.h: bool ns3::TapBridge::DiscardFromBridgedDevice(ns3::Ptr<ns3::NetDevice> device, ns3::Ptr<ns3::Packet const> packet, uint16_t protocol, ns3::Address const & src) [member function]
tomh@4589
   230
    cls.add_method('DiscardFromBridgedDevice', 
tomh@4589
   231
                   'bool', 
tomh@4589
   232
                   [param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'protocol'), param('ns3::Address const &', 'src')], 
tomh@4589
   233
                   visibility='protected')
gjc@4204
   234
    return
gjc@4204
   235
gjc@4204
   236
def register_functions(root_module):
gjc@4204
   237
    module = root_module
gjc@4204
   238
    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
gjc@4204
   239
    register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
tomh@4474
   240
    register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module)
gjc@4204
   241
    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
gjc@4204
   242
    register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
gjc@4204
   243
    return
gjc@4204
   244
gjc@4204
   245
def register_functions_ns3_Config(module, root_module):
gjc@4204
   246
    return
gjc@4204
   247
gjc@4204
   248
def register_functions_ns3_TimeStepPrecision(module, root_module):
gjc@4204
   249
    return
gjc@4204
   250
tomh@4474
   251
def register_functions_ns3_addressUtils(module, root_module):
tomh@4474
   252
    return
tomh@4474
   253
gjc@4204
   254
def register_functions_ns3_internal(module, root_module):
gjc@4204
   255
    return
gjc@4204
   256
gjc@4204
   257
def register_functions_ns3_olsr(module, root_module):
gjc@4204
   258
    return
gjc@4204
   259