30 : m_ephemeral (49152),
53 if ((*i)->GetLocalPort () ==
port)
66 if ((*i)->GetLocalPort () == port
67 && (*i)->GetLocalAddress () == addr)
129 NS_LOG_FUNCTION (
this << localAddress << localPort << peerAddress << peerPort);
132 if ((*i)->GetLocalPort () == localPort
133 && (*i)->GetLocalAddress () == localAddress
134 && (*i)->GetPeerPort () == peerPort
135 && (*i)->GetPeerAddress () == peerAddress)
137 NS_LOG_WARN (
"No way we can allocate this end-point.");
143 endPoint->
SetPeer (peerAddress, peerPort);
174 NS_LOG_FUNCTION (
this << daddr << dport << saddr << sport << incomingInterface);
181 NS_LOG_DEBUG (
"Looking up endpoint for destination address " << daddr);
192 <<
" because endpoint dport "
194 <<
" does not match packet dport " << dport);
206 if (!(localAddressMatchesExact || localAddressMatchesWildCard))
210 bool remotePeerMatchesExact = endP->
GetPeerPort () == sport;
211 bool remotePeerMatchesWildCard = endP->
GetPeerPort () == 0;
212 bool remoteAddressMatchesExact = endP->
GetPeerAddress () == saddr;
217 if (!(remotePeerMatchesExact || remotePeerMatchesWildCard))
221 if (!(remoteAddressMatchesExact || remoteAddressMatchesWildCard))
227 if (localAddressMatchesWildCard
228 && remotePeerMatchesWildCard
229 && remoteAddressMatchesWildCard)
231 retval1.push_back (endP);
233 if ((localAddressMatchesExact || (localAddressMatchesAllRouters))
234 && remotePeerMatchesWildCard
235 && remoteAddressMatchesWildCard)
237 retval2.push_back (endP);
239 if (localAddressMatchesWildCard
240 && remotePeerMatchesExact
241 && remoteAddressMatchesExact)
243 retval3.push_back (endP);
245 if (localAddressMatchesExact
246 && remotePeerMatchesExact
247 && remoteAddressMatchesExact)
249 retval4.push_back (endP);
254 if (!retval4.empty ())
258 if (!retval3.empty ())
262 if (!retval2.empty ())
271 uint32_t genericity = 3;
278 if ((*i)->GetLocalPort () != dport)
283 if ((*i)->GetLocalAddress () == dst && (*i)->GetPeerPort () == sport
284 && (*i)->GetPeerAddress () == src)
300 if (tmp < genericity)