|
The Pedigree Project 0.1
|
Inheritance diagram for NetworkSyscalls:
Collaboration diagram for NetworkSyscalls:Public Member Functions | |
| NetworkSyscalls (int domain, int type, int protocol) | |
| virtual MqueueNetlinkSocket * | asMqueueNetlink () |
| virtual bool | create () |
| virtual int | connect (const struct sockaddr_storage *address, socklen_t addrlen)=0 |
| virtual ssize_t | sendto_msg (const struct msghdr *msghdr, const SharedPointer< SocketRights > &rights)=0 |
| virtual ssize_t | recvfrom_msg (struct msghdr *msghdr, SharedPointer< SocketRights > *rights)=0 |
| 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) |
| virtual int | listen (int backlog)=0 |
| virtual int | bind (const struct sockaddr_storage *address, socklen_t addrlen)=0 |
| virtual int | accept (struct sockaddr_storage *address, socklen_t *addrlen, int flags, DescriptorLease *accepted=nullptr)=0 |
| virtual int | shutdown (int how) |
| virtual int | getpeername (struct sockaddr_storage *address, socklen_t *address_len)=0 |
| virtual int | getsockname (struct sockaddr_storage *address, socklen_t *address_len)=0 |
| virtual int | setsockopt (int level, int optname, const void *optvalue, socklen_t optlen)=0 |
| virtual int | getsockopt (int level, int optname, void *optvalue, socklen_t *optlen)=0 |
| 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 |
| MUST_USE_RESULT bool | addDescriptorOwner () |
| void | removeDescriptorOwner () |
| void | retainDescriptorLifetime (const SharedPointer< NetworkSyscalls > &lifetime) |
| virtual void | lastDescriptorClosed () |
| 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 |
| virtual void | setBlocking (bool blocking) |
| 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) |
Protected Member Functions | |
| 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 | |
| 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 |
Private Attributes | |
| Mutex | m_LifecycleLock |
| size_t | m_DescriptorOwners |
| bool | m_DescriptorAdmissionOpen |
| bool | m_LastDescriptorClosed |
| SharedPointer< NetworkSyscalls > | m_DescriptorLifetime |
Definition at line 85 of file net-syscalls.h.
| NetworkSyscalls::NetworkSyscalls | ( | int | domain, |
| int | type, | ||
| int | protocol | ||
| ) |
Definition at line 1472 of file net-syscalls.cc.
|
virtual |
Definition at line 1526 of file net-syscalls.cc.
|
pure virtual |
Implemented in LwipSocketSyscalls.
|
protected |
Definition at line 1644 of file net-syscalls.cc.
| bool NetworkSyscalls::addDescriptorOwner | ( | ) |
Track descriptor owners independently of in-flight syscall leases.
Definition at line 1602 of file net-syscalls.cc.
Referenced by FileDescriptor::FileDescriptor(), and FileDescriptor::FileDescriptor().
Here is the caller graph for this function:
|
inlinevirtual |
Implementation-specific final socket creation logic, implementations must set a SYSCALL_ERROR on failure.
Reimplemented in MqueueNetlinkSocket.
Definition at line 92 of file net-syscalls.h.
| void NetworkSyscalls::associate | ( | FileDescriptor * | fd | ) |
Definition at line 1675 of file net-syscalls.cc.
|
protected |
Wins the one transition into lastDescriptorClosed().
Definition at line 1687 of file net-syscalls.cc.
Referenced by lastDescriptorClosed(), LwipSocketSyscalls::lastDescriptorClosed(), UnixSocketSyscalls::lastDescriptorClosed(), and MqueueNetlinkSocket::lastDescriptorClosed().
Here is the caller graph for this function:
|
pure virtual |
Implemented in UnixSocketSyscalls.
|
virtual |
Definition at line 1583 of file net-syscalls.cc.
|
pure virtual |
Implemented in LwipSocketSyscalls.
|
virtual |
Reimplemented in LwipSocketSyscalls, and UnixSocketSyscalls.
Definition at line 1530 of file net-syscalls.cc.
| void NetworkSyscalls::deferReceiveError | ( | int | error | ) |
Definition at line 1499 of file net-syscalls.cc.
|
inline |
Definition at line 148 of file net-syscalls.h.
|
pure virtual |
Implemented in LwipSocketSyscalls.
|
inline |
Definition at line 156 of file net-syscalls.h.
|
pure virtual |
Implemented in LwipSocketSyscalls.
|
inline |
Definition at line 152 of file net-syscalls.h.
|
protected |
Definition at line 1698 of file net-syscalls.cc.
| bool NetworkSyscalls::isBlocking | ( | ) | const |
Definition at line 1679 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 in LwipSocketSyscalls, UnixSocketSyscalls, and MqueueNetlinkSocket.
Definition at line 1658 of file net-syscalls.cc.
References beginDescriptorClose(), OperationBarrier::closeAndWait(), ReadinessSource::closeReadiness(), and m_ReadinessNotifications.
|
pure virtual |
Implemented in UnixSocketSyscalls.
Definition at line 1667 of file net-syscalls.cc.
|
inline |
Definition at line 160 of file net-syscalls.h.
|
protected |
Definition at line 1509 of file net-syscalls.cc.
|
virtual |
Reimplemented in LwipSocketSyscalls.
Definition at line 1587 of file net-syscalls.cc.
|
virtual |
Return a level-triggered snapshot for the requested I/O directions.
Reimplemented in LwipSocketSyscalls, UnixSocketSyscalls, and MqueueNetlinkSocket.
Definition at line 1596 of file net-syscalls.cc.
|
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.
Reimplemented in UnixSocketSyscalls.
Definition at line 1522 of file net-syscalls.cc.
|
virtual |
Definition at line 1553 of file net-syscalls.cc.
|
protected |
Definition at line 1649 of file net-syscalls.cc.
| void NetworkSyscalls::removeDescriptorOwner | ( | ) |
Definition at line 1612 of file net-syscalls.cc.
| void NetworkSyscalls::retainDescriptorLifetime | ( | const SharedPointer< NetworkSyscalls > & | lifetime | ) |
Keep an AF_UNIX wrapper alive while deferred final-close work drains.
Definition at line 1633 of file net-syscalls.cc.
|
virtual |
Definition at line 1534 of file net-syscalls.cc.
|
virtual |
Definition at line 1683 of file net-syscalls.cc.
|
virtual |
Definition at line 1579 of file net-syscalls.cc.
| int NetworkSyscalls::takeReceiveError | ( | ) |
Definition at line 1487 of file net-syscalls.cc.
|
virtual |
Definition at line 1671 of file net-syscalls.cc.
|
virtual |
Definition at line 1594 of file net-syscalls.cc.
|
inlineprotectedvirtual |
Definition at line 172 of file net-syscalls.h.
|
protected |
Definition at line 1514 of file net-syscalls.cc.
|
protected |
Definition at line 191 of file net-syscalls.h.
|
private |
Definition at line 202 of file net-syscalls.h.
|
private |
Definition at line 204 of file net-syscalls.h.
|
private |
Definition at line 201 of file net-syscalls.h.
|
protected |
Definition at line 186 of file net-syscalls.h.
|
private |
Definition at line 203 of file net-syscalls.h.
|
mutableprivate |
Definition at line 200 of file net-syscalls.h.
|
protected |
Definition at line 189 of file net-syscalls.h.
|
protected |
Definition at line 188 of file net-syscalls.h.
|
protected |
Pins transport state across readiness queries and external notifications.
Definition at line 197 of file net-syscalls.h.
Referenced by lastDescriptorClosed(), LwipSocketSyscalls::lastDescriptorClosed(), UnixSocketSyscalls::lastDescriptorClosed(), MqueueNetlinkSocket::lastDescriptorClosed(), LwipSocketSyscalls::netconnCallback(), LwipSocketSyscalls::queryReady(), and LwipSocketSyscalls::readinessGenerations().
|
protected |
Definition at line 193 of file net-syscalls.h.
|
protected |
Definition at line 194 of file net-syscalls.h.
|
mutableprotected |
Definition at line 192 of file net-syscalls.h.
|
protected |
Definition at line 187 of file net-syscalls.h.