1.1 --- a/src/mih/mih-callbacks.h Tue Dec 02 18:10:24 2008 +0100
1.2 +++ b/src/mih/mih-callbacks.h Tue Dec 02 19:25:50 2008 +0100
1.3 @@ -51,8 +51,8 @@
1.4 namespace mih {
1.5 // Event service callbacks;
1.6 // Link detected;
1.7 - typedef Callback<void, MihfId, LinkDetectedInformation> MihLinkDetectedIndicationCallback;
1.8 - typedef TracedCallback<MihfId, LinkDetectedInformation> MihLinkDetectedIndicationTracedCallback;
1.9 + typedef Callback<void, MihfId, LinkDetectedInformationList> MihLinkDetectedIndicationCallback;
1.10 + typedef TracedCallback<MihfId, LinkDetectedInformationList> MihLinkDetectedIndicationTracedCallback;
1.11 // Link up;
1.12 typedef Callback<void, MihfId, LinkIdentifier, Address, Address, bool, MobilityManagementSupport> MihLinkUpIndicationCallback;
1.13 typedef TracedCallback<MihfId, LinkIdentifier, Address, Address, bool, MobilityManagementSupport> MihLinkUpIndicationTracedCallback;
2.1 --- a/src/mih/mih-link-detected-information.h Tue Dec 02 18:10:24 2008 +0100
2.2 +++ b/src/mih/mih-link-detected-information.h Tue Dec 02 19:25:50 2008 +0100
2.3 @@ -23,6 +23,8 @@
2.4
2.5 #include <stdint.h>
2.6 #include <vector>
2.7 +#include "ns3/ptr.h"
2.8 +#include "ns3/ref-count-base.h"
2.9 #include "mih-link-identifier.h"
2.10 #include "mih-network-identifier.h"
2.11 #include "mih-network-auxiliary-identifier.h"
2.12 @@ -33,7 +35,7 @@
2.13
2.14 namespace ns3 {
2.15 namespace mih {
2.16 - class LinkDetectedInformation {
2.17 + class LinkDetectedInformation : public RefCountBase {
2.18 public:
2.19 LinkDetectedInformation (LinkIdentifier linkIdentifier,
2.20 NetworkIdentifier networkIdentifier,
3.1 --- a/src/mih/mih-protocol.cc Tue Dec 02 18:10:24 2008 +0100
3.2 +++ b/src/mih/mih-protocol.cc Tue Dec 02 19:25:50 2008 +0100
3.3 @@ -193,7 +193,7 @@
3.4 }
3.5 else
3.6 {
3.7 - linkDetectedEventCallback1 = MakeNullCallback<void, MihfId, LinkDetectedInformation> ();
3.8 + linkDetectedEventCallback1 = MakeNullCallback<void, MihfId, LinkDetectedInformationList> ();
3.9 }
3.10 if (events.GetEventList () & EventList::LINK_UP)
3.11 {
4.1 --- a/src/mih/mih-remote-event-destination-trap.cc Tue Dec 02 18:10:24 2008 +0100
4.2 +++ b/src/mih/mih-remote-event-destination-trap.cc Tue Dec 02 19:25:50 2008 +0100
4.3 @@ -110,9 +110,9 @@
4.4 // Callback accessors;
4.5 void
4.6 RemoteEventDestinationTrap::LinkDetected (MihfId mihfId,
4.7 - LinkDetectedInformation linkDetectedInfo)
4.8 + LinkDetectedInformationList linkDetectedInfoList)
4.9 {
4.10 - m_linkDetectedIndication (mihfId, linkDetectedInfo);
4.11 + m_linkDetectedIndication (mihfId, linkDetectedInfoList);
4.12 }
4.13 void
4.14 RemoteEventDestinationTrap::LinkUp (MihfId mihfId,
5.1 --- a/src/mih/mih-remote-event-destination-trap.h Tue Dec 02 18:10:24 2008 +0100
5.2 +++ b/src/mih/mih-remote-event-destination-trap.h Tue Dec 02 19:25:50 2008 +0100
5.3 @@ -48,7 +48,7 @@
5.4 void RemoveLinkPduTxStatusCallback (MihLinkPduTransmitStatusIndicationCallback linkPduTxStatusCb);
5.5 // Callback accessors;
5.6 void LinkDetected (MihfId mihfId,
5.7 - LinkDetectedInformation linkDetectedInfo);
5.8 + LinkDetectedInformationList linkDetectedInfoList);
5.9 void LinkUp (MihfId mihfId,
5.10 LinkIdentifier linkIdentifier,
5.11 Address oldAR,
6.1 --- a/src/mih/mih-remote-event-source-trap.cc Tue Dec 02 18:10:24 2008 +0100
6.2 +++ b/src/mih/mih-remote-event-source-trap.cc Tue Dec 02 19:25:50 2008 +0100
6.3 @@ -37,7 +37,7 @@
6.4 // Callback accessors;
6.5 void
6.6 RemoteEventSourceTrap::LinkDetected (MihfId,
6.7 - LinkDetectedInformation)
6.8 + LinkDetectedInformationList)
6.9 {
6.10
6.11 }
7.1 --- a/src/mih/mih-remote-event-source-trap.h Tue Dec 02 18:10:24 2008 +0100
7.2 +++ b/src/mih/mih-remote-event-source-trap.h Tue Dec 02 19:25:50 2008 +0100
7.3 @@ -36,8 +36,8 @@
7.4 virtual ~RemoteEventSourceTrap (void);
7.5 void SetSession (Ptr<Session> session);
7.6 // Callback accessors;
7.7 - void LinkDetected (MihfId,
7.8 - LinkDetectedInformation);
7.9 + void LinkDetected (MihfId mihfId,
7.10 + LinkDetectedInformationList);
7.11 void LinkUp (MihfId,
7.12 LinkIdentifier,
7.13 Address,
8.1 --- a/src/mih/mih-session.cc Tue Dec 02 18:10:24 2008 +0100
8.2 +++ b/src/mih/mih-session.cc Tue Dec 02 19:25:50 2008 +0100
8.3 @@ -38,8 +38,12 @@
8.4 m_socket (socket),
8.5 m_nextTransactionId (0),
8.6 m_delay (0),
8.7 - m_maxSize (0)
8.8 - {}
8.9 + m_maxSize (0),
8.10 + m_remoteEventDestinationTrap (),
8.11 + m_remoteEventSourceTrap ()
8.12 + {
8.13 + m_remoteEventSourceTrap.SetSession (Ptr<Session>(this, false));
8.14 + }
8.15 Session::~Session (void)
8.16 {
8.17 m_socket = 0;