|
|
| 136 |
|
136 |
|
| 137 |
if (!m_rxCallback.IsNull ()) |
137 |
if (!m_rxCallback.IsNull ()) |
| 138 |
{ |
138 |
{ |
| 139 |
Simulator::ScheduleNow (&Ipv4EndPoint::DoForwardUp, this, p, header, sport, |
|
|
| 140 |
incomingInterface); |
| 141 |
} |
| 142 |
} |
| 143 |
|
| 144 |
void |
| 145 |
Ipv4EndPoint::DoForwardUp (Ptr<Packet> p, const Ipv4Header& header, uint16_t sport, |
| 146 |
Ptr<Ipv4Interface> incomingInterface) |
| 147 |
{ |
| 148 |
NS_LOG_FUNCTION (this << p << &header << sport << incomingInterface); |
| 149 |
|
| 150 |
if (!m_rxCallback.IsNull ()) |
| 151 |
{ |
| 152 |
m_rxCallback (p, header, sport, incomingInterface); |
139 |
m_rxCallback (p, header, sport, incomingInterface); |
| 153 |
} |
140 |
} |
| 154 |
} |
141 |
} |
|
|
| 162 |
(uint32_t)icmpCode << icmpInfo); |
149 |
(uint32_t)icmpCode << icmpInfo); |
| 163 |
if (!m_icmpCallback.IsNull ()) |
150 |
if (!m_icmpCallback.IsNull ()) |
| 164 |
{ |
151 |
{ |
| 165 |
Simulator::ScheduleNow (&Ipv4EndPoint::DoForwardIcmp, this, |
152 |
m_icmpCallback (icmpSource, icmpTtl, icmpType, icmpCode, icmpInfo); |
| 166 |
icmpSource, icmpTtl, icmpType, icmpCode, icmpInfo); |
|
|
| 167 |
} |
| 168 |
} |
| 169 |
|
| 170 |
void |
| 171 |
Ipv4EndPoint::DoForwardIcmp (Ipv4Address icmpSource, uint8_t icmpTtl, |
| 172 |
uint8_t icmpType, uint8_t icmpCode, |
| 173 |
uint32_t icmpInfo) |
| 174 |
{ |
| 175 |
NS_LOG_FUNCTION (this << icmpSource << static_cast<uint32_t> (icmpTtl) << static_cast<uint32_t> (icmpType) << static_cast<uint32_t> (icmpCode) << icmpInfo); |
| 176 |
|
| 177 |
if (!m_icmpCallback.IsNull ()) |
| 178 |
{ |
| 179 |
m_icmpCallback (icmpSource,icmpTtl,icmpType,icmpCode,icmpInfo); |
| 180 |
} |
153 |
} |
| 181 |
} |
154 |
} |
| 182 |
|
155 |
|