|
|
| 658 |
NS_LOG_FUNCTION (this << address); |
658 |
NS_LOG_FUNCTION (this << address); |
| 659 |
|
659 |
|
| 660 |
// If haven't do so, Bind() this socket first |
660 |
// If haven't do so, Bind() this socket first |
| 661 |
if (InetSocketAddress::IsMatchingType (address) && m_endPoint6 == 0) |
661 |
if (InetSocketAddress::IsMatchingType (address)) |
| 662 |
{ |
662 |
{ |
| 663 |
if (m_endPoint == 0) |
663 |
if (m_endPoint == 0) |
| 664 |
{ |
664 |
{ |
|
|
| 681 |
return -1; |
681 |
return -1; |
| 682 |
} |
682 |
} |
| 683 |
} |
683 |
} |
| 684 |
else if (Inet6SocketAddress::IsMatchingType (address) && m_endPoint == 0) |
684 |
else if (Inet6SocketAddress::IsMatchingType (address)) |
| 685 |
{ |
685 |
{ |
| 686 |
// If we are operating on a v4-mapped address, translate the address to |
686 |
// If we are operating on a v4-mapped address, translate the address to |
| 687 |
// a v4 address and re-call this function |
687 |
// a v4 address and re-call this function |
|
|
| 707 |
|
707 |
|
| 708 |
// Get the appropriate local address and port number from the routing protocol and set up endpoint |
708 |
// Get the appropriate local address and port number from the routing protocol and set up endpoint |
| 709 |
if (SetupEndpoint6 () != 0) |
709 |
if (SetupEndpoint6 () != 0) |
| 710 |
{ // Route to destination does not exist |
710 |
{ |
|
|
711 |
NS_LOG_ERROR ("Route to destination does not exist ?!"); |
| 711 |
return -1; |
712 |
return -1; |
| 712 |
} |
713 |
} |
| 713 |
} |
714 |
} |