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