#include <linux-socket-impl.h>
 Collaboration diagram for ns3::LinuxSocketImpl:Public Types | |
| typedef Callback< int, const  Address &, struct sockaddr *, socklen_t * >  | Ns3ToPosixConverter | 
| typedef Callback< Address,  const struct sockaddr *, socklen_t >  | PosixToNs3Converter | 
Public Member Functions | |
| LinuxSocketImpl () | |
| virtual | ~LinuxSocketImpl () | 
| virtual int | Bind (void) | 
| virtual int | Bind (const Address &address) | 
| virtual int | Bind6 (void) | 
| virtual void | BindToNetDevice (Ptr< NetDevice > netdevice) | 
| virtual int | Close (void) | 
| virtual int | Connect (const Address &address) | 
| void | CreateSocket () | 
| virtual bool | GetAllowBroadcast () const | 
| virtual enum SocketErrno | GetErrno (void) const | 
| virtual Ptr< Node > | GetNode (void) const | 
| virtual uint32_t | GetRxAvailable (void) const | 
| virtual enum SocketType | GetSocketType (void) const | 
| virtual int | GetSockName (Address &address) const | 
| virtual uint32_t | GetTxAvailable (void) const | 
| virtual int | Listen (void) | 
| virtual int | MulticastJoinGroup (uint32_t interfaceIndex, const Address &groupAddress) | 
| virtual int | MulticastLeaveGroup (uint32_t interfaceIndex, const Address &groupAddress) | 
| int | Ns3AddressToPosixAddress (const Address &nsaddr, struct sockaddr *addr, socklen_t *addrlen) | 
| void | Poll () | 
| Address | PosixAddressToNs3Address (const struct sockaddr *my_addr, socklen_t addrlen) | 
| virtual Ptr< Packet > | Recv (uint32_t maxSize, uint32_t flags) | 
| virtual Ptr< Packet > | RecvFrom (uint32_t maxSize, uint32_t flags, Address &fromAddress) | 
| virtual int | Send (Ptr< Packet > p, uint32_t flags) | 
| virtual int | SendTo (Ptr< Packet > p, uint32_t flags, const Address &address) | 
| virtual bool | SetAllowBroadcast (bool allowBroadcast) | 
| virtual void | SetNode (Ptr< Node > node) | 
| void | SetNs3ToPosixConverter (LinuxSocketImpl::Ns3ToPosixConverter cb) | 
| void | SetPosixToNs3Converter (LinuxSocketImpl::PosixToNs3Converter cb) | 
| virtual int | ShutdownRecv (void) | 
| virtual int | ShutdownSend (void) | 
Static Public Member Functions | |
| static TypeId | GetTypeId (void) | 
Public Attributes | |
| LinuxSocketFd * | m_kernsock | 
| Ns3ToPosixConverter | m_ns3toposix | 
| PosixToNs3Converter | m_posixtons3 | 
| Task * | m_task | 
Private Member Functions | |
| uint16_t | EnterFakeTask () | 
| virtual int32_t | GetIpMulticastIf (void) const | 
| virtual bool | GetIpMulticastLoop (void) const | 
| virtual uint8_t | GetIpMulticastTtl (void) const | 
| virtual uint8_t | GetIpTtl (void) const | 
| virtual bool | GetMtuDiscover (void) const | 
| virtual uint32_t | GetRcvBufSize (void) const | 
| void | LeaveFakeTask (uint16_t pid) | 
| void | ScheduleTask (EventImpl *event) | 
| virtual void | SetIpMulticastIf (int32_t ipIf) | 
| virtual void | SetIpMulticastLoop (bool loop) | 
| virtual void | SetIpMulticastTtl (uint8_t ipTtl) | 
| virtual void | SetIpTtl (uint8_t ipTtl) | 
| virtual void | SetMtuDiscover (bool discover) | 
| virtual void | SetRcvBufSize (uint32_t size) | 
Static Private Member Functions | |
| static void | ScheduleTaskTrampoline (void *context) | 
Private Attributes | |
| bool | m_conn_inprogress | 
| enum SocketErrno | m_errno | 
| uint16_t | m_family | 
| bool | m_listening | 
| Ptr< Node > | m_node | 
| uint16_t | m_pid | 
| EventId | m_poll | 
| uint16_t | m_protocol | 
| uint16_t | m_socktype | 
Definition at line 34 of file linux-socket-impl.h.
| typedef Callback<int,const Address&,struct sockaddr *,socklen_t *> ns3::LinuxSocketImpl::Ns3ToPosixConverter | 
Definition at line 76 of file linux-socket-impl.h.
| typedef Callback<Address,const struct sockaddr *,socklen_t> ns3::LinuxSocketImpl::PosixToNs3Converter | 
Definition at line 77 of file linux-socket-impl.h.
| ns3::LinuxSocketImpl::LinuxSocketImpl | ( | ) | 
Create an unbound udp socket.
Definition at line 141 of file linux-socket-impl.cc.
References m_conn_inprogress, m_listening, m_pid, Ns3AddressToPosixAddress(), PosixAddressToNs3Address(), SetNs3ToPosixConverter(), and SetPosixToNs3Converter().
 Here is the call graph for this function:
      
  | 
  virtual | 
Definition at line 151 of file linux-socket-impl.cc.
References GetNode(), and m_poll.
 Here is the call graph for this function:
      
  | 
  virtual | 
Definition at line 252 of file linux-socket-impl.cc.
References ns3::LinuxSocketFd::Bind(), EnterFakeTask(), LeaveFakeTask(), and m_kernsock.
 Here is the call graph for this function:
      
  | 
  virtual | 
Definition at line 272 of file linux-socket-impl.cc.
References ns3::LinuxSocketFd::Bind(), EnterFakeTask(), LeaveFakeTask(), m_kernsock, and m_ns3toposix.
 Here is the call graph for this function:
      
  | 
  virtual | 
Definition at line 262 of file linux-socket-impl.cc.
References ns3::LinuxSocketFd::Bind(), EnterFakeTask(), LeaveFakeTask(), and m_kernsock.
 Here is the call graph for this function:
      
  | 
  virtual | 
Definition at line 500 of file linux-socket-impl.cc.
References ns3::Current(), EnterFakeTask(), LeaveFakeTask(), m_kernsock, and ns3::LinuxSocketFd::Setsockopt().
 Here is the call graph for this function:
      
  | 
  virtual | 
Definition at line 300 of file linux-socket-impl.cc.
References ns3::LinuxSocketFd::Close(), EnterFakeTask(), LeaveFakeTask(), and m_kernsock.
 Here is the call graph for this function:
      
  | 
  virtual | 
Definition at line 310 of file linux-socket-impl.cc.
References ns3::LinuxSocketFd::Connect(), ns3::Current(), EnterFakeTask(), LeaveFakeTask(), m_conn_inprogress, m_kernsock, and m_ns3toposix.
 Here is the call graph for this function:| void ns3::LinuxSocketImpl::CreateSocket | ( | void | ) | 
Definition at line 659 of file linux-socket-impl.cc.
References EnterFakeTask(), LeaveFakeTask(), m_family, m_kernsock, m_node, m_protocol, m_socktype, Poll(), and ScheduleTask().
 Here is the call graph for this function:
      
  | 
  private | 
Definition at line 224 of file linux-socket-impl.cc.
References GetNode(), and m_pid.
Referenced by Bind(), Bind6(), BindToNetDevice(), Close(), Connect(), CreateSocket(), Listen(), Poll(), RecvFrom(), Send(), and SendTo().
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  virtual | 
Definition at line 755 of file linux-socket-impl.cc.
      
  | 
  virtual | 
Definition at line 191 of file linux-socket-impl.cc.
References m_errno.
      
  | 
  privatevirtual | 
Definition at line 721 of file linux-socket-impl.cc.
      
  | 
  privatevirtual | 
Definition at line 732 of file linux-socket-impl.cc.
      
  | 
  privatevirtual | 
Definition at line 710 of file linux-socket-impl.cc.
      
  | 
  privatevirtual | 
Definition at line 699 of file linux-socket-impl.cc.
      
  | 
  privatevirtual | 
Definition at line 743 of file linux-socket-impl.cc.
      
  | 
  virtual | 
Definition at line 637 of file linux-socket-impl.cc.
References m_node.
Referenced by EnterFakeTask(), LeaveFakeTask(), Poll(), ScheduleTask(), and ~LinuxSocketImpl().
 Here is the caller graph for this function:
      
  | 
  privatevirtual | 
Definition at line 688 of file linux-socket-impl.cc.
      
  | 
  virtual | 
Definition at line 407 of file linux-socket-impl.cc.
      
  | 
  virtual | 
Definition at line 198 of file linux-socket-impl.cc.
References m_socktype.
      
  | 
  virtual | 
Definition at line 465 of file linux-socket-impl.cc.
      
  | 
  virtual | 
Definition at line 366 of file linux-socket-impl.cc.
      
  | 
  static | 
Definition at line 120 of file linux-socket-impl.cc.
References m_family, m_protocol, and m_socktype.
      
  | 
  private | 
Definition at line 241 of file linux-socket-impl.cc.
References GetNode(), m_pid, and ns3::DceManager::SuspendTemporaryTask().
Referenced by Bind(), Bind6(), BindToNetDevice(), Close(), Connect(), CreateSocket(), Listen(), Poll(), RecvFrom(), Send(), and SendTo().
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  virtual | 
Definition at line 329 of file linux-socket-impl.cc.
References ns3::Current(), EnterFakeTask(), LeaveFakeTask(), ns3::LinuxSocketFd::Listen(), m_kernsock, and m_listening.
 Here is the call graph for this function:
      
  | 
  virtual | 
Definition at line 472 of file linux-socket-impl.cc.
      
  | 
  virtual | 
Definition at line 486 of file linux-socket-impl.cc.
| int ns3::LinuxSocketImpl::Ns3AddressToPosixAddress | ( | const Address & | nsaddr, | 
| struct sockaddr * | addr, | ||
| socklen_t * | addrlen | ||
| ) | 
Definition at line 77 of file linux-socket-impl.cc.
Referenced by LinuxSocketImpl().
 Here is the caller graph for this function:| void ns3::LinuxSocketImpl::Poll | ( | ) | 
Definition at line 517 of file linux-socket-impl.cc.
References ns3::LinuxSocketFd::Accept(), ns3::Current(), EnterFakeTask(), ns3::LinuxSocketFd::Fcntl(), ns3::FileUsage::GetFileInc(), GetNode(), ns3::UnixFd::IncFdCount(), LeaveFakeTask(), m_conn_inprogress, m_family, m_kernsock, m_listening, m_node, m_posixtons3, m_protocol, m_socktype, ns3::Process::manager, ns3::Process::openFiles, ns3::LinuxSocketFd::Poll(), ns3::Thread::process, ScheduleTask(), ns3::PollTable::SetEventMask(), ns3::DceManager::Wait(), and ns3::WaitPoint::Wait().
Referenced by CreateSocket().
 Here is the call graph for this function:
 Here is the caller graph for this function:| Address ns3::LinuxSocketImpl::PosixAddressToNs3Address | ( | const struct sockaddr * | my_addr, | 
| socklen_t | addrlen | ||
| ) | 
Definition at line 49 of file linux-socket-impl.cc.
Referenced by LinuxSocketImpl().
 Here is the caller graph for this function:
      
  | 
  virtual | 
Definition at line 416 of file linux-socket-impl.cc.
      
  | 
  virtual | 
Definition at line 423 of file linux-socket-impl.cc.
References ns3::Current(), EnterFakeTask(), ns3::LinuxSocketFd::Getpeername(), LeaveFakeTask(), m_kernsock, m_posixtons3, and ns3::LinuxSocketFd::Recvmsg().
 Here is the call graph for this function:
      
  | 
  private | 
Definition at line 174 of file linux-socket-impl.cc.
References ns3::Current(), GetNode(), ScheduleTaskTrampoline(), ns3::Task::SetContext(), ns3::Task::SetExtraContext(), and ns3::Thread::task.
Referenced by CreateSocket(), and Poll().
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  staticprivate | 
Definition at line 162 of file linux-socket-impl.cc.
References ns3::Current(), ns3::Task::GetExtraContext(), and ns3::Task::SetExtraContext().
Referenced by ScheduleTask().
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  virtual | 
Definition at line 344 of file linux-socket-impl.cc.
References ns3::Current(), EnterFakeTask(), LeaveFakeTask(), m_kernsock, and ns3::LinuxSocketFd::Write().
 Here is the call graph for this function:
      
  | 
  virtual | 
Definition at line 375 of file linux-socket-impl.cc.
References ns3::Current(), EnterFakeTask(), LeaveFakeTask(), m_kernsock, m_ns3toposix, and ns3::LinuxSocketFd::Sendmsg().
 Here is the call graph for this function:
      
  | 
  virtual | 
Definition at line 749 of file linux-socket-impl.cc.
      
  | 
  privatevirtual | 
Definition at line 716 of file linux-socket-impl.cc.
      
  | 
  privatevirtual | 
Definition at line 727 of file linux-socket-impl.cc.
      
  | 
  privatevirtual | 
Definition at line 705 of file linux-socket-impl.cc.
      
  | 
  privatevirtual | 
Definition at line 694 of file linux-socket-impl.cc.
      
  | 
  privatevirtual | 
Definition at line 738 of file linux-socket-impl.cc.
      
  | 
  virtual | 
Definition at line 629 of file linux-socket-impl.cc.
References m_node.
| void ns3::LinuxSocketImpl::SetNs3ToPosixConverter | ( | LinuxSocketImpl::Ns3ToPosixConverter | cb | ) | 
Definition at line 643 of file linux-socket-impl.cc.
References m_ns3toposix.
Referenced by LinuxSocketImpl().
 Here is the caller graph for this function:| void ns3::LinuxSocketImpl::SetPosixToNs3Converter | ( | LinuxSocketImpl::PosixToNs3Converter | cb | ) | 
Definition at line 651 of file linux-socket-impl.cc.
References m_posixtons3.
Referenced by LinuxSocketImpl().
 Here is the caller graph for this function:
      
  | 
  privatevirtual | 
Definition at line 683 of file linux-socket-impl.cc.
      
  | 
  virtual | 
Definition at line 293 of file linux-socket-impl.cc.
      
  | 
  virtual | 
Definition at line 286 of file linux-socket-impl.cc.
      
  | 
  private | 
Definition at line 112 of file linux-socket-impl.h.
Referenced by Connect(), LinuxSocketImpl(), and Poll().
      
  | 
  private | 
Definition at line 106 of file linux-socket-impl.h.
Referenced by GetErrno().
      
  | 
  private | 
Definition at line 108 of file linux-socket-impl.h.
Referenced by CreateSocket(), GetTypeId(), and Poll().
| LinuxSocketFd* ns3::LinuxSocketImpl::m_kernsock | 
Definition at line 82 of file linux-socket-impl.h.
Referenced by Bind(), Bind6(), BindToNetDevice(), Close(), Connect(), CreateSocket(), Listen(), Poll(), RecvFrom(), Send(), and SendTo().
      
  | 
  private | 
Definition at line 111 of file linux-socket-impl.h.
Referenced by LinuxSocketImpl(), Listen(), and Poll().
      
  | 
  private | 
Definition at line 107 of file linux-socket-impl.h.
Referenced by CreateSocket(), GetNode(), Poll(), and SetNode().
| Ns3ToPosixConverter ns3::LinuxSocketImpl::m_ns3toposix | 
Definition at line 84 of file linux-socket-impl.h.
Referenced by Bind(), Connect(), SendTo(), and SetNs3ToPosixConverter().
      
  | 
  private | 
Definition at line 113 of file linux-socket-impl.h.
Referenced by EnterFakeTask(), LeaveFakeTask(), and LinuxSocketImpl().
      
  | 
  private | 
Definition at line 114 of file linux-socket-impl.h.
Referenced by ~LinuxSocketImpl().
| PosixToNs3Converter ns3::LinuxSocketImpl::m_posixtons3 | 
Definition at line 85 of file linux-socket-impl.h.
Referenced by Poll(), RecvFrom(), and SetPosixToNs3Converter().
      
  | 
  private | 
Definition at line 110 of file linux-socket-impl.h.
Referenced by CreateSocket(), GetTypeId(), and Poll().
      
  | 
  private | 
Definition at line 109 of file linux-socket-impl.h.
Referenced by CreateSocket(), GetSocketType(), GetTypeId(), and Poll().
| Task* ns3::LinuxSocketImpl::m_task | 
Definition at line 83 of file linux-socket-impl.h.