86 "The MAC address of this device.", |
86 "The MAC address of this device.", |
87 Mac48AddressValue (Mac48Address ("ff:ff:ff:ff:ff:ff")), |
87 Mac48AddressValue (Mac48Address ("ff:ff:ff:ff:ff:ff")), |
88 MakeMac48AddressAccessor (&FdNetDevice::m_address), |
88 MakeMac48AddressAccessor (&FdNetDevice::m_address), |
89 MakeMac48AddressChecker ()) |
89 MakeMac48AddressChecker ()) |
90 .AddAttribute ("Start", |
90 .AddAttribute ("Start", |
91 "The simulation time at which to spin up the device thread.", |
91 "The simulation time at which to spin up " |
|
92 "the device thread.", |
92 TimeValue (Seconds (0.)), |
93 TimeValue (Seconds (0.)), |
93 MakeTimeAccessor (&FdNetDevice::m_tStart), |
94 MakeTimeAccessor (&FdNetDevice::m_tStart), |
94 MakeTimeChecker ()) |
95 MakeTimeChecker ()) |
95 .AddAttribute ("Stop", |
96 .AddAttribute ("Stop", |
96 "The simulation time at which to tear down the device thread.", |
97 "The simulation time at which to tear down " |
|
98 "the device thread.", |
97 TimeValue (Seconds (0.)), |
99 TimeValue (Seconds (0.)), |
98 MakeTimeAccessor (&FdNetDevice::m_tStop), |
100 MakeTimeAccessor (&FdNetDevice::m_tStop), |
99 MakeTimeChecker ()) |
101 MakeTimeChecker ()) |
100 .AddAttribute ("EncapsulationMode", |
102 .AddAttribute ("EncapsulationMode", |
101 "The link-layer encapsulation type to use.", |
103 "The link-layer encapsulation type to use.", |
118 // a consitent tracing environment. These trace hooks should really be |
120 // a consitent tracing environment. These trace hooks should really be |
119 // interpreted as the points at which a packet leaves the ns-3 environment |
121 // interpreted as the points at which a packet leaves the ns-3 environment |
120 // destined for the underlying operating system or vice-versa. |
122 // destined for the underlying operating system or vice-versa. |
121 // |
123 // |
122 .AddTraceSource ("MacTx", |
124 .AddTraceSource ("MacTx", |
123 "Trace source indicating a packet has arrived for transmission by this device", |
125 "Trace source indicating a packet has " |
124 MakeTraceSourceAccessor (&FdNetDevice::m_macTxTrace)) |
126 "arrived for transmission by this device", |
|
127 MakeTraceSourceAccessor (&FdNetDevice::m_macTxTrace), |
|
128 "ns3::Packet::TracedCallback") |
125 .AddTraceSource ("MacTxDrop", |
129 .AddTraceSource ("MacTxDrop", |
126 "Trace source indicating a packet has been dropped by the device before transmission", |
130 "Trace source indicating a packet has " |
127 MakeTraceSourceAccessor (&FdNetDevice::m_macTxDropTrace)) |
131 "been dropped by the device before transmission", |
|
132 MakeTraceSourceAccessor (&FdNetDevice::m_macTxDropTrace), |
|
133 "ns3::Packet::TracedCallback") |
128 .AddTraceSource ("MacPromiscRx", |
134 .AddTraceSource ("MacPromiscRx", |
129 "A packet has been received by this device, has been passed up from the physical layer " |
135 "A packet has been received by this device, " |
130 "and is being forwarded up the local protocol stack. This is a promiscuous trace,", |
136 "has been passed up from the physical layer " |
131 MakeTraceSourceAccessor (&FdNetDevice::m_macPromiscRxTrace)) |
137 "and is being forwarded up the local protocol stack. " |
|
138 "This is a promiscuous trace,", |
|
139 MakeTraceSourceAccessor (&FdNetDevice::m_macPromiscRxTrace), |
|
140 "ns3::Packet::TracedCallback") |
132 .AddTraceSource ("MacRx", |
141 .AddTraceSource ("MacRx", |
133 "A packet has been received by this device, has been passed up from the physical layer " |
142 "A packet has been received by this device, " |
134 "and is being forwarded up the local protocol stack. This is a non-promiscuous trace,", |
143 "has been passed up from the physical layer " |
135 MakeTraceSourceAccessor (&FdNetDevice::m_macRxTrace)) |
144 "and is being forwarded up the local protocol stack. " |
|
145 "This is a non-promiscuous trace,", |
|
146 MakeTraceSourceAccessor (&FdNetDevice::m_macRxTrace), |
|
147 "ns3::Packet::TracedCallback") |
136 |
148 |
137 // |
149 // |
138 // Trace sources designed to simulate a packet sniffer facility (tcpdump). |
150 // Trace sources designed to simulate a packet sniffer facility (tcpdump). |
139 // |
151 // |
140 .AddTraceSource ("Sniffer", |
152 .AddTraceSource ("Sniffer", |
141 "Trace source simulating a non-promiscuous packet sniffer attached to the device", |
153 "Trace source simulating a non-promiscuous " |
142 MakeTraceSourceAccessor (&FdNetDevice::m_snifferTrace)) |
154 "packet sniffer attached to the device", |
|
155 MakeTraceSourceAccessor (&FdNetDevice::m_snifferTrace), |
|
156 "ns3::Packet::TracedCallback") |
143 .AddTraceSource ("PromiscSniffer", |
157 .AddTraceSource ("PromiscSniffer", |
144 "Trace source simulating a promiscuous packet sniffer attached to the device", |
158 "Trace source simulating a promiscuous " |
145 MakeTraceSourceAccessor (&FdNetDevice::m_promiscSnifferTrace)) |
159 "packet sniffer attached to the device", |
|
160 MakeTraceSourceAccessor (&FdNetDevice::m_promiscSnifferTrace), |
|
161 "ns3::Packet::TracedCallback") |
146 ; |
162 ; |
147 return tid; |
163 return tid; |
148 } |
164 } |
149 |
165 |
150 FdNetDevice::FdNetDevice () |
166 FdNetDevice::FdNetDevice () |