LEFT | RIGHT |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2007 Georgia Tech Research Corporation | 3 * Copyright (c) 2007 Georgia Tech Research Corporation |
4 * Copyright (c) 2010 Adrian Sai-wah Tam | 4 * Copyright (c) 2010 Adrian Sai-wah Tam |
5 * | 5 * |
6 * This program is free software; you can redistribute it and/or modify | 6 * This program is free software; you can redistribute it and/or modify |
7 * it under the terms of the GNU General Public License version 2 as | 7 * it under the terms of the GNU General Public License version 2 as |
8 * published by the Free Software Foundation; | 8 * published by the Free Software Foundation; |
9 * | 9 * |
10 * This program is distributed in the hope that it will be useful, | 10 * This program is distributed in the hope that it will be useful, |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 } | 385 } |
386 m_endPoint6->SetPeer (v6Addr, transport.GetPort ()); | 386 m_endPoint6->SetPeer (v6Addr, transport.GetPort ()); |
387 m_endPoint = 0; | 387 m_endPoint = 0; |
388 | 388 |
389 // Get the appropriate local address and port number from the routing prot
ocol and set up endpoint | 389 // Get the appropriate local address and port number from the routing prot
ocol and set up endpoint |
390 if (SetupEndpoint6 () != 0) | 390 if (SetupEndpoint6 () != 0) |
391 { // Route to destination does not exist | 391 { // Route to destination does not exist |
392 return -1; | 392 return -1; |
393 } | 393 } |
394 } | 394 } |
| 395 else |
| 396 { |
| 397 m_errno = ERROR_INVAL; |
| 398 return -1; |
| 399 } |
395 | 400 |
396 // Re-initialize parameters in case this socket is being reused after CLOSE | 401 // Re-initialize parameters in case this socket is being reused after CLOSE |
397 m_rtt->Reset (); | 402 m_rtt->Reset (); |
398 m_cnCount = m_cnRetries; | 403 m_cnCount = m_cnRetries; |
399 | 404 |
400 // DoConnect() will do state-checking and send a SYN packet | 405 // DoConnect() will do state-checking and send a SYN packet |
401 return DoConnect (); | 406 return DoConnect (); |
402 } | 407 } |
403 | 408 |
404 /** Inherit from Socket class: Listen on the endpoint for an incoming connection
*/ | 409 /** Inherit from Socket class: Listen on the endpoint for an incoming connection
*/ |
(...skipping 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2223 { | 2228 { |
2224 } | 2229 } |
2225 | 2230 |
2226 /** Placeholder function for future extension that changes the TCP header */ | 2231 /** Placeholder function for future extension that changes the TCP header */ |
2227 void | 2232 void |
2228 TcpSocketBase::AddOptions (TcpHeader&) | 2233 TcpSocketBase::AddOptions (TcpHeader&) |
2229 { | 2234 { |
2230 } | 2235 } |
2231 | 2236 |
2232 } // namespace ns3 | 2237 } // namespace ns3 |
LEFT | RIGHT |