|
|
| 580 |
NS_ASSERT (ipv4 != 0); |
580 |
NS_ASSERT (ipv4 != 0); |
| 581 |
NS_ASSERT (m_ipv4 == 0); |
581 |
NS_ASSERT (m_ipv4 == 0); |
| 582 |
|
582 |
|
| 583 |
if (EnableHello) |
|
|
| 584 |
{ |
| 585 |
m_htimer.SetFunction (&RoutingProtocol::HelloTimerExpire, this); |
| 586 |
m_htimer.Schedule (MilliSeconds (m_uniformRandomVariable->GetInteger (0, 100))); |
| 587 |
} |
| 588 |
|
| 589 |
m_ipv4 = ipv4; |
583 |
m_ipv4 = ipv4; |
| 590 |
|
584 |
|
| 591 |
// Create lo route. It is asserted that the only one interface up for now is loopback |
585 |
// Create lo route. It is asserted that the only one interface up for now is loopback |
|
|
| 1928 |
return socket; |
1922 |
return socket; |
| 1929 |
} |
1923 |
} |
| 1930 |
|
1924 |
|
|
|
1925 |
void |
| 1926 |
RoutingProtocol::DoInitialize (void) |
| 1927 |
{ |
| 1928 |
NS_LOG_FUNCTION (this); |
| 1929 |
uint32_t startTime; |
| 1930 |
if (EnableHello) |
| 1931 |
{ |
| 1932 |
m_htimer.SetFunction (&RoutingProtocol::HelloTimerExpire, this); |
| 1933 |
startTime = m_uniformRandomVariable->GetInteger (0, 100); |
| 1934 |
NS_LOG_DEBUG ("Starting at time " << startTime << "ms"); |
| 1935 |
m_htimer.Schedule (MilliSeconds (startTime)); |
| 1936 |
} |
| 1937 |
Ipv4RoutingProtocol::DoInitialize (); |
| 1931 |
} |
1938 |
} |
| 1932 |
} |
1939 |
|
|
|
1940 |
} //namespace aodv |
| 1941 |
} //namespace ns3 |