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