|
|
| 172 |
*/ |
172 |
*/ |
| 173 |
void UnregisterProtocolHandler (ProtocolHandler handler); |
173 |
void UnregisterProtocolHandler (ProtocolHandler handler); |
| 174 |
|
174 |
|
|
|
175 |
typedef Callback<void,Ptr<NetDevice> > DeviceAdditionListener; |
| 176 |
void RegisterDeviceAdditionListener (DeviceAdditionListener listener); |
| 177 |
void UnregisterDeviceAdditionListener (DeviceAdditionListener listener); |
| 175 |
|
178 |
|
| 176 |
/** |
179 |
/** |
| 177 |
* \returns true if checksums are enabled, false otherwise. |
180 |
* \returns true if checksums are enabled, false otherwise. |
|
|
| 188 |
virtual void DoDispose (void); |
191 |
virtual void DoDispose (void); |
| 189 |
virtual void DoStart (void); |
192 |
virtual void DoStart (void); |
| 190 |
private: |
193 |
private: |
| 191 |
|
194 |
void NotifyDeviceAdded (Ptr<NetDevice> device); |
| 192 |
/** |
|
|
| 193 |
* \param device the device added to this Node. |
| 194 |
* |
| 195 |
* This method is invoked whenever a user calls Node::AddDevice. |
| 196 |
*/ |
| 197 |
virtual void NotifyDeviceAdded (Ptr<NetDevice> device); |
| 198 |
|
195 |
|
| 199 |
bool NonPromiscReceiveFromDevice (Ptr<NetDevice> device, Ptr<const Packet>, uint16_t protocol, const Address &from); |
196 |
bool NonPromiscReceiveFromDevice (Ptr<NetDevice> device, Ptr<const Packet>, uint16_t protocol, const Address &from); |
| 200 |
bool PromiscReceiveFromDevice (Ptr<NetDevice> device, Ptr<const Packet>, uint16_t protocol, |
197 |
bool PromiscReceiveFromDevice (Ptr<NetDevice> device, Ptr<const Packet>, uint16_t protocol, |
|
|
| 211 |
bool promiscuous; |
208 |
bool promiscuous; |
| 212 |
}; |
209 |
}; |
| 213 |
typedef std::vector<struct Node::ProtocolHandlerEntry> ProtocolHandlerList; |
210 |
typedef std::vector<struct Node::ProtocolHandlerEntry> ProtocolHandlerList; |
|
|
211 |
typedef std::vector<DeviceAdditionListener> DeviceAdditionListenerList; |
| 212 |
|
| 214 |
uint32_t m_id; // Node id for this node |
213 |
uint32_t m_id; // Node id for this node |
| 215 |
uint32_t m_sid; // System id for this node |
214 |
uint32_t m_sid; // System id for this node |
| 216 |
std::vector<Ptr<NetDevice> > m_devices; |
215 |
std::vector<Ptr<NetDevice> > m_devices; |
| 217 |
std::vector<Ptr<Application> > m_applications; |
216 |
std::vector<Ptr<Application> > m_applications; |
| 218 |
ProtocolHandlerList m_handlers; |
217 |
ProtocolHandlerList m_handlers; |
| 219 |
|
218 |
DeviceAdditionListenerList m_deviceAdditionListeners; |
| 220 |
}; |
219 |
}; |
| 221 |
|
220 |
|
| 222 |
} //namespace ns3 |
221 |
} //namespace ns3 |