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