new tag: nepi_v2
[nepi.git] / src / nepi / testbeds / ns3 / factories_metadata_v3_9_RC3.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4 from nepi.util import tags
5 from nepi.util.constants import AF_INET, STATUS_NOT_STARTED, STATUS_RUNNING, \
6         STATUS_FINISHED, STATUS_UNDETERMINED
7 from nepi.util.tunchannel_impl import \
8     preconfigure_tunchannel, postconfigure_tunchannel, \
9     wait_tunchannel, create_tunchannel
10
11 wifi_standards = dict({
12     "WIFI_PHY_STANDARD_holland": 5,
13     "WIFI_PHY_STANDARD_80211p_SCH": 7,
14     "WIFI_PHY_STANDARD_80211_5Mhz": 4,
15     "WIFI_PHY_UNKNOWN": 8,
16     "WIFI_PHY_STANDARD_80211_10Mhz": 3,
17     "WIFI_PHY_STANDARD_80211g": 2,
18     "WIFI_PHY_STANDARD_80211p_CCH": 6,
19     "WIFI_PHY_STANDARD_80211a": 0,
20     "WIFI_PHY_STANDARD_80211b": 1
21 })
22
23 l4_protocols = dict({
24     "Icmpv4L4Protocol": 1,
25     "UdpL4Protocol": 17,
26     "TcpL4Protocol": 6,
27 })
28
29 service_flow_direction = dict({
30     "SF_DIRECTION_UP": 1,
31     "SF_DIRECTION_DOWN": 0,
32 })
33
34 service_flow_scheduling_type = dict ({
35     "SF_TYPE_NONE": 0,
36     "SF_TYPE_UNDEF": 1, 
37     "SF_TYPE_BE": 2,
38     "SF_TYPE_NRTPS": 3,
39     "SF_TYPE_RTPS": 4,
40     "SF_TYPE_UGS": 6, 
41     "SF_TYPE_ALL": 255
42 })
43
44 def _get_ipv4_protocol_guid(testbed_instance, node_guid):
45     # search for the Ipv4L3Protocol asociated with the device
46     protos_guids = testbed_instance.get_connected(node_guid, "protos", "node")
47     if len(protos_guids) == 0:
48         raise RuntimeError("No protocols where found for the node %d" % node_guid)
49     ipv4_guid = None
50     for proto_guid in protos_guids:
51         proto_factory_id = testbed_instance._create[proto_guid]
52         if proto_factory_id == "ns3::Ipv4L3Protocol":
53             ipv4_guid = proto_guid
54             break
55     if not ipv4_guid:
56         raise RuntimeError("No Ipv4L3Protocol associated to node %d. \
57                 can't add Ipv4 addresses" % node_guid)
58     return ipv4_guid
59
60 def _get_node_guid(testbed_instance, guid):
61     # search for the node asociated with the device
62     node_guids = testbed_instance.get_connected(guid, "node", "devs")
63     if len(node_guids) == 0:
64         raise RuntimeError("Can't instantiate interface %d outside netns \
65                 node" % guid)
66     node_guid = node_guids[0]
67     return node_guid
68
69 def _get_dev_number(testbed_instance, guid):
70     node_guid = _get_node_guid(testbed_instance, guid)
71     dev_guids = testbed_instance.get_connected(node_guid, "devs", "node")
72     interface_number = 0
73     for guid_ in dev_guids:
74         if guid_ == guid:
75             break
76         interface_number += 1
77     return interface_number
78
79 ### create traces functions ###
80
81 def p2pascii_trace(testbed_instance, guid, trace_id):
82     node_guid = _get_node_guid(testbed_instance, guid)
83     interface_number = _get_dev_number(testbed_instance, guid)
84     element = testbed_instance._elements[guid]
85     filename = "trace-p2p-node-%d-dev-%d.tr" % (node_guid, interface_number)
86     testbed_instance.follow_trace(guid, trace_id, filename)
87     filepath = testbed_instance.trace_filename(guid, trace_id)
88     helper = testbed_instance.ns3.PointToPointHelper()
89     asciiHelper = testbed_instance.ns3.AsciiTraceHelper()
90     stream = asciiHelper.CreateFileStream (filepath)
91     helper.EnableAscii(stream, element)
92
93 def p2ppcap_trace(testbed_instance, guid, trace_id):
94     node_guid = _get_node_guid(testbed_instance, guid)
95     interface_number = _get_dev_number(testbed_instance, guid)
96     element = testbed_instance._elements[guid]
97     filename = "trace-p2p-node-%d-dev-%d.pcap" % (node_guid, interface_number)
98     testbed_instance.follow_trace(guid, trace_id, filename)
99     filepath = testbed_instance.trace_filename(guid, trace_id)
100     helper = testbed_instance.ns3.PointToPointHelper()
101     helper.EnablePcap(filepath, element, explicitFilename = True)
102
103 def _csmapcap_trace(testbed_instance, guid, trace_id, promisc):
104     node_guid = _get_node_guid(testbed_instance, guid)
105     interface_number = _get_dev_number(testbed_instance, guid)
106     element = testbed_instance._elements[guid]
107     filename = "trace-csma-node-%d-dev-%d.pcap" % (node_guid, interface_number)
108     testbed_instance.follow_trace(guid, trace_id, filename)
109     filepath = testbed_instance.trace_filename(guid, trace_id)
110     helper = testbed_instance.ns3.CsmaHelper()
111     helper.EnablePcap(filepath, element, promiscuous = promisc, 
112             explicitFilename = True)
113
114 def csmapcap_trace(testbed_instance, guid, trace_id):
115     promisc = False
116     _csmapcap_trace(testbed_instance, guid, trace_id, promisc)
117
118 def csmapcap_promisc_trace(testbed_instance, guid, trace_id):
119     promisc = True
120     _csmapcap_trace(testbed_instance, guid, trace_id, promisc)
121
122 def fdpcap_trace(testbed_instance, guid, trace_id):
123     node_guid = _get_node_guid(testbed_instance, guid)
124     interface_number = _get_dev_number(testbed_instance, guid)
125     element = testbed_instance._elements[guid]
126     filename = "trace-fd-node-%d-dev-%d.pcap" % (node_guid, interface_number)
127     testbed_instance.follow_trace(guid, trace_id, filename)
128     filepath = testbed_instance.trace_filename(guid, trace_id)
129     helper = testbed_instance.ns3.FileDescriptorHelper()
130     helper.EnablePcap(filepath, element, explicitFilename = True)
131
132 def yanswifipcap_trace(testbed_instance, guid, trace_id):
133     dev_guid = testbed_instance.get_connected(guid, "dev", "phy")[0]
134     node_guid = _get_node_guid(testbed_instance, dev_guid)
135     interface_number = _get_dev_number(testbed_instance, dev_guid)
136     element = testbed_instance._elements[dev_guid]
137     filename = "trace-yanswifi-node-%d-dev-%d.pcap" % (node_guid, interface_number)
138     testbed_instance.follow_trace(guid, trace_id, filename)
139     filepath = testbed_instance.trace_filename(guid, trace_id)
140     helper = testbed_instance.ns3.YansWifiPhyHelper()
141     helper.EnablePcap(filepath, element, explicitFilename = True)
142
143 def wimaxascii_trace(testbed_instance, guid, trace_id):
144     node_guid = _get_node_guid(testbed_instance, guid)
145     interface_number = _get_dev_number(testbed_instance, guid)
146     element = testbed_instance._elements[guid]
147     filename = "trace-wimax-node-%d-dev-%d.tr" % (node_guid, interface_number)
148     testbed_instance.follow_trace(guid, trace_id, filename)
149     filepath = testbed_instance.trace_filename(guid, trace_id)
150     helper = testbed_instance.ns3.WimaxHelper()
151     asciiHelper = testbed_instance.ns3.AsciiTraceHelper()
152     stream = asciiHelper.CreateFileStream (filepath)
153     helper.EnableAscii(stream, element)
154     #helper.EnableLogComponents()
155
156 def wimaxpcap_trace(testbed_instance, guid, trace_id):
157     node_guid = _get_node_guid(testbed_instance, guid)
158     interface_number = _get_dev_number(testbed_instance, guid)
159     element = testbed_instance._elements[guid]
160     filename = "trace-wimax-node-%d-dev-%d.pcap" % (node_guid, interface_number)
161     testbed_instance.follow_trace(guid, trace_id, filename)
162     filepath = testbed_instance.trace_filename(guid, trace_id)
163     helper = testbed_instance.ns3.WimaxHelper()
164     helper.EnablePcap(filepath, element, explicitFilename = True)
165
166 def rtt_trace(testbed_instance, guid, trace_id):
167     element = testbed_instance._elements[guid]
168     helper = testbed_instance.ns3.PlotHelper()
169     prefix = "trace-app-%d" % (guid, )
170     filename = helper.GetFilenameFromSource(prefix, element, trace_id)
171     testbed_instance.follow_trace(guid, trace_id, filename)
172     filepath = testbed_instance.trace_filename(guid, trace_id)
173     prefix = filepath[:filepath.find(prefix)+len(prefix)]
174     helper.EnableTrace(element, trace_id, prefix, "T")
175
176
177 trace_functions = dict({
178     "P2PPcapTrace": p2ppcap_trace,
179     "P2PAsciiTrace": p2pascii_trace,
180     "CsmaPcapTrace": csmapcap_trace,
181     "CsmaPcapPromiscTrace": csmapcap_promisc_trace,
182     "FileDescriptorPcapTrace": fdpcap_trace,
183     "YansWifiPhyPcapTrace": yanswifipcap_trace,
184     "WimaxPcapTrace": wimaxpcap_trace,
185     "WimaxAsciiTrace": wimaxascii_trace,
186     "Rtt": rtt_trace,
187     })
188
189 ### Creation functions ###
190
191 def create_element(testbed_instance, guid):
192     element_factory = testbed_instance.ns3.ObjectFactory()
193     factory_id = testbed_instance._create[guid]
194     element_factory.SetTypeId(factory_id) 
195     construct_parameters = testbed_instance._get_construct_parameters(guid)
196     for name, value in construct_parameters.iteritems():
197         ns3_value = testbed_instance._to_ns3_value(guid, name, value)
198         element_factory.Set(name, ns3_value)
199     element = element_factory.Create()
200     testbed_instance._elements[guid] = element
201
202 def create_node(testbed_instance, guid):
203     create_element(testbed_instance, guid)
204     element = testbed_instance._elements[guid]
205     element.AggregateObject(testbed_instance.ns3.PacketSocketFactory())
206
207 def create_wifi_standard_model(testbed_instance, guid):
208     create_element(testbed_instance, guid)
209     element = testbed_instance._elements[guid]
210     parameters = testbed_instance._get_parameters(guid)
211     if "Standard" in parameters:
212         standard = parameters["Standard"]
213         if standard:
214             element.ConfigureStandard(wifi_standards[standard])
215
216 def create_ipv4protocol(testbed_instance, guid):
217     create_element(testbed_instance, guid)
218     element = testbed_instance._elements[guid]
219     list_routing = testbed_instance.ns3.Ipv4ListRouting()
220     element.SetRoutingProtocol(list_routing)
221     static_routing = testbed_instance.ns3.Ipv4StaticRouting()
222     list_routing.AddRoutingProtocol(static_routing, 1)
223
224 def create_element_no_constructor(testbed_instance, guid):
225     """ Create function for ns3 classes for which 
226         TypeId.HasConstructor == False"""
227     factory_id = testbed_instance._create[guid]
228     factory_name = factory_id.replace("ns3::", "")
229     constructor = getattr(testbed_instance.ns3, factory_name)
230     element = constructor()
231     testbed_instance._elements[guid] = element
232
233 def create_base_station(testbed_instance, guid):
234     node_guid = _get_node_guid(testbed_instance, guid)
235     node = testbed_instance._elements[node_guid]
236     phy_guids = testbed_instance.get_connected(guid, "phy", "dev")
237     if len(phy_guids) == 0:
238         raise RuntimeError("No PHY was found for station %d" % guid)
239     phy = testbed_instance._elements[phy_guids[0]]
240     uplnk_guids = testbed_instance.get_connected(guid, "uplnk", "dev")
241     if len(uplnk_guids) == 0:
242         raise RuntimeError("No uplink scheduler was found for station %d" % guid)
243     uplnk = testbed_instance._elements[uplnk_guids[0]]
244     dwnlnk_guids = testbed_instance.get_connected(guid, "dwnlnk", "dev")
245     if len(dwnlnk_guids) == 0:
246         raise RuntimeError("No downlink scheduler was found for station %d" % guid)
247     dwnlnk = testbed_instance._elements[dwnlnk_guids[0]]
248     element = testbed_instance.ns3.BaseStationNetDevice(node, phy, uplnk, dwnlnk)
249     testbed_instance._elements[guid] = element
250
251 def create_subscriber_station(testbed_instance, guid):
252     node_guid = _get_node_guid(testbed_instance, guid)
253     node = testbed_instance._elements[node_guid]
254     phy_guids = testbed_instance.get_connected(guid, "phy", "dev")
255     if len(phy_guids) == 0:
256         raise RuntimeError("No PHY was found for station %d" % guid)
257     phy = testbed_instance._elements[phy_guids[0]]
258     element = testbed_instance.ns3.SubscriberStationNetDevice(node, phy)
259     element.SetModulationType(testbed_instance.ns3.WimaxPhy.MODULATION_TYPE_QAM16_12)
260     testbed_instance._elements[guid] = element
261
262 def create_wimax_channel(testbed_instance, guid):
263     element = testbed_instance.ns3.SimpleOfdmWimaxChannel(testbed_instance.ns3.SimpleOfdmWimaxChannel.COST231_PROPAGATION)
264     testbed_instance._elements[guid] = element
265
266 def create_wimax_phy(testbed_instance, guid):
267     element = testbed_instance.ns3.SimpleOfdmWimaxPhy()
268     testbed_instance._elements[guid] = element
269
270 def create_service_flow(testbed_instance, guid):
271     parameters = testbed_instance._get_parameters(guid)
272     direction = None
273     if "Direction" in parameters:
274         direction = parameters["Direction"]
275     if direction == None:
276         raise RuntimeError("No SchedulingType was found for service flow %d" % guid)
277     sched = None
278     if "SchedulingType" in parameters:
279         sched = parameters["SchedulingType"]
280     if sched == None:
281         raise RuntimeError("No SchedulingType was found for service flow %d" % guid)
282     ServiceFlow = testbed_instance.ns3.ServiceFlow
283     direction = service_flow_direction[direction]
284     sched = service_flow_scheduling_type[sched]
285     element = ServiceFlow(direction)
286     element.SetCsSpecification(ServiceFlow.IPV4)
287     element.SetServiceSchedulingType(sched) 
288     element.SetMaxSustainedTrafficRate(100)
289     element.SetMinReservedTrafficRate(1000000)
290     element.SetMinTolerableTrafficRate(1000000)
291     element.SetMaximumLatency(100)
292     element.SetMaxTrafficBurst(2000)
293     element.SetTrafficPriority(1)
294     element.SetUnsolicitedGrantInterval(1)
295     element.SetMaxSustainedTrafficRate(70)
296     element.SetToleratedJitter(10)
297     element.SetSduSize(49)
298     element.SetRequestTransmissionPolicy(0)
299     testbed_instance._elements[guid] = element
300
301 def create_ipcs_classifier_record(testbed_instance, guid):
302     parameters = testbed_instance._get_parameters(guid)
303     src_address = None
304     if "SrcAddress" in parameters:
305         src_address = parameters["SrcAddress"]
306     if src_address == None:
307         raise RuntimeError("No SrcAddress was found for classifier %d" % guid)
308     src_address = testbed_instance.ns3.Ipv4Address(src_address)
309     src_mask= None
310     if "SrcMask" in parameters:
311         src_mask = parameters["SrcMask"]
312     if src_mask == None:
313         raise RuntimeError("No SrcMask was found for classifier %d" % guid)
314     src_mask = testbed_instance.ns3.Ipv4Mask(src_mask)
315     dst_address = None
316     if "DstAddress" in parameters:
317         dst_address = parameters["DstAddress"]
318     if dst_address == None:
319         raise RuntimeError("No Dstddress was found for classifier %d" % guid)
320     dst_address = testbed_instance.ns3.Ipv4Address(dst_address)
321     dst_mask= None
322     if "DstMask" in parameters:
323         dst_mask = parameters["DstMask"]
324     if dst_mask == None:
325         raise RuntimeError("No DstMask was found for classifier %d" % guid)
326     dst_mask = testbed_instance.ns3.Ipv4Mask(dst_mask)
327     src_port_low = None
328     if "SrcPortLow" in parameters:
329         src_port_low = parameters["SrcPortLow"]
330     if src_port_low == None:
331         raise RuntimeError("No SrcPortLow was found for classifier %d" % guid)
332     src_port_high= None
333     if "SrcPortHigh" in parameters:
334         src_port_high = parameters["SrcPortHigh"]
335     if src_port_high == None:
336         raise RuntimeError("No SrcPortHigh was found for classifier %d" % guid)
337     dst_port_low = None
338     if "DstPortLow" in parameters:
339         dst_port_low = parameters["DstPortLow"]
340     if dst_port_low == None:
341         raise RuntimeError("No DstPortLow was found for classifier %d" % guid)
342     dst_port_high = None
343     if "DstPortHigh" in parameters:
344         dst_port_high = parameters["DstPortHigh"]
345     if dst_port_high == None:
346         raise RuntimeError("No DstPortHigh was found for classifier %d" % guid)
347     protocol = None
348     if "Protocol" in parameters:
349         protocol = parameters["Protocol"]
350     if protocol == None or protocol not in l4_protocols:
351         raise RuntimeError("No Protocol was found for classifier %d" % guid)
352     priority = None
353     if "Priority" in parameters:
354         priority = parameters["Priority"]
355     if priority == None:
356         raise RuntimeError("No Priority was found for classifier %d" % guid)
357     element = testbed_instance.ns3.IpcsClassifierRecord(src_address, src_mask,
358         dst_address, dst_mask, src_port_low, src_port_high, dst_port_low, 
359         dst_port_high, l4_protocols[protocol], priority)
360     testbed_instance._elements[guid] = element
361
362 ### Start/Stop functions ###
363
364 def start_application(testbed_instance, guid):
365     element = testbed_instance.elements[guid]
366     # BUG: without doing this explicit call it doesn't start!!!
367     # Shouldn't be enough to set the StartTime?
368     element.Start()
369
370 def stop_application(testbed_instance, guid):
371     element = testbed_instance.elements[guid]
372     now = testbed_instance.ns3.Simulator.Now()
373     element.SetStopTime(now)
374
375 ### Status functions ###
376
377 def status_application(testbed_instance, guid):
378     if guid not in testbed_instance.elements.keys():
379         raise RuntimeError("Can't get status on guid %d" % guid )
380     now = testbed_instance.ns3.Simulator.Now()
381     if now.IsZero():
382         return STATUS_NOT_STARTED
383     app = testbed_instance.elements[guid]
384     parameters = testbed_instance._get_parameters(guid)
385     if "StartTime" in parameters and parameters["StartTime"]:
386         start_value = parameters["StartTime"]
387         start_time = testbed_instance.ns3.Time(start_value)
388         if now.Compare(start_time) < 0:
389             return STATUS_NOT_STARTED
390     if "StopTime" in parameters and parameters["StopTime"]:
391         stop_value = parameters["StopTime"]
392         stop_time = testbed_instance.ns3.Time(stop_value)
393         if now.Compare(stop_time) < 0:
394             return STATUS_RUNNING
395         else:
396             return STATUS_FINISHED
397     return STATUS_UNDETERMINED
398
399 ### Configure functions ###
400
401 def configure_traces(testbed_instance, guid):
402     traces = testbed_instance._get_traces(guid)
403     for trace_id in traces:
404         trace_func = trace_functions[trace_id]
405         trace_func(testbed_instance, guid, trace_id)
406
407 def configure_element(testbed_instance, guid):
408     configure_traces(testbed_instance, guid)
409
410 def configure_device(testbed_instance, guid):
411     configure_traces(testbed_instance, guid)
412
413     element = testbed_instance._elements[guid]
414
415     parameters = testbed_instance._get_parameters(guid)
416     if "macAddress" in parameters:
417         address = parameters["macAddress"]
418         macaddr = testbed_instance.ns3.Mac48Address(address)
419     else:
420         macaddr = testbed_instance.ns3.Mac48Address.Allocate()
421     element.SetAddress(macaddr)
422
423     if not guid in testbed_instance._add_address:
424         return
425     # search for the node asociated with the device
426     node_guid = _get_node_guid(testbed_instance, guid)
427     node = testbed_instance.elements[node_guid]
428     # search for the Ipv4L3Protocol asociated with the device
429     ipv4_guid = _get_ipv4_protocol_guid(testbed_instance, node_guid)
430     ipv4 = testbed_instance._elements[ipv4_guid]
431     ns3 = testbed_instance.ns3
432     # add addresses 
433     addresses = testbed_instance._add_address[guid]
434     for address in addresses:
435         (address, netprefix, broadcast) = address
436         # TODO: missing IPV6 addresses!!
437         ifindex = ipv4.AddInterface(element)
438         inaddr = ns3.Ipv4InterfaceAddress(ns3.Ipv4Address(address),
439                 ns3.Ipv4Mask("/%d" % netprefix))
440         ipv4.AddAddress(ifindex, inaddr)
441         ipv4.SetMetric(ifindex, 1)
442         ipv4.SetUp(ifindex)
443
444 def _add_static_route(ns3, static_routing, 
445         address, netprefix, nexthop_address, ifindex):
446     if netprefix == 0:
447         # Default route: 0.0.0.0/0
448         static_routing.SetDefaultRoute(nexthop_address, ifindex) 
449     elif netprefix == 32:
450         # Host route: x.y.z.w/32
451         static_routing.AddHostRouteTo(address, nexthop_address, ifindex) 
452     else:
453         # Network route: x.y.z.w/n
454         mask = ns3.Ipv4Mask("/%d" % netprefix) 
455         static_routing.AddNetworkRouteTo(address, mask, nexthop_address, 
456                 ifindex) 
457
458 def _add_static_route_if(ns3, static_routing, address, netprefix, ifindex):
459     if netprefix == 0:
460         # Default route: 0.0.0.0/0
461         static_routing.SetDefaultRoute(ifindex) 
462     elif netprefix == 32:
463         # Host route: x.y.z.w/32
464         static_routing.AddHostRouteTo(address, ifindex) 
465     else:
466         # Network route: x.y.z.w/n
467         mask = ns3.Ipv4Mask("/%d" % netprefix) 
468         static_routing.AddNetworkRouteTo(address, mask, ifindex) 
469
470 def configure_node(testbed_instance, guid):
471     configure_traces(testbed_instance, guid)
472
473     element = testbed_instance._elements[guid]
474     if not guid in testbed_instance._add_route:
475         return
476     # search for the Ipv4L3Protocol asociated with the device
477     ipv4_guid = _get_ipv4_protocol_guid(testbed_instance, guid)
478     ipv4 = testbed_instance._elements[ipv4_guid]
479     list_routing = ipv4.GetRoutingProtocol()
480     (static_routing, priority) = list_routing.GetRoutingProtocol(0)
481     ns3 = testbed_instance.ns3
482     routes = testbed_instance._add_route[guid]
483     for route in routes:
484         (destination, netprefix, nexthop) = route
485         address = ns3.Ipv4Address(destination)
486         if nexthop:
487             nexthop_address = ns3.Ipv4Address(nexthop)
488             ifindex = -1
489             # TODO: HACKISH way of getting the ifindex... improve this
490             nifaces = ipv4.GetNInterfaces()
491             for ifidx in xrange(nifaces):
492                 iface = ipv4.GetInterface(ifidx)
493                 naddress = iface.GetNAddresses()
494                 for addridx in xrange(naddress):
495                     ifaddr = iface.GetAddress(addridx)
496                     ifmask = ifaddr.GetMask()
497                     ifindex = ipv4.GetInterfaceForPrefix(nexthop_address, ifmask)
498                     if ifindex == ifidx:
499                         break
500             if ifindex < 0:
501                 # Check previous ptp routes
502                 for chaindest, chainprefix, chainhop in routes:
503                     if chaindest == nexthop and chainprefix == 32:
504                         chainhop_address = ns3.Ipv4Address(chainhop)
505                         for ifidx in xrange(nifaces):
506                             iface = ipv4.GetInterface(ifidx)
507                             naddress = iface.GetNAddresses()
508                             for addridx in xrange(naddress):
509                                 ifaddr = iface.GetAddress(addridx)
510                                 ifmask = ifaddr.GetMask()
511                                 ifindex = ipv4.GetInterfaceForPrefix(chainhop_address, ifmask)
512                                 if ifindex == ifidx:
513                                     break
514             if ifindex < 0:
515                 raise RuntimeError, "Cannot associate interface for routing entry:" \
516                     "%s/%s -> %s. At node %s" % (destination, netprefix, nexthop, guid)
517             _add_static_route(ns3, static_routing, 
518                 address, netprefix, nexthop_address, ifindex)
519         else:
520             mask = ns3.Ipv4Mask("/%d" % netprefix) 
521             ifindex = ipv4.GetInterfaceForPrefix(address, mask)
522             if ifindex < 0:
523                 raise RuntimeError, "Cannot associate interface for routing entry:" \
524                     "%s/%s -> %s. At node %s" % (destination, netprefix, nexthop, guid)
525             _add_static_route_if(ns3, static_routing, 
526                 address, netprefix, nexthop_address, ifindex)
527
528 def configure_station(testbed_instance, guid):
529     configure_device(testbed_instance, guid)
530     element = testbed_instance._elements[guid]
531     element.Start()
532
533 ###  Factories  ###
534
535 factories_order = ["ns3::BasicEnergySource",
536     "ns3::WifiRadioEnergyModel",
537     "ns3::BSSchedulerRtps",
538     "ns3::BSSchedulerSimple",
539     "ns3::UdpTraceClient",
540     "ns3::UdpServer",
541     "ns3::UdpClient",
542     "ns3::FlowMonitor",
543     "ns3::Radvd",
544     "ns3::Ping6",
545     "ns3::flame::FlameProtocol",
546     "ns3::flame::FlameRtable",
547     "ns3::dot11s::AirtimeLinkMetricCalculator",
548     "ns3::dot11s::HwmpProtocol",
549     "ns3::dot11s::HwmpRtable",
550     "ns3::dot11s::PeerManagementProtocol",
551     "ns3::dot11s::PeerLink",
552     "ns3::MeshWifiInterfaceMac",
553     "ns3::MeshPointDevice",
554     "ns3::UanMacRcGw",
555     "ns3::UanMacRc",
556     "ns3::UanPhyCalcSinrDual",
557     "ns3::UanPhyPerGenDefault",
558     "ns3::UanPhyDual",
559     "ns3::UanPropModelThorp",
560     "ns3::UanMacCw",
561     "ns3::UanNoiseModelDefault",
562     "ns3::UanMacAloha",
563     "ns3::UanPropModelIdeal",
564     "ns3::UanTransducerHd",
565     "ns3::UanPhyCalcSinrDefault",
566     "ns3::UanPhyGen",
567     "ns3::UanPhyCalcSinrFhFsk",
568     "ns3::UanPhyPerUmodem",
569     "ns3::UanChannel",
570     "ns3::V4Ping",
571     "ns3::AthstatsWifiTraceSink",
572     "ns3::FlameStack",
573     "ns3::Dot11sStack",
574     "ns3::NonCommunicatingNetDevice",
575     "ns3::HalfDuplexIdealPhy",
576     "ns3::AlohaNoackNetDevice",
577     "ns3::SpectrumAnalyzer",
578     "ns3::WaveformGenerator",
579     "ns3::MultiModelSpectrumChannel",
580     "ns3::SingleModelSpectrumChannel",
581     "ns3::MsduStandardAggregator",
582     "ns3::EdcaTxopN",
583     "ns3::QstaWifiMac",
584     "ns3::QapWifiMac",
585     "ns3::QadhocWifiMac",
586     "ns3::MinstrelWifiManager",
587     "ns3::CaraWifiManager",
588     "ns3::AarfcdWifiManager",
589     "ns3::OnoeWifiManager",
590     "ns3::AmrrWifiManager",
591     "ns3::ConstantRateWifiManager",
592     "ns3::IdealWifiManager",
593     "ns3::AarfWifiManager",
594     "ns3::ArfWifiManager",
595     "ns3::WifiNetDevice",
596     "ns3::NqstaWifiMac",
597     "ns3::NqapWifiMac",
598     "ns3::AdhocWifiMac",
599     "ns3::DcaTxop",
600     "ns3::WifiMacQueue",
601     "ns3::YansWifiChannel",
602     "ns3::YansWifiPhy",
603     "ns3::NistErrorRateModel",
604     "ns3::YansErrorRateModel",
605     "ns3::WaypointMobilityModel",
606     "ns3::ConstantAccelerationMobilityModel",
607     "ns3::RandomDirection2dMobilityModel",
608     "ns3::RandomWalk2dMobilityModel",
609     "ns3::SteadyStateRandomWaypointMobilityModel",
610     "ns3::RandomWaypointMobilityModel",
611     "ns3::GaussMarkovMobilityModel",
612     "ns3::ConstantVelocityMobilityModel",
613     "ns3::ConstantPositionMobilityModel",
614     "ns3::ListPositionAllocator",
615     "ns3::GridPositionAllocator",
616     "ns3::RandomRectanglePositionAllocator",
617     "ns3::RandomBoxPositionAllocator",
618     "ns3::RandomDiscPositionAllocator",
619     "ns3::UniformDiscPositionAllocator",
620     "ns3::HierarchicalMobilityModel",
621     "ns3::aodv::RoutingProtocol",
622     "ns3::UdpEchoServer",
623     "ns3::UdpEchoClient",
624     "ns3::PacketSink",
625     "ns3::OnOffApplication",
626     "ns3::VirtualNetDevice",
627     "ns3::FileDescriptorNetDevice",
628     "ns3::Nepi::TunChannel",
629     "ns3::TapBridge",
630     "ns3::BridgeChannel",
631     "ns3::BridgeNetDevice",
632     "ns3::EmuNetDevice",
633     "ns3::CsmaChannel",
634     "ns3::CsmaNetDevice",
635     "ns3::PointToPointRemoteChannel",
636     "ns3::PointToPointChannel",
637     "ns3::PointToPointNetDevice",
638     "ns3::NscTcpL4Protocol",
639     "ns3::Icmpv6L4Protocol",
640     "ns3::Ipv6OptionPad1",
641     "ns3::Ipv6OptionPadn",
642     "ns3::Ipv6OptionJumbogram",
643     "ns3::Ipv6OptionRouterAlert",
644     "ns3::Ipv6ExtensionHopByHop",
645     "ns3::Ipv6ExtensionDestination",
646     "ns3::Ipv6ExtensionFragment",
647     "ns3::Ipv6ExtensionRouting",
648     "ns3::Ipv6ExtensionLooseRouting",
649     "ns3::Ipv6ExtensionESP",
650     "ns3::Ipv6ExtensionAH",
651     "ns3::Ipv6L3Protocol",
652     "ns3::LoopbackNetDevice",
653     "ns3::Icmpv4L4Protocol",
654     "ns3::RttMeanDeviation",
655     "ns3::ArpL3Protocol",
656     "ns3::TcpL4Protocol",
657     "ns3::UdpL4Protocol",
658     "ns3::Ipv4L3Protocol",
659     "ns3::SimpleNetDevice",
660     "ns3::SimpleChannel",
661     "ns3::PacketSocket",
662     "ns3::DropTailQueue",
663     "ns3::Node",
664     "ns3::FriisSpectrumPropagationLossModel",
665     "ns3::Cost231PropagationLossModel",
666     "ns3::JakesPropagationLossModel",
667     "ns3::RandomPropagationLossModel",
668     "ns3::FriisPropagationLossModel",
669     "ns3::TwoRayGroundPropagationLossModel",
670     "ns3::LogDistancePropagationLossModel",
671     "ns3::ThreeLogDistancePropagationLossModel",
672     "ns3::NakagamiPropagationLossModel",
673     "ns3::FixedRssLossModel",
674     "ns3::MatrixPropagationLossModel",
675     "ns3::RangePropagationLossModel",
676     "ns3::RandomPropagationDelayModel",
677     "ns3::ConstantSpeedPropagationDelayModel",
678     "ns3::RateErrorModel",
679     "ns3::ListErrorModel",
680     "ns3::ReceiveListErrorModel",
681     "ns3::PacketBurst",
682     "ns3::EnergySourceContainer",
683     "ns3::BSSchedulerRtps",
684     "ns3::BSSchedulerSimple",
685     "ns3::SimpleOfdmWimaxChannel",
686     "ns3::SimpleOfdmWimaxPhy",
687     "ns3::UplinkSchedulerMBQoS",
688     "ns3::UplinkSchedulerRtps",
689     "ns3::UplinkSchedulerSimple",
690     "ns3::IpcsClassifierRecord",
691     "ns3::ServiceFlow",
692     "ns3::BaseStationNetDevice",
693     "ns3::SubscriberStationNetDevice",
694  ]
695
696 factories_info = dict({
697     "ns3::Ping6": dict({
698         "category": "Application",
699         "create_function": create_element,
700         "configure_function": configure_element,
701         "help": "",
702         "connector_types": [],
703         "stop_function": stop_application,
704         "start_function": start_application,
705         "status_function": status_application,
706         "box_attributes": ["MaxPackets",
707             "Interval",
708             "RemoteIpv6",
709             "LocalIpv6",
710             "PacketSize",
711             "StartTime",
712             "StopTime"],
713     }),
714      "ns3::UdpL4Protocol": dict({
715         "category": "Protocol",
716         "create_function": create_element,
717         "configure_function": configure_element,
718         "help": "",
719         "connector_types": ["node"],
720         "box_attributes": ["ProtocolNumber"],
721     }),
722      "ns3::RandomDiscPositionAllocator": dict({
723         "category": "Mobility",
724         "create_function": create_element,
725         "configure_function": configure_element,
726         "help": "",
727         "connector_types": [],
728         "box_attributes": ["Theta",
729             "Rho",
730             "X",
731             "Y"],
732         "tags": [tags.MOBILE],
733     }),
734      "ns3::Node": dict({
735         "category": "Topology",
736         "create_function": create_node,
737         "configure_function": configure_node,
738         "help": "",
739         "connector_types": ["devs", "apps", "protos", "mobility"],
740         "allow_routes": True,
741         "box_attributes": [],
742     }),
743      "ns3::GridPositionAllocator": dict({
744         "category": "Mobility",
745         "create_function": create_element,
746         "configure_function": configure_element,
747         "help": "",
748         "connector_types": [],
749         "box_attributes": ["GridWidth",
750             "MinX",
751             "MinY",
752             "DeltaX",
753             "DeltaY",
754             "LayoutType"],
755         "tags": [tags.MOBILE],
756     }),
757      "ns3::TapBridge": dict({
758         "category": "Device",
759         "create_function": create_element,
760         "configure_function": configure_element,
761         "help": "",
762         "connector_types": [],
763         "allow_addresses": True,
764         "box_attributes": ["Mtu",
765             "DeviceName",
766             "Gateway",
767             "IpAddress",
768             "MacAddress",
769             "Netmask",
770             "Start",
771             "Stop"],
772     }),
773      "ns3::FlowMonitor": dict({
774         "category": "",
775         "create_function": create_element,
776         "configure_function": configure_element,
777         "help": "",
778         "connector_types": [],
779         "box_attributes": ["MaxPerHopDelay",
780             "DelayBinWidth",
781             "JitterBinWidth",
782             "PacketSizeBinWidth",
783             "FlowInterruptionsBinWidth",
784             "FlowInterruptionsMinTime"],
785     }),
786      "ns3::ConstantVelocityMobilityModel": dict({
787         "category": "Mobility",
788         "create_function": create_element,
789         "configure_function": configure_element,
790         "help": "",
791         "connector_types": ["node"],
792         "box_attributes": ["Position",
793            "Velocity"],
794         "tags": [tags.MOBILE],
795     }),
796      "ns3::V4Ping": dict({
797         "category": "Application",
798         "create_function": create_element,
799         "configure_function": configure_element,
800         "help": "",
801         "connector_types": ["node"],
802         "stop_function": stop_application,
803         "start_function": start_application,
804         "status_function": status_application,
805         "box_attributes": ["Remote",
806             "Verbose",
807             "Interval",
808             "Size",
809             "StartTime",
810             "StopTime"],
811         "traces": ["rtt"],
812     }),
813      "ns3::dot11s::PeerLink": dict({
814         "category": "",
815         "create_function": create_element,
816         "configure_function": configure_element,
817         "help": "",
818         "connector_types": [],
819         "box_attributes": ["RetryTimeout",
820             "HoldingTimeout",
821             "ConfirmTimeout",
822             "MaxRetries",
823             "MaxBeaconLoss",
824             "MaxPacketFailure"],
825     }),
826      "ns3::PointToPointNetDevice": dict({
827         "category": "Device",
828         "create_function": create_element,
829         "configure_function": configure_device,
830         "help": "",
831         "connector_types": ["node", "err", "queue", "chan"],
832         "allow_addresses": True,
833         "box_attributes": ["Mtu",
834             "Address",
835             "DataRate",
836             "InterframeGap"],
837         "traces": ["p2ppcap", "p2pascii"]
838     }),
839      "ns3::NakagamiPropagationLossModel": dict({
840         "category": "Loss",
841         "create_function": create_element,
842         "configure_function": configure_element,
843         "help": "",
844         "connector_types": [],
845         "box_attributes": ["Distance1",
846             "Distance2",
847             "m0",
848             "m1",
849             "m2"],
850     }),
851      "ns3::AarfWifiManager": dict({
852         "category": "Manager",
853         "create_function": create_element,
854         "configure_function": configure_element,
855         "help": "",
856         "connector_types": [],
857         "box_attributes": ["SuccessK",
858             "TimerK",
859             "MaxSuccessThreshold",
860             "MinTimerThreshold",
861             "MinSuccessThreshold",
862             "IsLowLatency",
863             "MaxSsrc",
864             "MaxSlrc",
865             "RtsCtsThreshold",
866             "FragmentationThreshold",
867             "NonUnicastMode"],
868     }),
869      "ns3::Ipv6OptionJumbogram": dict({
870         "category": "",
871         "create_function": create_element,
872         "configure_function": configure_element,
873         "help": "",
874         "connector_types": [],
875         "box_attributes": ["OptionNumber"],
876     }),
877      "ns3::TwoRayGroundPropagationLossModel": dict({
878         "category": "Loss",
879         "create_function": create_element,
880         "configure_function": configure_element,
881         "help": "",
882         "connector_types": [],
883         "box_attributes": ["Lambda",
884             "SystemLoss",
885             "MinDistance",
886             "HeightAboveZ"],
887     }),
888      "ns3::OnOffApplication": dict({
889         "category": "Application",
890         "create_function": create_element,
891         "configure_function": configure_element,
892         "help": "",
893         "connector_types": ["node"],
894         "stop_function": stop_application,
895         "start_function": start_application,
896         "status_function": status_application,
897         "box_attributes": ["DataRate",
898             "PacketSize",
899             "Remote",
900             "OnTime",
901             "OffTime",
902             "MaxBytes",
903             "Protocol",
904             "StartTime",
905             "StopTime"],
906     }),
907      "ns3::AdhocWifiMac": dict({
908         "category": "Mac",
909         "create_function": create_element,
910         "configure_function": configure_element,
911         "help": "",
912         "connector_types": [],
913         "box_attributes": ["CtsTimeout",
914             "AckTimeout",
915             "BasicBlockAckTimeout",
916             "CompressedBlockAckTimeout",
917             "Sifs",
918             "EifsNoDifs",
919             "Slot",
920             "Pifs",
921             "MaxPropagationDelay",
922             "Ssid"],
923     }),
924      "ns3::ConstantAccelerationMobilityModel": dict({
925         "category": "Mobility",
926         "create_function": create_element,
927         "configure_function": configure_element,
928         "help": "",
929         "connector_types": ["node"],
930         "box_attributes": ["Position",
931             "Velocity"],
932         "tags": [tags.MOBILE],
933     }),
934      "ns3::GaussMarkovMobilityModel": dict({
935         "category": "Mobility",
936         "create_function": create_element,
937         "configure_function": configure_element,
938         "help": "",
939         "connector_types": [],
940         "box_attributes": ["Bounds",
941             "TimeStep",
942             "Alpha",
943             "MeanVelocity",
944             "MeanDirection",
945             "MeanPitch",
946             "NormalVelocity",
947             "NormalDirection",
948             "NormalPitch",
949             "Position",
950             "Velocity"],
951         "tags": [tags.MOBILE],
952     }),
953      "ns3::dot11s::HwmpProtocol": dict({
954         "category": "Protocol",
955         "create_function": create_element,
956         "configure_function": configure_element,
957         "help": "",
958         "connector_types": [],
959         "box_attributes": ["RandomStart",
960             "MaxQueueSize",
961             "Dot11MeshHWMPmaxPREQretries",
962             "Dot11MeshHWMPnetDiameterTraversalTime",
963             "Dot11MeshHWMPpreqMinInterval",
964             "Dot11MeshHWMPperrMinInterval",
965             "Dot11MeshHWMPactiveRootTimeout",
966             "Dot11MeshHWMPactivePathTimeout",
967             "Dot11MeshHWMPpathToRootInterval",
968             "Dot11MeshHWMPrannInterval",
969             "MaxTtl",
970             "UnicastPerrThreshold",
971             "UnicastPreqThreshold",
972             "UnicastDataThreshold",
973             "DoFlag",
974             "RfFlag"],
975     }),
976      "ns3::NscTcpL4Protocol": dict({
977         "category": "Protocol",
978         "create_function": create_element,
979         "configure_function": configure_element,
980         "help": "",
981         "connector_types": [],
982         "box_attributes": ["Library",
983           "ProtocolNumber"],
984     }),
985      "ns3::dot11s::AirtimeLinkMetricCalculator": dict({
986         "category": "",
987         "create_function": create_element,
988         "configure_function": configure_element,
989         "help": "",
990         "connector_types": [],
991         "box_attributes": ["Dot11sMeshHeaderLength"],
992     }),
993      "ns3::UanMacCw": dict({
994         "category": "",
995         "create_function": create_element,
996         "configure_function": configure_element,
997         "help": "",
998         "connector_types": [],
999         "box_attributes": ["CW",
1000            "SlotTime"],
1001     }),
1002      "ns3::AthstatsWifiTraceSink": dict({
1003         "category": "",
1004         "create_function": create_element,
1005         "configure_function": configure_element,
1006         "help": "",
1007         "connector_types": [],
1008         "box_attributes": ["Interval"],
1009     }),
1010      "ns3::FlameStack": dict({
1011         "category": "",
1012         "create_function": create_element,
1013         "configure_function": configure_element,
1014         "help": "",
1015         "connector_types": [],
1016         "box_attributes": [],
1017     }),
1018      "ns3::UanMacRc": dict({
1019         "category": "",
1020         "create_function": create_element,
1021         "configure_function": configure_element,
1022         "help": "",
1023         "connector_types": [],
1024         "box_attributes": ["RetryRate",
1025             "MaxFrames",
1026             "QueueLimit",
1027             "SIFS",
1028             "NumberOfRates",
1029             "MinRetryRate",
1030             "RetryStep",
1031             "NumberOfRetryRates",
1032             "MaxPropDelay"],
1033     }),
1034      "ns3::WaypointMobilityModel": dict({
1035         "category": "Mobility",
1036         "create_function": create_element,
1037         "configure_function": configure_element,
1038         "help": "",
1039         "connector_types": [],
1040         "box_attributes": ["WaypointsLeft",
1041             "Position",
1042             "Velocity"],
1043         "tags": [tags.MOBILE],
1044     }),
1045      "ns3::FileDescriptorNetDevice": dict({
1046         "category": "Device",
1047         "create_function": create_element,
1048         "configure_function": configure_device,
1049         "help": "Network interface associated to a file descriptor",
1050         "connector_types": ["node", "->fd"],
1051         "allow_addresses": True,
1052         "box_attributes": ["Address", 
1053             "LinuxSocketAddress",
1054             "tun_proto", "tun_addr", "tun_port", "tun_key"],
1055         "traces": ["fdpcap"]
1056     }),
1057      "ns3::Nepi::TunChannel": dict({
1058         "category": "Channel",
1059         "create_function": create_tunchannel,
1060         "preconfigure_function": preconfigure_tunchannel,
1061         "configure_function": postconfigure_tunchannel,
1062         "start_function": wait_tunchannel,
1063         "help": "Channel to forward FileDescriptorNetDevice data to "
1064                 "other TAP interfaces supporting the NEPI tunneling protocol.",
1065         "connector_types": ["fd->", "udp", "tcp"],
1066         "allow_addresses": False,
1067         "box_attributes": ["tun_proto", "tun_addr", "tun_port", "tun_key"]
1068     }),
1069      "ns3::CsmaNetDevice": dict({
1070         "category": "Device",
1071         "create_function": create_element,
1072         "configure_function": configure_device,
1073         "help": "CSMA (carrier sense, multiple access) interface",
1074         "connector_types": ["node", "chan", "err", "queue"],
1075         "allow_addresses": True,
1076         "box_attributes": ["Address",
1077             "Mtu",
1078             "SendEnable",
1079             "ReceiveEnable"],
1080         "traces": ["csmapcap", "csmapcap_promisc"]
1081     }),
1082      "ns3::UanPropModelThorp": dict({
1083         "category": "",
1084         "create_function": create_element,
1085         "configure_function": configure_element,
1086         "help": "",
1087         "connector_types": [],
1088         "box_attributes": ["SpreadCoef"],
1089     }),
1090      "ns3::NqstaWifiMac": dict({
1091         "category": "Mac",
1092         "create_function": create_element,
1093         "configure_function": configure_element,
1094         "help": "",
1095         "connector_types": [],
1096         "box_attributes": ["ProbeRequestTimeout",
1097             "AssocRequestTimeout",
1098             "MaxMissedBeacons",
1099             "CtsTimeout",
1100             "AckTimeout",
1101             "BasicBlockAckTimeout",
1102             "CompressedBlockAckTimeout",
1103             "Sifs",
1104             "EifsNoDifs",
1105             "Slot",
1106             "Pifs",
1107             "MaxPropagationDelay",
1108             "Ssid"],
1109     }),
1110      "ns3::Icmpv6L4Protocol": dict({
1111         "category": "Protocol",
1112         "create_function": create_element,
1113         "configure_function": configure_element,
1114         "help": "",
1115         "connector_types": ["node"],
1116         "box_attributes": ["DAD",
1117             "ProtocolNumber"],
1118     }),
1119      "ns3::SimpleNetDevice": dict({
1120         "category": "Device",
1121         "create_function": create_element,
1122         "configure_function": configure_element,
1123         "help": "",
1124         "connector_types": ["node", "chan"],
1125         "allow_addresses": True,
1126         "box_attributes": [],
1127     }),
1128      "ns3::FriisPropagationLossModel": dict({
1129         "category": "Loss",
1130         "create_function": create_element,
1131         "configure_function": configure_element,
1132         "help": "",
1133         "connector_types": [],
1134         "box_attributes": ["Lambda",
1135             "SystemLoss",
1136             "MinDistance"],
1137     }),
1138      "ns3::Ipv6OptionRouterAlert": dict({
1139         "category": "",
1140         "create_function": create_element,
1141         "configure_function": configure_element,
1142         "help": "",
1143         "connector_types": [],
1144         "box_attributes": ["OptionNumber"],
1145     }),
1146      "ns3::UniformDiscPositionAllocator": dict({
1147         "category": "Mobility",
1148         "create_function": create_element,
1149         "configure_function": configure_element,
1150         "help": "",
1151         "connector_types": [],
1152         "box_attributes": ["rho",
1153             "X",
1154             "Y"],
1155         "tags": [tags.MOBILE],
1156     }),
1157      "ns3::RandomBoxPositionAllocator": dict({
1158         "category": "Mobility",
1159         "create_function": create_element,
1160         "configure_function": configure_element,
1161         "help": "",
1162         "connector_types": [],
1163         "box_attributes": ["X",
1164             "Y",
1165             "Z"],
1166         "tags": [tags.MOBILE],
1167     }),
1168      "ns3::Ipv6ExtensionDestination": dict({
1169         "category": "",
1170         "create_function": create_element,
1171         "configure_function": configure_element,
1172         "help": "",
1173         "connector_types": [],
1174         "box_attributes": ["ExtensionNumber"],
1175     }),
1176      "ns3::LoopbackNetDevice": dict({
1177         "category": "Device",
1178         "create_function": create_element,
1179         "configure_function": configure_element,
1180         "help": "",
1181         "connector_types": [],
1182         "box_attributes": [],
1183     }),
1184      "ns3::ConstantSpeedPropagationDelayModel": dict({
1185         "category": "Delay",
1186         "create_function": create_element,
1187         "configure_function": configure_element,
1188         "help": "",
1189         "connector_types": ["chan"],
1190         "box_attributes": ["Speed"],
1191     }),
1192      "ns3::Ipv6ExtensionHopByHop": dict({
1193         "category": "",
1194         "create_function": create_element,
1195         "configure_function": configure_element,
1196         "help": "",
1197         "connector_types": [],
1198         "box_attributes": ["ExtensionNumber"],
1199     }),
1200      "ns3::BridgeChannel": dict({
1201         "category": "Channel",
1202         "create_function": create_element,
1203         "configure_function": configure_element,
1204         "help": "",
1205         "connector_types": [],
1206         "box_attributes": [],
1207     }),
1208      "ns3::Radvd": dict({
1209         "category": "",
1210         "create_function": create_element,
1211         "configure_function": configure_element,
1212         "help": "",
1213         "connector_types": [],
1214         "box_attributes": ["StartTime",
1215             "StopTime"],
1216     }),
1217      "ns3::PacketSocket": dict({
1218         "category": "",
1219         "create_function": create_element,
1220         "configure_function": configure_element,
1221         "help": "",
1222         "connector_types": [],
1223         "box_attributes": ["RcvBufSize"],
1224     }),
1225      "ns3::flame::FlameProtocol": dict({
1226         "category": "Protocol",
1227         "create_function": create_element,
1228         "configure_function": configure_element,
1229         "help": "",
1230         "connector_types": [],
1231         "box_attributes": ["BroadcastInterval",
1232             "MaxCost"],
1233     }),
1234      "ns3::Cost231PropagationLossModel": dict({
1235         "category": "Loss",
1236         "create_function": create_element,
1237         "configure_function": configure_element,
1238         "help": "",
1239         "connector_types": [],
1240         "box_attributes": ["Lambda",
1241             "Frequency",
1242             "BSAntennaHeight",
1243             "SSAntennaHeight",
1244             "MinDistance"],
1245     }),
1246      "ns3::Ipv6ExtensionESP": dict({
1247         "category": "",
1248         "create_function": create_element,
1249         "configure_function": configure_element,
1250         "help": "",
1251         "connector_types": [],
1252         "box_attributes": ["ExtensionNumber"],
1253     }),
1254      "ns3::CaraWifiManager": dict({
1255         "category": "Manager",
1256         "create_function": create_element,
1257         "configure_function": configure_element,
1258         "help": "",
1259         "connector_types": [],
1260         "box_attributes": ["ProbeThreshold",
1261             "FailureThreshold",
1262             "SuccessThreshold",
1263             "Timeout",
1264             "IsLowLatency",
1265             "MaxSsrc",
1266             "MaxSlrc",
1267             "RtsCtsThreshold",
1268             "FragmentationThreshold",
1269             "NonUnicastMode"],
1270     
1271     }),
1272      "ns3::RttMeanDeviation": dict({
1273         "category": "",
1274         "create_function": create_element,
1275         "configure_function": configure_element,
1276         "help": "",
1277         "connector_types": [],
1278         "box_attributes": ["Gain",
1279             "MaxMultiplier",
1280             "InitialEstimation",
1281             "MinRTO"],
1282     }),
1283      "ns3::Icmpv4L4Protocol": dict({
1284         "category": "Protocol",
1285         "create_function": create_element,
1286         "configure_function": configure_element,
1287         "help": "",
1288         "connector_types": ["node"],
1289         "box_attributes": ["ProtocolNumber"],
1290     }),
1291      "ns3::WaveformGenerator": dict({
1292         "category": "",
1293         "create_function": create_element,
1294         "configure_function": configure_element,
1295         "help": "",
1296         "connector_types": [],
1297         "box_attributes": ["Period",
1298             "DutyCycle"],
1299     }),
1300      "ns3::YansWifiChannel": dict({
1301         "category": "Channel",
1302         "create_function": create_element,
1303         "configure_function": configure_element,
1304         "help": "",
1305         "connector_types": ["phys", "delay", "loss"],
1306         "box_attributes": [],
1307     }),
1308      "ns3::SimpleChannel": dict({
1309         "category": "Channel",
1310         "create_function": create_element,
1311         "configure_function": configure_element,
1312         "help": "",
1313         "connector_types": ["devs"],
1314         "box_attributes": [],
1315     }),
1316      "ns3::Ipv6ExtensionFragment": dict({
1317         "category": "",
1318         "create_function": create_element,
1319         "configure_function": configure_element,
1320         "help": "",
1321         "connector_types": [],
1322         "box_attributes": ["ExtensionNumber"],
1323     }),
1324      "ns3::Dot11sStack": dict({
1325         "category": "",
1326         "create_function": create_element,
1327         "configure_function": configure_element,
1328         "help": "",
1329         "connector_types": [],
1330         "box_attributes": ["Root"],
1331     }),
1332      "ns3::FriisSpectrumPropagationLossModel": dict({
1333         "category": "Loss",
1334         "create_function": create_element,
1335         "configure_function": configure_element,
1336         "help": "",
1337         "connector_types": [],
1338         "box_attributes": [],
1339     }),
1340      "ns3::RandomRectanglePositionAllocator": dict({
1341         "category": "Mobility",
1342         "create_function": create_element,
1343         "configure_function": configure_element,
1344         "help": "",
1345         "connector_types": [],
1346         "box_attributes": ["X",
1347            "Y"],
1348         "tags": [tags.MOBILE],
1349     }),
1350      "ns3::NqapWifiMac": dict({
1351         "category": "Mac",
1352         "create_function": create_element,
1353         "configure_function": configure_element,
1354         "help": "",
1355         "connector_types": [],
1356         "box_attributes": ["BeaconInterval",
1357             "BeaconGeneration",
1358             "CtsTimeout",
1359             "AckTimeout",
1360             "BasicBlockAckTimeout",
1361             "CompressedBlockAckTimeout",
1362             "Sifs",
1363             "EifsNoDifs",
1364             "Slot",
1365             "Pifs",
1366             "MaxPropagationDelay",
1367             "Ssid"],
1368     }),
1369      "ns3::HierarchicalMobilityModel": dict({
1370         "category": "Mobility",
1371         "create_function": create_element,
1372         "configure_function": configure_element,
1373         "help": "",
1374         "connector_types": ["node"],
1375         "box_attributes": ["Position",
1376             "Velocity"],
1377         "tags": [tags.MOBILE],
1378     }),
1379      "ns3::ThreeLogDistancePropagationLossModel": dict({
1380         "category": "Loss",
1381         "create_function": create_element,
1382         "configure_function": configure_element,
1383         "help": "",
1384         "connector_types": [],
1385         "box_attributes": ["Distance0",
1386             "Distance1",
1387             "Distance2",
1388             "Exponent0",
1389             "Exponent1",
1390             "Exponent2",
1391             "ReferenceLoss"],
1392     }),
1393      "ns3::UanNoiseModelDefault": dict({
1394         "category": "",
1395         "create_function": create_element,
1396         "configure_function": configure_element,
1397         "help": "",
1398         "connector_types": [],
1399         "box_attributes": ["Wind",
1400             "Shipping"],
1401     }),
1402      "ns3::dot11s::HwmpRtable": dict({
1403         "category": "",
1404         "create_function": create_element,
1405         "configure_function": configure_element,
1406         "help": "",
1407         "connector_types": [],
1408         "box_attributes": [],
1409     }),
1410      "ns3::PacketBurst": dict({
1411         "category": "",
1412         "create_function": create_element,
1413         "configure_function": configure_element,
1414         "help": "",
1415         "connector_types": [],
1416         "box_attributes": [],
1417     }),
1418      "ns3::RandomPropagationDelayModel": dict({
1419         "category": "Delay",
1420         "create_function": create_element,
1421         "configure_function": configure_element,
1422         "help": "",
1423         "connector_types": [],
1424         "box_attributes": ["Variable"],
1425     }),
1426      "ns3::ArpL3Protocol": dict({
1427         "category": "Protocol",
1428         "create_function": create_element,
1429         "configure_function": configure_element,
1430         "help": "",
1431         "connector_types": ["node"],
1432         "box_attributes": [],
1433     }),
1434      "ns3::SteadyStateRandomWaypointMobilityModel": dict({
1435         "category": "Mobility",
1436         "create_function": create_element,
1437         "configure_function": configure_element,
1438         "help": "",
1439         "connector_types": [],
1440         "box_attributes": ["MinSpeed",
1441             "MaxSpeed",
1442             "MinPause",
1443             "MaxPause",
1444             "MinX",
1445             "MaxX",
1446             "MinY",
1447             "MaxY",
1448             "Position",
1449             "Velocity"],
1450         "tags": [tags.MOBILE],
1451     }),
1452      "ns3::BaseStationNetDevice": dict({
1453         "category": "Device",
1454         "create_function": create_base_station,
1455         "configure_function": configure_station,
1456         "help": "Base station for wireless mobile network",
1457         "connector_types": ["node", "chan", "phy", "uplnk", "dwnlnk"],
1458         "allow_addresses": True,
1459         "box_attributes": ["InitialRangInterval",
1460             "DcdInterval",
1461             "UcdInterval",
1462             "IntervalT8",
1463             "RangReqOppSize",
1464             "BwReqOppSize",
1465             "MaxRangCorrectionRetries",
1466             "Mtu",
1467             "RTG",
1468             "TTG"],
1469         "traces": ["wimaxpcap", "wimaxascii"],
1470     }),
1471      "ns3::UdpServer": dict({
1472         "category": "Application",
1473         "create_function": create_element,
1474         "configure_function": configure_element,
1475         "help": "",
1476         "connector_types": ["node"],
1477         "stop_function": stop_application,
1478         "start_function": start_application,
1479         "status_function": status_application,
1480         "box_attributes": ["Port",
1481             "PacketWindowSize",
1482             "StartTime",
1483             "StopTime"],
1484     }),
1485      "ns3::AarfcdWifiManager": dict({
1486         "category": "Manager",
1487         "create_function": create_element,
1488         "configure_function": configure_element,
1489         "help": "",
1490         "connector_types": [],
1491         "box_attributes": ["SuccessK",
1492             "TimerK",
1493             "MaxSuccessThreshold",
1494             "MinTimerThreshold",
1495             "MinSuccessThreshold",
1496             "MinRtsWnd",
1497             "MaxRtsWnd",
1498             "TurnOffRtsAfterRateDecrease",
1499             "TurnOnRtsAfterRateIncrease",
1500             "IsLowLatency",
1501             "MaxSsrc",
1502             "MaxSlrc",
1503             "RtsCtsThreshold",
1504             "FragmentationThreshold",
1505             "NonUnicastMode"],
1506     }),
1507      "ns3::UanTransducerHd": dict({
1508         "category": "",
1509         "create_function": create_element,
1510         "configure_function": configure_element,
1511         "help": "",
1512         "connector_types": [],
1513         "box_attributes": [],
1514     }),
1515      "ns3::LogDistancePropagationLossModel": dict({
1516         "category": "Loss",
1517         "create_function": create_element,
1518         "configure_function": configure_element,
1519         "help": "",
1520         "connector_types": ["prev", "next"],
1521         "box_attributes": ["Exponent",
1522             "ReferenceDistance",
1523             "ReferenceLoss"],
1524     }),
1525      "ns3::EmuNetDevice": dict({
1526         "category": "Device",
1527         "create_function": create_element,
1528         "configure_function": configure_element,
1529         "help": "",
1530         "connector_types": ["node", "queue"],
1531         "box_attributes": ["Mtu",
1532             "Address",
1533             "DeviceName",
1534             "Start",
1535             "Stop",
1536             "RxQueueSize"],
1537     }),
1538      "ns3::Ipv6ExtensionLooseRouting": dict({
1539         "category": "Routing",
1540         "create_function": create_element,
1541         "configure_function": configure_element,
1542         "help": "",
1543         "connector_types": [],
1544         "box_attributes": ["ExtensionNumber"],
1545     }),
1546      "ns3::RandomWaypointMobilityModel": dict({
1547         "category": "Mobility",
1548         "create_function": create_element,
1549         "configure_function": configure_element,
1550         "help": "",
1551         "connector_types": ["node"],
1552         "box_attributes": ["Speed",
1553             "Pause",
1554             "Position",
1555             "Velocity"],
1556         "tags": [tags.MOBILE],
1557     }),
1558      "ns3::RangePropagationLossModel": dict({
1559         "category": "Loss",
1560         "create_function": create_element,
1561         "configure_function": configure_element,
1562         "help": "",
1563         "connector_types": [],
1564         "box_attributes": ["MaxRange"],
1565     }),
1566      "ns3::AlohaNoackNetDevice": dict({
1567         "category": "Device",
1568         "create_function": create_element,
1569         "configure_function": configure_element,
1570         "help": "",
1571         "connector_types": [],
1572         "box_attributes": ["Address",
1573             "Mtu"],
1574     }),
1575      "ns3::MatrixPropagationLossModel": dict({
1576         "category": "Loss",
1577         "create_function": create_element,
1578         "configure_function": configure_element,
1579         "help": "",
1580         "connector_types": [],
1581         "box_attributes": ["DefaultLoss"],
1582     }),
1583      "ns3::WifiNetDevice": dict({
1584         "category": "Wifi",
1585         "create_function": create_element,
1586         "configure_function": configure_device,
1587         "help": "",
1588         "connector_types": ["node", "mac", "phy", "manager"],
1589         "allow_addresses": True,
1590         "box_attributes": ["Mtu"],
1591     }),
1592      "ns3::CsmaChannel": dict({
1593         "category": "Topology",
1594         "create_function": create_element,
1595         "configure_function": configure_element,
1596         "help": "",
1597         "connector_types": ["devs"],
1598         "box_attributes": ["DataRate",
1599             "Delay"],
1600     }),
1601      "ns3::BridgeNetDevice": dict({
1602         "category": "Device",
1603         "create_function": create_element,
1604         "configure_function": configure_element,
1605         "help": "",
1606         "connector_types": ["node"],
1607         "allow_addresses": True,
1608         "box_attributes": ["Mtu",
1609            "EnableLearning",
1610            "ExpirationTime"],
1611     }),
1612      "ns3::Ipv6ExtensionRouting": dict({
1613         "category": "Routing",
1614         "create_function": create_element,
1615         "configure_function": configure_element,
1616         "help": "",
1617         "connector_types": [],
1618         "box_attributes": ["ExtensionNumber"],
1619     }),
1620      "ns3::QstaWifiMac": dict({
1621         "category": "Mac",
1622         "create_function": create_wifi_standard_model,
1623         "configure_function": configure_element,
1624         "help": "Station Wifi MAC Model",
1625         "connector_types": ["dev"],
1626         "box_attributes": ["ProbeRequestTimeout",
1627             "AssocRequestTimeout",
1628             "MaxMissedBeacons",
1629             "CtsTimeout",
1630             "AckTimeout",
1631             "BasicBlockAckTimeout",
1632             "CompressedBlockAckTimeout",
1633             "Sifs",
1634             "EifsNoDifs",
1635             "Slot",
1636             "Pifs",
1637             "MaxPropagationDelay",
1638             "Ssid",
1639             "Standard"],
1640     }),
1641      "ns3::UdpEchoClient": dict({
1642         "category": "Application",
1643         "create_function": create_element,
1644         "configure_function": configure_element,
1645         "help": "",
1646         "connector_types": ["node"],
1647         "stop_function": stop_application,
1648         "start_function": start_application,
1649         "status_function": status_application,
1650         "box_attributes": ["MaxPackets",
1651             "Interval",
1652             "RemoteAddress",
1653             "RemotePort",
1654             "PacketSize",
1655             "StartTime",
1656             "StopTime"],
1657     }),
1658      "ns3::UdpClient": dict({
1659         "category": "Application",
1660         "create_function": create_element,
1661         "configure_function": configure_element,
1662         "help": "",
1663         "connector_types": ["node"],
1664         "stop_function": stop_application,
1665         "start_function": start_application,
1666         "status_function": status_application,
1667         "box_attributes": ["MaxPackets",
1668             "Interval",
1669             "RemoteAddress",
1670             "RemotePort",
1671             "PacketSize",
1672             "StartTime",
1673             "StopTime"],
1674     }),
1675      "ns3::PointToPointChannel": dict({
1676         "category": "Channel",
1677         "create_function": create_element,
1678         "configure_function": configure_element,
1679         "help": "",
1680         "connector_types": ["dev2"],
1681         "box_attributes": ["Delay"],
1682     }),
1683      "ns3::Ipv6StaticRouting": dict({
1684         "category": "Routing",
1685         "create_function": create_element,
1686         "configure_function": configure_element,
1687         "help": "",
1688         "connector_types": [],
1689         "box_attributes": [],
1690     }),
1691      "ns3::DropTailQueue": dict({
1692         "category": "Queue",
1693         "create_function": create_element,
1694         "configure_function": configure_element,
1695         "help": "",
1696         "connector_types": ["dev"],
1697         "box_attributes": ["MaxPackets",
1698            "MaxBytes"],
1699     }),
1700      "ns3::ConstantPositionMobilityModel": dict({
1701         "category": "Mobility",
1702         "create_function": create_element,
1703         "configure_function": configure_element,
1704         "help": "",
1705         "connector_types": ["node"],
1706         "box_attributes": ["Position",
1707             "Velocity"],
1708         "tags": [tags.MOBILE],
1709     }),
1710      "ns3::FixedRssLossModel": dict({
1711         "category": "Loss",
1712         "create_function": create_element,
1713         "configure_function": configure_element,
1714         "help": "",
1715         "connector_types": [],
1716         "box_attributes": ["Rss"],
1717     }),
1718      "ns3::EnergySourceContainer": dict({
1719         "category": "Energy",
1720         "create_function": create_element,
1721         "configure_function": configure_element,
1722         "help": "",
1723         "connector_types": [],
1724         "box_attributes": [],
1725     }),
1726      "ns3::RandomWalk2dMobilityModel": dict({
1727         "category": "Mobility",
1728         "create_function": create_element,
1729         "configure_function": configure_element,
1730         "help": "",
1731         "connector_types": ["node"],
1732         "box_attributes": ["Bounds",
1733             "Time",
1734             "Distance",
1735             "Mode",
1736             "Direction",
1737             "Speed",
1738             "Position",
1739             "Velocity"],
1740         "tags": [tags.MOBILE],
1741     }),
1742      "ns3::ListPositionAllocator": dict({
1743         "category": "",
1744         "create_function": create_element,
1745         "configure_function": configure_element,
1746         "help": "",
1747         "connector_types": [],
1748         "box_attributes": [],
1749     }),
1750      "ns3::dot11s::PeerManagementProtocol": dict({
1751         "category": "Protocol",
1752         "create_function": create_element,
1753         "configure_function": configure_element,
1754         "help": "",
1755         "connector_types": [],
1756         "box_attributes": ["MaxNumberOfPeerLinks",
1757             "MaxBeaconShiftValue",
1758             "EnableBeaconCollisionAvoidance"],
1759     }),
1760      "ns3::MeshPointDevice": dict({
1761         "category": "Topology",
1762         "create_function": create_element,
1763         "configure_function": configure_element,
1764         "help": "",
1765         "connector_types": [],
1766         "allow_addresses": True,
1767         "box_attributes": ["Mtu"],
1768     }),
1769      "ns3::BasicEnergySource": dict({
1770         "category": "Energy",
1771         "create_function": create_element,
1772         "configure_function": configure_element,
1773         "help": "",
1774         "connector_types": [],
1775         "box_attributes": ["BasicEnergySourceInitialEnergyJ",
1776             "BasicEnergySupplyVoltageV",
1777             "PeriodicEnergyUpdateInterval"],
1778     }),
1779      "ns3::Ipv6OptionPadn": dict({
1780         "category": "",
1781         "create_function": create_element,
1782         "configure_function": configure_element,
1783         "help": "",
1784         "connector_types": [],
1785         "box_attributes": ["OptionNumber"],
1786     }),
1787      "ns3::QapWifiMac": dict({
1788         "category": "Mac",
1789         "create_function": create_wifi_standard_model,
1790         "configure_function": configure_element,
1791         "help": "Access point Wifi MAC Model",
1792         "connector_types": ["dev"],
1793         "box_attributes": ["BeaconInterval",
1794             "BeaconGeneration",
1795             "CtsTimeout",
1796             "AckTimeout",
1797             "BasicBlockAckTimeout",
1798             "CompressedBlockAckTimeout",
1799             "Sifs",
1800             "EifsNoDifs",
1801             "Slot",
1802             "Pifs",
1803             "MaxPropagationDelay",
1804             "Ssid",
1805             "Standard"],
1806     }),
1807      "ns3::YansErrorRateModel": dict({
1808         "category": "Error",
1809         "create_function": create_element,
1810         "configure_function": configure_element,
1811         "help": "",
1812         "connector_types": [],
1813         "box_attributes": [],
1814     }),
1815      "ns3::WifiMacQueue": dict({
1816         "category": "Queue",
1817         "create_function": create_element,
1818         "configure_function": configure_element,
1819         "help": "",
1820         "connector_types": [],
1821         "box_attributes": ["MaxPacketNumber",
1822            "MaxDelay"],
1823     }),
1824      "ns3::NonCommunicatingNetDevice": dict({
1825         "category": "Device",
1826         "create_function": create_element,
1827         "configure_function": configure_element,
1828         "help": "",
1829         "connector_types": [],
1830         "allow_addresses": True,
1831         "box_attributes": [],
1832     }),
1833      "ns3::RateErrorModel": dict({
1834         "category": "Error",
1835         "create_function": create_element,
1836         "configure_function": configure_element,
1837         "help": "",
1838         "connector_types": [],
1839         "box_attributes": ["ErrorUnit",
1840             "ErrorRate",
1841             "RanVar",
1842             "IsEnabled"],
1843     }),
1844      "ns3::MeshWifiInterfaceMac": dict({
1845         "category": "Mac",
1846         "create_function": create_element,
1847         "configure_function": configure_element,
1848         "help": "",
1849         "connector_types": [],
1850         "box_attributes": ["BeaconInterval",
1851             "RandomStart",
1852             "BeaconGeneration",
1853             "CtsTimeout",
1854             "AckTimeout",
1855             "BasicBlockAckTimeout",
1856             "CompressedBlockAckTimeout",
1857             "Sifs",
1858             "EifsNoDifs",
1859             "Slot",
1860             "Pifs",
1861             "MaxPropagationDelay",
1862             "Ssid"],
1863     }),
1864      "ns3::UanPhyCalcSinrDual": dict({
1865         "category": "",
1866         "create_function": create_element,
1867         "configure_function": configure_element,
1868         "help": "",
1869         "connector_types": [],
1870         "box_attributes": [],
1871     }),
1872      "ns3::Ipv6ExtensionAH": dict({
1873         "category": "",
1874         "create_function": create_element,
1875         "configure_function": configure_element,
1876         "help": "",
1877         "connector_types": [],
1878         "box_attributes": ["ExtensionNumber"],
1879     }),
1880      "ns3::SingleModelSpectrumChannel": dict({
1881         "category": "Channel",
1882         "create_function": create_element,
1883         "configure_function": configure_element,
1884         "help": "",
1885         "connector_types": [],
1886         "box_attributes": [],
1887     }),
1888      "ns3::YansWifiPhy": dict({
1889         "category": "Phy",
1890         "create_function": create_wifi_standard_model,
1891         "configure_function": configure_element,
1892         "help": "",
1893         "connector_types": ["dev", "err", "chan"],
1894         "box_attributes": ["EnergyDetectionThreshold",
1895             "CcaMode1Threshold",
1896             "TxGain",
1897             "RxGain",
1898             "TxPowerLevels",
1899             "TxPowerEnd",
1900             "TxPowerStart",
1901             "RxNoiseFigure",
1902             "ChannelSwitchDelay",
1903             "ChannelNumber",
1904             "Standard"],
1905         "traces": ["yanswifipcap"]
1906     }),
1907      "ns3::WifiRadioEnergyModel": dict({
1908         "category": "Energy",
1909         "create_function": create_element,
1910         "configure_function": configure_element,
1911         "help": "",
1912         "connector_types": [],
1913         "box_attributes": ["TxCurrentA",
1914             "RxCurrentA",
1915             "IdleCurrentA",
1916             "SleepCurrentA"],
1917     }),
1918      "ns3::EdcaTxopN": dict({
1919         "category": "",
1920         "create_function": create_element,
1921         "configure_function": configure_element,
1922         "help": "",
1923         "connector_types": [],
1924         "box_attributes": ["BlockAckThreshold",
1925             "MinCw",
1926             "MaxCw",
1927             "Aifsn"],
1928     }),
1929      "ns3::UanPhyPerGenDefault": dict({
1930         "category": "",
1931         "create_function": create_element,
1932         "configure_function": configure_element,
1933         "help": "",
1934         "connector_types": [],
1935         "box_attributes": ["Threshold"],
1936     }),
1937      "ns3::IdealWifiManager": dict({
1938         "category": "Manager",
1939         "create_function": create_element,
1940         "configure_function": configure_element,
1941         "help": "",
1942         "connector_types": [],
1943         "box_attributes": ["BerThreshold",
1944             "IsLowLatency",
1945             "MaxSsrc",
1946             "MaxSlrc",
1947             "RtsCtsThreshold",
1948             "FragmentationThreshold",
1949             "NonUnicastMode"],
1950     }),
1951      "ns3::MultiModelSpectrumChannel": dict({
1952         "category": "Channel",
1953         "create_function": create_element,
1954         "configure_function": configure_element,
1955         "help": "",
1956         "connector_types": [],
1957         "box_attributes": [],
1958     }),
1959      "ns3::HalfDuplexIdealPhy": dict({
1960         "category": "Phy",
1961         "create_function": create_element,
1962         "configure_function": configure_element,
1963         "help": "",
1964         "connector_types": [],
1965         "box_attributes": ["Rate"],
1966     }),
1967      "ns3::UanPhyCalcSinrDefault": dict({
1968         "category": "Phy",
1969         "create_function": create_element,
1970         "configure_function": configure_element,
1971         "help": "",
1972         "connector_types": [],
1973         "box_attributes": [],
1974     }),
1975      "ns3::ReceiveListErrorModel": dict({
1976         "category": "Error",
1977         "create_function": create_element,
1978         "configure_function": configure_element,
1979         "help": "",
1980         "connector_types": [],
1981         "box_attributes": ["IsEnabled"],
1982     }),
1983      "ns3::SpectrumAnalyzer": dict({
1984         "category": "",
1985         "create_function": create_element,
1986         "configure_function": configure_element,
1987         "help": "",
1988         "connector_types": [],
1989         "box_attributes": ["Resolution",
1990         "NoisePowerSpectralDensity"],
1991     }),
1992      "ns3::ConstantRateWifiManager": dict({
1993         "category": "Manager",
1994         "create_function": create_element,
1995         "configure_function": configure_element,
1996         "help": "",
1997         "connector_types": ["dev"],
1998         "box_attributes": ["DataMode",
1999             "ControlMode",
2000             "IsLowLatency",
2001             "MaxSsrc",
2002             "MaxSlrc",
2003             "RtsCtsThreshold",
2004             "FragmentationThreshold",
2005             "NonUnicastMode"],
2006     }),
2007      "ns3::Ipv6OptionPad1": dict({
2008         "category": "",
2009         "create_function": create_element,
2010         "configure_function": configure_element,
2011         "help": "",
2012         "connector_types": [],
2013         "box_attributes": ["OptionNumber"],
2014     }),
2015      "ns3::UdpTraceClient": dict({
2016         "category": "",
2017         "create_function": create_element,
2018         "configure_function": configure_element,
2019         "help": "",
2020         "connector_types": [],
2021         "box_attributes": ["RemoteAddress",
2022             "RemotePort",
2023             "MaxPacketSize",
2024             "StartTime",
2025             "StopTime"],
2026     }),
2027      "ns3::RraaWifiManager": dict({
2028         "category": "Manager",
2029         "create_function": create_element,
2030         "configure_function": configure_element,
2031         "help": "",
2032         "connector_types": [],
2033         "box_attributes": ["Basic",
2034             "Timeout",
2035             "ewndFor54mbps",
2036             "ewndFor48mbps",
2037             "ewndFor36mbps",
2038             "ewndFor24mbps",
2039             "ewndFor18mbps",
2040             "ewndFor12mbps",
2041             "ewndFor9mbps",
2042             "ewndFor6mbps",
2043             "poriFor48mbps",
2044             "poriFor36mbps",
2045             "poriFor24mbps",
2046             "poriFor18mbps",
2047             "poriFor12mbps",
2048             "poriFor9mbps",
2049             "poriFor6mbps",
2050             "pmtlFor54mbps",
2051             "pmtlFor48mbps",
2052             "pmtlFor36mbps",
2053             "pmtlFor24mbps",
2054             "pmtlFor18mbps",
2055             "pmtlFor12mbps",
2056             "pmtlFor9mbps",
2057             "IsLowLatency",
2058             "MaxSsrc",
2059             "MaxSlrc",
2060             "RtsCtsThreshold",
2061             "FragmentationThreshold",
2062             "NonUnicastMode"],
2063     }),
2064      "ns3::RandomPropagationLossModel": dict({
2065         "category": "Loss",
2066         "create_function": create_element,
2067         "configure_function": configure_element,
2068         "help": "",
2069         "connector_types": [],
2070         "box_attributes": ["Variable"],
2071     }),
2072      "ns3::UanChannel": dict({
2073         "category": "Channel",
2074         "create_function": create_element,
2075         "configure_function": configure_element,
2076         "help": "",
2077         "connector_types": [],
2078         "box_attributes": [],
2079     }),
2080      "ns3::MinstrelWifiManager": dict({
2081         "category": "Manager",
2082         "create_function": create_element,
2083         "configure_function": configure_element,
2084         "help": "",
2085         "connector_types": [],
2086         "box_attributes": ["UpdateStatistics",
2087             "LookAroundRate",
2088             "EWMA",
2089             "SegmentSize",
2090             "SampleColumn",
2091             "PacketLength",
2092             "IsLowLatency",
2093             "MaxSsrc",
2094             "MaxSlrc",
2095             "RtsCtsThreshold",
2096             "FragmentationThreshold",
2097             "NonUnicastMode"],
2098     }),
2099      "ns3::UanPhyDual": dict({
2100         "category": "Phy",
2101         "create_function": create_element,
2102         "configure_function": configure_element,
2103         "help": "",
2104         "connector_types": [],
2105         "box_attributes": ["CcaThresholdPhy1",
2106             "CcaThresholdPhy2",
2107             "TxPowerPhy1",
2108             "TxPowerPhy2",
2109             "RxGainPhy1",
2110             "RxGainPhy2",
2111             "SupportedModesPhy1",
2112             "SupportedModesPhy2"],
2113     }),
2114      "ns3::ListErrorModel": dict({
2115         "category": "Error",
2116         "create_function": create_element,
2117         "configure_function": configure_element,
2118         "help": "",
2119         "connector_types": ["dev"],
2120         "box_attributes": ["IsEnabled"],
2121     }),
2122      "ns3::VirtualNetDevice": dict({
2123         "category": "Device",
2124         "create_function": create_element,
2125         "configure_function": configure_element,
2126         "help": "",
2127         "connector_types": [],
2128         "allow_addresses": True,
2129         "box_attributes": ["Mtu"],
2130     }),
2131      "ns3::UanPhyGen": dict({
2132         "category": "Phy",
2133         "create_function": create_element,
2134         "configure_function": configure_element,
2135         "help": "",
2136         "connector_types": [],
2137         "box_attributes": ["CcaThreshold",
2138             "RxThreshold",
2139             "TxPower",
2140             "RxGain",
2141             "SupportedModes"],
2142     }),
2143      "ns3::Ipv6L3Protocol": dict({
2144         "category": "Protocol",
2145         "create_function": create_element,
2146         "configure_function": configure_element,
2147         "help": "",
2148         "connector_types": ["node"],
2149         "box_attributes": ["DefaultTtl",
2150             "IpForward"],
2151     }),
2152      "ns3::PointToPointRemoteChannel": dict({
2153         "category": "Channel",
2154         "create_function": create_element,
2155         "configure_function": configure_element,
2156         "help": "",
2157         "connector_types": [],
2158         "box_attributes": ["Delay"],
2159     }),
2160      "ns3::UanPhyPerUmodem": dict({
2161         "category": "Phy",
2162         "create_function": create_element,
2163         "configure_function": configure_element,
2164         "help": "",
2165         "connector_types": [],
2166         "box_attributes": [],
2167     }),
2168      "ns3::OnoeWifiManager": dict({
2169         "category": "Manager",
2170         "create_function": create_element,
2171         "configure_function": configure_element,
2172         "help": "",
2173         "connector_types": [],
2174         "box_attributes": ["UpdatePeriod",
2175             "RaiseThreshold",
2176             "AddCreditThreshold",
2177             "IsLowLatency",
2178             "MaxSsrc",
2179             "MaxSlrc",
2180             "RtsCtsThreshold",
2181             "FragmentationThreshold",
2182             "NonUnicastMode"],
2183     }),
2184      "ns3::QadhocWifiMac": dict({
2185         "category": "Mac",
2186         "create_function": create_element,
2187         "configure_function": configure_element,
2188         "help": "",
2189         "connector_types": [],
2190         "box_attributes": ["CtsTimeout",
2191             "AckTimeout",
2192             "BasicBlockAckTimeout",
2193             "CompressedBlockAckTimeout",
2194             "Sifs",
2195             "EifsNoDifs",
2196             "Slot",
2197             "Pifs",
2198             "MaxPropagationDelay",
2199             "Ssid"],
2200     }),
2201      "ns3::JakesPropagationLossModel": dict({
2202         "category": "Loss",
2203         "create_function": create_element,
2204         "configure_function": configure_element,
2205         "help": "",
2206         "connector_types": [],
2207         "box_attributes": ["NumberOfRaysPerPath",
2208             "NumberOfOscillatorsPerRay",
2209             "DopplerFreq",
2210             "Distribution"],
2211     }),
2212      "ns3::PacketSink": dict({
2213         "category": "Application",
2214         "create_function": create_element,
2215         "configure_function": configure_element,
2216         "help": "",
2217         "connector_types": ["node"],
2218         "stop_function": stop_application,
2219         "start_function": start_application,
2220         "status_function": status_application,
2221         "box_attributes": ["Local",
2222             "Protocol",
2223             "StartTime",
2224             "StopTime"],
2225     }),
2226      "ns3::RandomDirection2dMobilityModel": dict({
2227         "category": "Mobility",
2228         "create_function": create_element,
2229         "configure_function": configure_element,
2230         "help": "",
2231         "connector_types": ["node"],
2232         "box_attributes": ["Bounds",
2233             "RndSpeed",
2234             "Pause",
2235             "Position",
2236             "Velocity"],
2237         "tags": [tags.MOBILE],
2238     }),
2239      "ns3::UanMacAloha": dict({
2240         "category": "",
2241         "create_function": create_element,
2242         "configure_function": configure_element,
2243         "help": "",
2244         "connector_types": [],
2245         "box_attributes": [],
2246     }),
2247      "ns3::MsduStandardAggregator": dict({
2248         "category": "",
2249         "create_function": create_element,
2250         "configure_function": configure_element,
2251         "help": "",
2252         "connector_types": [],
2253         "box_attributes": ["MaxAmsduSize"],
2254     }),
2255      "ns3::DcaTxop": dict({
2256         "category": "",
2257         "create_function": create_element,
2258         "configure_function": configure_element,
2259         "help": "",
2260         "connector_types": [],
2261         "box_attributes": ["MinCw",
2262             "MaxCw",
2263             "Aifsn"],
2264     }),
2265      "ns3::UanPhyCalcSinrFhFsk": dict({
2266         "category": "Phy",
2267         "create_function": create_element,
2268         "configure_function": configure_element,
2269         "help": "",
2270         "connector_types": [],
2271         "box_attributes": ["NumberOfHops"],
2272     }),
2273      "ns3::UanPropModelIdeal": dict({
2274         "category": "",
2275         "create_function": create_element,
2276         "configure_function": configure_element,
2277         "help": "",
2278         "connector_types": [],
2279         "box_attributes": [],
2280     }),
2281      "ns3::UanMacRcGw": dict({
2282         "category": "",
2283         "create_function": create_element,
2284         "configure_function": configure_element,
2285         "help": "",
2286         "connector_types": [],
2287         "box_attributes": ["MaxReservations",
2288             "NumberOfRates",
2289             "RetryRate",
2290             "MaxPropDelay",
2291             "SIFS",
2292             "NumberOfNodes",
2293             "MinRetryRate",
2294             "RetryStep",
2295             "NumberOfRetryRates",
2296             "TotalRate",
2297             "RateStep",
2298             "FrameSize"],
2299     }),
2300      "ns3::NistErrorRateModel": dict({
2301         "category": "Error",
2302         "create_function": create_element,
2303         "configure_function": configure_element,
2304         "help": "",
2305         "connector_types": ["phy"],
2306         "box_attributes": [],
2307     }),
2308      "ns3::Ipv4L3Protocol": dict({
2309         "category": "Protocol",
2310         "create_function": create_ipv4protocol,
2311         "configure_function": configure_element,
2312         "help": "",
2313         "connector_types": ["node"],
2314         "box_attributes": ["DefaultTtl",
2315             "IpForward",
2316             "WeakEsModel"],
2317     }),
2318      "ns3::aodv::RoutingProtocol": dict({
2319         "category": "Protocol",
2320         "create_function": create_element,
2321         "configure_function": configure_element,
2322         "help": "",
2323         "connector_types": [],
2324         "box_attributes": ["HelloInterval",
2325             "RreqRetries",
2326             "RreqRateLimit",
2327             "NodeTraversalTime",
2328             "NextHopWait",
2329             "ActiveRouteTimeout",
2330             "MyRouteTimeout",
2331             "BlackListTimeout",
2332             "DeletePeriod",
2333             "TimeoutBuffer",
2334             "NetDiameter",
2335             "NetTraversalTime",
2336             "PathDiscoveryTime",
2337             "MaxQueueLen",
2338             "MaxQueueTime",
2339             "AllowedHelloLoss",
2340             "GratuitousReply",
2341             "DestinationOnly",
2342             "EnableHello",
2343             "EnableBroadcast"],
2344     }),
2345      "ns3::TcpL4Protocol": dict({
2346         "category": "Protocol",
2347         "create_function": create_element,
2348         "configure_function": configure_element,
2349         "help": "",
2350         "connector_types": ["node"],
2351         "box_attributes": ["RttEstimatorFactory",
2352             "ProtocolNumber"],
2353     }),
2354      "ns3::olsr::RoutingProtocol": dict({
2355         "category": "Protocol",
2356         "create_function": create_element,
2357         "configure_function": configure_element,
2358         "help": "",
2359         "connector_types": [],
2360         "box_attributes": ["HelloInterval",
2361             "TcInterval",
2362             "MidInterval",
2363             "HnaInterval",
2364             "Willingness"],
2365     }),
2366      "ns3::UdpEchoServer": dict({
2367         "category": "Application",
2368         "create_function": create_element,
2369         "configure_function": configure_element,
2370         "help": "",
2371         "connector_types": ["node"],
2372         "stop_function": stop_application,
2373         "start_function": start_application,
2374         "status_function": status_application,
2375         "box_attributes": ["Port",
2376            "StartTime",
2377            "StopTime"],
2378     }),
2379      "ns3::AmrrWifiManager": dict({
2380         "category": "Manager",
2381         "create_function": create_element,
2382         "configure_function": configure_element,
2383         "help": "",
2384         "connector_types": [],
2385         "box_attributes": ["UpdatePeriod",
2386             "FailureRatio",
2387             "SuccessRatio",
2388             "MaxSuccessThreshold",
2389             "MinSuccessThreshold",
2390             "IsLowLatency",
2391             "MaxSsrc",
2392             "MaxSlrc",
2393             "RtsCtsThreshold",
2394             "FragmentationThreshold",
2395             "NonUnicastMode"],
2396     }),
2397      "ns3::ArfWifiManager": dict({
2398         "category": "Manager",
2399         "create_function": create_element,
2400         "configure_function": configure_element,
2401         "help": "",
2402         "connector_types": ["dev"],
2403         "box_attributes": ["TimerThreshold",
2404             "SuccessThreshold",
2405             "IsLowLatency",
2406             "MaxSsrc",
2407             "MaxSlrc",
2408             "RtsCtsThreshold",
2409             "FragmentationThreshold",
2410             "NonUnicastMode"],
2411     }),
2412      "ns3::SubscriberStationNetDevice": dict({
2413         "category": "Device",
2414         "create_function": create_subscriber_station,
2415         "configure_function": configure_station,
2416         "help": "Subscriber station for mobile wireless network",
2417         "connector_types": ["node", "chan", "phy", "sflows"],
2418         "allow_addresses": True,
2419         "box_attributes": ["LostDlMapInterval",
2420             "LostUlMapInterval",
2421             "MaxDcdInterval",
2422             "MaxUcdInterval",
2423             "IntervalT1",
2424             "IntervalT2",
2425             "IntervalT3",
2426             "IntervalT7",
2427             "IntervalT12",
2428             "IntervalT20",
2429             "IntervalT21",
2430             "MaxContentionRangingRetries",
2431             "Mtu",
2432             "RTG",
2433             "TTG"],
2434         "traces": ["wimaxpcap", "wimaxascii"],
2435     }),
2436     "ns3::flame::FlameRtable": dict({
2437         "category": "",
2438         "create_function": create_element,
2439         "configure_function": configure_element,
2440         "help": "",
2441         "connector_types": [],
2442         "box_attributes": ["Lifetime"],
2443     }),
2444     "ns3::BSSchedulerRtps": dict({
2445         "category": "Service Flow",
2446         "create_function": create_element,
2447         "configure_function": configure_element,
2448         "help": "Simple downlink scheduler for rtPS flows",
2449         "connector_types": ["dev"],
2450         "box_attributes": [],
2451     }),
2452     "ns3::BSSchedulerSimple": dict({
2453         "category": "Service Flow",
2454         "create_function": create_element,
2455         "configure_function": configure_element,
2456         "help": "simple downlink scheduler for service flows",
2457         "connector_types": ["dev"],
2458         "box_attributes": [],
2459     }),
2460     "ns3::SimpleOfdmWimaxChannel": dict({
2461         "category": "Channel",
2462         "create_function": create_wimax_channel,
2463         "configure_function": configure_element,
2464         "help": "Wimax channel",
2465         "connector_types": ["devs"],
2466         "box_attributes": [],
2467     }),
2468     "ns3::SimpleOfdmWimaxPhy": dict({
2469         "category": "Phy",
2470         "create_function": create_wimax_phy,
2471         "configure_function": configure_element,
2472         "help": "Wimax Phy",
2473         "connector_types": ["dev"],
2474         "box_attributes": [],
2475     }),
2476     "ns3::UplinkSchedulerSimple": dict({
2477         "category": "Service Flow",
2478         "create_function": create_element_no_constructor,
2479         "configure_function": configure_element,
2480         "help": "Simple uplink scheduler for service flows",
2481         "connector_types": ["dev"],
2482         "box_attributes": [],
2483     }),
2484     "ns3::UplinkSchedulerRtps": dict({
2485         "category": "Service Flow",
2486         "create_function": create_element_no_constructor,
2487         "configure_function": configure_element,
2488         "help": "Simple uplink scheduler for rtPS flows",
2489         "connector_types": ["dev"],
2490         "box_attributes": [],
2491     }),
2492     "ns3::IpcsClassifierRecord": dict({
2493         "category": "Service Flow",
2494         "create_function": create_ipcs_classifier_record,
2495         "configure_function": configure_element,
2496         "help": "Classifier record for service flow",
2497         "connector_types": ["sflow"],
2498         "box_attributes": ["ClassifierSrcAddress", 
2499             "ClassifierSrcMask", 
2500             "ClassifierDstAddress",
2501             "ClassifierDstMask",
2502             "ClassifierSrcPortLow",
2503             "ClassifierSrcPortHigh",
2504             "ClassifierDstPortLow",
2505             "ClassifierDstPortHigh",
2506             "ClassifierProtocol",
2507             "ClassifierPriority"],
2508     }),   
2509     "ns3::ServiceFlow": dict({
2510         "category": "Service Flow",
2511         "create_function": create_service_flow,
2512         "configure_function": configure_element,
2513         "help": "Service flow for QoS",
2514         "connector_types": ["classif", "dev"],
2515         "box_attributes": ["ServiceFlowDirection", 
2516             "ServiceFlowSchedulingType"],
2517     }),   
2518 })
2519