|
Lines 44-68
NS_OBJECT_ENSURE_REGISTERED (Icmpv6L4Protocol);
|
Link Here
|
|---|
|
| 44 |
|
44 |
|
| 45 |
const uint8_t Icmpv6L4Protocol::PROT_NUMBER = 58; |
45 |
const uint8_t Icmpv6L4Protocol::PROT_NUMBER = 58; |
| 46 |
|
46 |
|
| 47 |
const uint8_t Icmpv6L4Protocol::MAX_INITIAL_RTR_ADVERT_INTERVAL = 16; |
|
|
| 48 |
const uint8_t Icmpv6L4Protocol::MAX_INITIAL_RTR_ADVERTISEMENTS = 3; |
| 49 |
const uint8_t Icmpv6L4Protocol::MAX_FINAL_RTR_ADVERTISEMENTS = 3; |
| 50 |
const uint8_t Icmpv6L4Protocol::MIN_DELAY_BETWEEN_RAS = 3; |
| 51 |
const uint32_t Icmpv6L4Protocol::MAX_RA_DELAY_TIME = 500; /* millisecond */ |
| 52 |
|
| 53 |
const uint8_t Icmpv6L4Protocol::MAX_RTR_SOLICITATION_DELAY = 1; |
| 54 |
const uint8_t Icmpv6L4Protocol::RTR_SOLICITATION_INTERVAL = 4; |
| 55 |
const uint8_t Icmpv6L4Protocol::MAX_RTR_SOLICITATIONS = 3; |
| 56 |
|
| 57 |
const uint8_t Icmpv6L4Protocol::MAX_MULTICAST_SOLICIT = 3; |
| 58 |
const uint8_t Icmpv6L4Protocol::MAX_UNICAST_SOLICIT = 3; |
| 59 |
const uint8_t Icmpv6L4Protocol::MAX_ANYCAST_DELAY_TIME = 1; |
| 60 |
const uint8_t Icmpv6L4Protocol::MAX_NEIGHBOR_ADVERTISEMENT = 3; |
| 61 |
const uint32_t Icmpv6L4Protocol::REACHABLE_TIME = 30000; |
| 62 |
const uint32_t Icmpv6L4Protocol::RETRANS_TIMER = 1000; |
| 63 |
const uint8_t Icmpv6L4Protocol::DELAY_FIRST_PROBE_TIME = 5; |
| 64 |
const double Icmpv6L4Protocol::MIN_RANDOM_FACTOR = 0.5; |
| 65 |
const double Icmpv6L4Protocol::MAX_RANDOM_FACTOR = 1.5; |
| 66 |
|
47 |
|
| 67 |
TypeId Icmpv6L4Protocol::GetTypeId () |
48 |
TypeId Icmpv6L4Protocol::GetTypeId () |
| 68 |
{ |
49 |
{ |
|
Lines 78-84
TypeId Icmpv6L4Protocol::GetTypeId ()
|
Link Here
|
|---|
|
| 78 |
StringValue ("ns3::UniformRandomVariable[Min=0.0|Max=10.0]"), |
59 |
StringValue ("ns3::UniformRandomVariable[Min=0.0|Max=10.0]"), |
| 79 |
MakePointerAccessor (&Icmpv6L4Protocol::m_solicitationJitter), |
60 |
MakePointerAccessor (&Icmpv6L4Protocol::m_solicitationJitter), |
| 80 |
MakePointerChecker<RandomVariableStream> ()) |
61 |
MakePointerChecker<RandomVariableStream> ()) |
| 81 |
|
62 |
.AddAttribute ("MAX_INITIAL_RTR_ADVERT_INTERVAL", "Neighbor Discovery router constants : max initial RA initial interval.", |
|
|
63 |
UintegerValue (16), |
| 64 |
MakeUintegerAccessor (&Icmpv6L4Protocol::MAX_INITIAL_RTR_ADVERT_INTERVAL), |
| 65 |
MakeUintegerChecker<uint8_t> ()) |
| 66 |
.AddAttribute ("MAX_INITIAL_RTR_ADVERTISEMENTS", "Neighbor Discovery router constants : max initial RA transmission.", |
| 67 |
IntegerValue (3), |
| 68 |
MakeIntegerAccessor (&Icmpv6L4Protocol::MAX_INITIAL_RTR_ADVERTISEMENTS), |
| 69 |
MakeIntegerChecker<uint8_t> ()) |
| 70 |
.AddAttribute ("MAX_FINAL_RTR_ADVERTISEMENTS", "Neighbor Discovery router constants : max final RA transmission.", |
| 71 |
IntegerValue (3), |
| 72 |
MakeIntegerAccessor (&Icmpv6L4Protocol::MAX_FINAL_RTR_ADVERTISEMENTS), |
| 73 |
MakeIntegerChecker<uint8_t> ()) |
| 74 |
.AddAttribute ("MIN_DELAY_BETWEEN_RAS", "Neighbor Discovery router constants : min delay between RA.", |
| 75 |
IntegerValue (3), |
| 76 |
MakeIntegerAccessor (&Icmpv6L4Protocol::MIN_DELAY_BETWEEN_RAS), |
| 77 |
MakeIntegerChecker<uint8_t> ()) |
| 78 |
.AddAttribute ("MAX_RA_DELAY_TIME", "Neighbor Discovery router constants : max delay between RA.", |
| 79 |
IntegerValue (500), |
| 80 |
MakeIntegerAccessor (&Icmpv6L4Protocol::MAX_RA_DELAY_TIME), |
| 81 |
MakeIntegerChecker<uint32_t> ()) |
| 82 |
.AddAttribute ("MAX_RTR_SOLICITATION_DELAY", "Neighbor Discovery host constants : max RS delay.", |
| 83 |
IntegerValue (1), |
| 84 |
MakeIntegerAccessor (&Icmpv6L4Protocol::MAX_RTR_SOLICITATION_DELAY), |
| 85 |
MakeIntegerChecker<uint8_t> ()) |
| 86 |
.AddAttribute ("RTR_SOLICITATION_INTERVAL", "Neighbor Discovery host constants : RS interval.", |
| 87 |
IntegerValue (4), |
| 88 |
MakeIntegerAccessor (&Icmpv6L4Protocol::RTR_SOLICITATION_INTERVAL), |
| 89 |
MakeIntegerChecker<uint8_t> ()) |
| 90 |
.AddAttribute ("MAX_RTR_SOLICITATIONS", "Neighbor Discovery host constants : max RS transmission.", |
| 91 |
IntegerValue (3), |
| 92 |
MakeIntegerAccessor (&Icmpv6L4Protocol::MAX_RTR_SOLICITATIONS), |
| 93 |
MakeIntegerChecker<uint8_t> ()) |
| 94 |
.AddAttribute ("MAX_MULTICAST_SOLICIT", "Neighbor Discovery node constants : max multicast solicitations.", |
| 95 |
IntegerValue (3), |
| 96 |
MakeIntegerAccessor (&Icmpv6L4Protocol::MAX_MULTICAST_SOLICIT), |
| 97 |
MakeIntegerChecker<uint8_t> ()) |
| 98 |
.AddAttribute ("MAX_UNICAST_SOLICIT", "Neighbor Discovery node constants : max unicast solicitations.", |
| 99 |
IntegerValue (3), |
| 100 |
MakeIntegerAccessor (&Icmpv6L4Protocol::MAX_UNICAST_SOLICIT), |
| 101 |
MakeIntegerChecker<uint8_t> ()) |
| 102 |
.AddAttribute ("MAX_ANYCAST_DELAY_TIME", "Neighbor Discovery node constants : max anycast delay.", |
| 103 |
IntegerValue (1), |
| 104 |
MakeIntegerAccessor (&Icmpv6L4Protocol::MAX_ANYCAST_DELAY_TIME), |
| 105 |
MakeIntegerChecker<uint8_t> ()) |
| 106 |
.AddAttribute ("MAX_NEIGHBOR_ADVERTISEMENT", "Neighbor Discovery node constants : max NA transmission.", |
| 107 |
IntegerValue (3), |
| 108 |
MakeIntegerAccessor (&Icmpv6L4Protocol::MAX_NEIGHBOR_ADVERTISEMENT), |
| 109 |
MakeIntegerChecker<uint8_t> ()) |
| 110 |
.AddAttribute ("REACHABLE_TIME", "Neighbor Discovery node constants : reachable time.", |
| 111 |
IntegerValue (30000), |
| 112 |
MakeIntegerAccessor (&Icmpv6L4Protocol::REACHABLE_TIME), |
| 113 |
MakeIntegerChecker<uint32_t> ()) |
| 114 |
.AddAttribute ("RETRANS_TIMER", "Neighbor Discovery node constants : retransmission timer.", |
| 115 |
IntegerValue (1000), |
| 116 |
MakeIntegerAccessor (&Icmpv6L4Protocol::RETRANS_TIMER), |
| 117 |
MakeIntegerChecker<uint32_t> ()) |
| 118 |
.AddAttribute ("DELAY_FIRST_PROBE_TIME", "Neighbor Discovery node constants : delay for the first probe.", |
| 119 |
IntegerValue (5), |
| 120 |
MakeIntegerAccessor (&Icmpv6L4Protocol::DELAY_FIRST_PROBE_TIME), |
| 121 |
MakeIntegerChecker<uint8_t> ()) |
| 122 |
.AddAttribute ("MIN_RANDOM_FACTOR", "Neighbor Discovery node constants : min random factor.", |
| 123 |
DoubleValue (0.5), |
| 124 |
MakeDoubleAccessor (&Icmpv6L4Protocol::MIN_RANDOM_FACTOR), |
| 125 |
MakeDoubleChecker<double> ()) |
| 126 |
.AddAttribute ("MAX_RANDOM_FACTOR", "Neighbor Discovery node constants : max random factor.", |
| 127 |
DoubleValue (1.5), |
| 128 |
MakeDoubleAccessor (&Icmpv6L4Protocol::MAX_RANDOM_FACTOR), |
| 129 |
MakeDoubleChecker<double> ()) |
| 82 |
; |
130 |
; |
| 83 |
return tid; |
131 |
return tid; |
| 84 |
} |
132 |
} |