|
The Pedigree Project 0.1
|
Inheritance diagram for LwipSocketSyscalls:
Collaboration diagram for LwipSocketSyscalls:Classes | |
| struct | LwipMetadata |
Public Member Functions | |
| LwipSocketSyscalls (int domain, int type, int protocol) | |
| virtual bool | create () |
| Implementation-specific final socket creation logic. | |
| virtual int | connect (const struct sockaddr_storage *address, socklen_t addrlen) |
| virtual ssize_t | sendto_msg (const struct msghdr *msghdr, const SharedPointer< SocketRights > &rights) |
| virtual ssize_t | recvfrom_msg (struct msghdr *msghdr, SharedPointer< SocketRights > *rights) |
| virtual int | listen (int backlog) |
| virtual int | bind (const struct sockaddr_storage *address, socklen_t addrlen) |
| virtual int | accept (struct sockaddr_storage *address, socklen_t *addrlen, int flags, DescriptorLease *accepted=nullptr) |
| virtual int | shutdown (int how) |
| virtual int | getpeername (struct sockaddr_storage *address, socklen_t *address_len) |
| virtual int | getsockname (struct sockaddr_storage *address, socklen_t *address_len) |
| virtual int | setsockopt (int level, int optname, const void *optvalue, socklen_t optlen) |
| virtual int | getsockopt (int level, int optname, void *optvalue, socklen_t *optlen) |
| virtual bool | canPoll () const |
| virtual bool | poll (bool &read, bool &write, bool &error, Semaphore *waiter) |
| virtual void | unPoll (Semaphore *waiter) |
| virtual ReadyMask | queryReady (bool reading, bool writing) |
| ReadinessGenerations | readinessGenerations () override |
| virtual void | lastDescriptorClosed () |
| virtual void | setBlocking (bool blocking) |
Public Member Functions inherited from NetworkSyscalls | |
| NetworkSyscalls (int domain, int type, int protocol) | |
| virtual MqueueNetlinkSocket * | asMqueueNetlink () |
| virtual ssize_t | sendto (const void *buffer, size_t bufferlen, int flags, const struct sockaddr_storage *address, socklen_t addrlen) |
| virtual ssize_t | recvfrom (void *buffer, size_t bufferlen, int flags, struct sockaddr_storage *address, socklen_t *addrlen) |
| ReadinessGenerations | readinessGenerations () override |
| MUST_USE_RESULT bool | addDescriptorOwner () |
| void | removeDescriptorOwner () |
| void | retainDescriptorLifetime (const SharedPointer< NetworkSyscalls > &lifetime) |
| virtual bool | monitor (Thread *pThread, Event *pEvent) |
| virtual bool | unmonitor (Event *pEvent) |
| void | associate (FileDescriptor *fd) |
| int | getDomain () const |
| int | getType () const |
| int | getProtocol () const |
| const NetworkNamespaceRef & | networkNamespace () const |
| bool | isBlocking () const |
| int | takeReceiveError () |
| void | deferReceiveError (int error) |
Public Member Functions inherited from ReadinessSource | |
| MUST_USE_RESULT bool | subscribeReadiness (ReadyMask interest, const SharedPointer< ReadinessObserver > &observer, ReadinessSubscription &subscription) |
Private Member Functions | |
| void | registerSocket () |
| ReadyMask | readinessLevelLocked () const |
| void | recordReadinessRisesLocked (ReadyMask previous) |
Static Private Member Functions | |
| static void | netconnCallback (struct netconn *conn, enum netconn_evt evt, uint16_t len) |
| static void | lwipToSyscallError (err_t err) |
Private Attributes | |
| struct netconn * | m_Socket |
| Mutex | m_ReceiveLock |
| struct LwipSocketSyscalls::LwipMetadata | m_Metadata |
Static Private Attributes | |
| static Tree< struct netconn *, LwipSocketSyscalls * > | m_SyscallObjects |
| static Mutex | m_SyscallObjectsLock |
Additional Inherited Members | |
Protected Member Functions inherited from NetworkSyscalls | |
| virtual bool | usesLocalEndpointLifetime () const |
| ReadyMask | pendingReceiveReadiness () const |
| ReadinessGenerations | withReceiveErrorGeneration (ReadinessGenerations generations) const |
| bool | beginDescriptorClose () |
| bool | hasLastDescriptorClosed () const |
| SharedPointer< NetworkSyscalls > | acquireDescriptorLifetime () const |
| SharedPointer< NetworkSyscalls > | releaseDescriptorLifetime () |
Protected Member Functions inherited from ReadinessSource | |
| void | notifyReadiness (ReadyMask mask) |
| void | closeReadiness (ReadyMask mask=ReadyInvalid|ReadyHangup) |
Protected Attributes inherited from NetworkSyscalls | |
| int | m_Domain |
| int | m_Type |
| int | m_Protocol |
| NetworkNamespaceRef | m_NetworkNamespace |
| Atomic< bool > | m_Blocking |
| Mutex | m_ReceiveErrorLock |
| int | m_ReceiveError = 0 |
| uint64_t | m_ReceiveErrorGeneration = 0 |
| OperationBarrier | m_ReadinessNotifications |
Definition at line 207 of file net-syscalls.h.
| LwipSocketSyscalls::LwipSocketSyscalls | ( | int | domain, |
| int | type, | ||
| int | protocol | ||
| ) |
Definition at line 1703 of file net-syscalls.cc.
|
virtual |
Definition at line 1706 of file net-syscalls.cc.
|
virtual |
Implements NetworkSyscalls.
Definition at line 2325 of file net-syscalls.cc.
References create(), ERR_OK, and FileDescriptor::setNetworkImpl().
|
virtual |
Implements NetworkSyscalls.
Definition at line 2306 of file net-syscalls.cc.
|
virtual |
Reimplemented from NetworkSyscalls.
Definition at line 2578 of file net-syscalls.cc.
|
virtual |
Implements NetworkSyscalls.
Definition at line 1861 of file net-syscalls.cc.
|
virtual |
Implementation-specific final socket creation logic.
Reimplemented from NetworkSyscalls.
Definition at line 1792 of file net-syscalls.cc.
References netconnCallback().
Referenced by accept().
Here is the caller graph for this function:
|
virtual |
Implements NetworkSyscalls.
Definition at line 2420 of file net-syscalls.cc.
References ERR_OK.
|
virtual |
Implements NetworkSyscalls.
Definition at line 2440 of file net-syscalls.cc.
References ERR_OK.
|
virtual |
Implements NetworkSyscalls.
Definition at line 2519 of file net-syscalls.cc.
|
virtual |
Retire the transport after the final descriptor alias closes.
Readiness users may retain this wrapper after the transport is gone, so implementations leave queryReady() returning a stable terminal state.
Reimplemented from NetworkSyscalls.
Definition at line 1710 of file net-syscalls.cc.
References NetworkSyscalls::beginDescriptorClose(), OperationBarrier::closeAndWait(), ReadinessSource::closeReadiness(), NetworkSyscalls::m_ReadinessNotifications, pbuf_free(), and Tree< K, E >::remove().
|
virtual |
Implements NetworkSyscalls.
Definition at line 2290 of file net-syscalls.cc.
|
staticprivate |
Definition at line 2783 of file net-syscalls.cc.
|
staticprivate |
Definition at line 2702 of file net-syscalls.cc.
References EMIT_IF, ERR_IF, ERR_OK, Tree< K, E >::lookup(), NetworkSyscalls::m_ReadinessNotifications, ReadinessSource::notifyReadiness(), and OperationBarrier::tryAcquire().
Referenced by create().
Here is the caller graph for this function:
|
virtual |
Reimplemented from NetworkSyscalls.
Definition at line 2656 of file net-syscalls.cc.
References ERR_OK, and List< T, nodePoolSize >::pushBack().
|
virtual |
Return a level-triggered snapshot for the requested I/O directions.
Reimplemented from NetworkSyscalls.
Definition at line 2623 of file net-syscalls.cc.
References NetworkSyscalls::m_ReadinessNotifications, and OperationBarrier::tryAcquire().
|
overridevirtual |
Return source-serialized rising-edge sequences where available.
A source increments the corresponding sequence while holding the same lock which changes its readiness predicate. Consumers can then recover a drain/refill transition even if the two callback deliveries are reordered.
Reimplemented from ReadinessSource.
Definition at line 2646 of file net-syscalls.cc.
References NetworkSyscalls::m_ReadinessNotifications, and OperationBarrier::tryAcquire().
|
private |
Definition at line 2582 of file net-syscalls.cc.
|
private |
Definition at line 2604 of file net-syscalls.cc.
|
virtual |
Implements NetworkSyscalls.
Definition at line 2045 of file net-syscalls.cc.
|
private |
Definition at line 1771 of file net-syscalls.cc.
|
virtual |
Implements NetworkSyscalls.
Definition at line 1899 of file net-syscalls.cc.
|
virtual |
Reimplemented from NetworkSyscalls.
Definition at line 1764 of file net-syscalls.cc.
|
virtual |
Implements NetworkSyscalls.
Definition at line 2459 of file net-syscalls.cc.
|
virtual |
Reimplemented from NetworkSyscalls.
Definition at line 2378 of file net-syscalls.cc.
|
virtual |
Reimplemented from NetworkSyscalls.
Definition at line 2690 of file net-syscalls.cc.
|
private |
Definition at line 253 of file net-syscalls.h.
|
private |
Definition at line 252 of file net-syscalls.h.
|
staticprivate |
Definition at line 243 of file net-syscalls.h.
|
staticprivate |
Definition at line 244 of file net-syscalls.h.