|
The Pedigree Project 0.1
|
Inheritance diagram for UnixSocketSyscalls:
Collaboration diagram for UnixSocketSyscalls:Classes | |
| class | EndpointMutationGuard |
| class | EndpointMutationPairGuard |
| class | EndpointReadinessGuard |
Public Member Functions | |
| UnixSocketSyscalls (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 bool | monitor (Thread *pThread, Event *pEvent) |
| virtual bool | unmonitor (Event *pEvent) |
| bool | pairWith (UnixSocketSyscalls *other) |
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) |
| MUST_USE_RESULT bool | addDescriptorOwner () |
| void | removeDescriptorOwner () |
| void | retainDescriptorLifetime (const SharedPointer< NetworkSyscalls > &lifetime) |
| 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 | |
| bool | usesLocalEndpointLifetime () const override |
| virtual UnixSocketSyscalls * | createAcceptedSocket () |
Protected Member Functions inherited from NetworkSyscalls | |
| 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) |
Private Member Functions | |
| NOT_COPYABLE_OR_ASSIGNABLE (UnixSocketSyscalls) | |
| void | registerSocket (UnixSocket *socket) |
| void | registerPeer (UnixSocket *socket, UnixSocket *peer, UnixSocket *listener=nullptr) |
| void | unregisterPeer (UnixSocket *socket, UnixSocket *peer) |
| void | notifyPeer (UnixSocket *socket, ReadyMask mask) |
| String | abstractKey (const String &address) const |
| bool | publishAbstractSocket (const String &address, const SharedPointer< UnixSocketReference > &reference) |
| SharedPointer< UnixSocketReference > | acquireSocket (const String &address) |
| void | removeAbstractSocket (const String &address, UnixSocket *socket) |
| SharedPointer< UnixSocketGeneration > | acquireLocalEndpoint () const |
| void | replaceLocalEndpoint (UnixSocket *socket, bool tracked, const String *localPath=nullptr) |
| void | replaceLocalEndpoint (const SharedPointer< UnixSocketReference > &reference, const String *localPath, bool ownsAbstractName) |
| void | tryCompleteEndpointClose () |
| UnixSocket::SocketType | getSocketType () const |
Static Private Member Functions | |
| static void | unregisterSocket (UnixSocket *socket, List< UnixSocket * > &peers) |
| static void | notifySocket (UnixSocket *socket, ReadyMask mask) |
Static Private Attributes | |
| static Tree< UnixSocket *, UnixSocketSyscalls * > | m_SyscallObjects |
| static Tree< UnixSocket *, UnixSocket * > | m_Peers |
| static Tree< UnixSocket *, UnixSocket * > | m_PendingListeners |
| static Mutex | m_SyscallObjectsLock |
Friends | |
| class | UnixSocketGeneration |
| bool | runHostedUnixEndpointLifetimeRegression (Process *process) |
Additional Inherited Members | |
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 278 of file net-syscalls.h.
| UnixSocketSyscalls::UnixSocketSyscalls | ( | int | domain, |
| int | type, | ||
| int | protocol | ||
| ) |
Definition at line 2992 of file net-syscalls.cc.
|
virtual |
Definition at line 3008 of file net-syscalls.cc.
Definition at line 3183 of file net-syscalls.cc.
|
virtual |
Implements NetworkSyscalls.
Definition at line 3885 of file net-syscalls.cc.
|
private |
Definition at line 3194 of file net-syscalls.cc.
|
private |
Definition at line 3148 of file net-syscalls.cc.
|
virtual |
Implements NetworkSyscalls.
Definition at line 3762 of file net-syscalls.cc.
References VFS::checkAccess(), String::endswith(), Process::getParent(), ProcessorBase::information(), VFS::instance(), File::isDirectory(), Filesystem::isReadOnly(), m_EndpointStateLock, ReadinessSource::notifyReadiness(), File::releaseVfsReference(), and VFS::trackFile().
|
virtual |
Reimplemented from NetworkSyscalls.
Definition at line 4093 of file net-syscalls.cc.
|
virtual |
Implements NetworkSyscalls.
Definition at line 3333 of file net-syscalls.cc.
|
virtual |
Implementation-specific final socket creation logic.
Reimplemented from NetworkSyscalls.
Definition at line 3313 of file net-syscalls.cc.
References SharedPointer< T >::get().
|
protectedvirtual |
Definition at line 3942 of file net-syscalls.cc.
|
virtual |
Implements NetworkSyscalls.
Definition at line 3968 of file net-syscalls.cc.
|
private |
Definition at line 4281 of file net-syscalls.cc.
|
virtual |
Implements NetworkSyscalls.
Definition at line 3992 of file net-syscalls.cc.
|
virtual |
Implements NetworkSyscalls.
Definition at line 4026 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 3228 of file net-syscalls.cc.
References NetworkSyscalls::beginDescriptorClose(), OperationBarrier::close(), Mutex::isOwnedByCurrentThread(), m_EndpointMutationLock, and NetworkSyscalls::m_ReadinessNotifications.
|
virtual |
Implements NetworkSyscalls.
Definition at line 3737 of file net-syscalls.cc.
References SharedPointer< T >::get().
Reimplemented from NetworkSyscalls.
Definition at line 4208 of file net-syscalls.cc.
|
private |
Definition at line 3121 of file net-syscalls.cc.
|
staticprivate |
Definition at line 3102 of file net-syscalls.cc.
| bool UnixSocketSyscalls::pairWith | ( | UnixSocketSyscalls * | other | ) |
Pair two UnixSocketSyscalls objects such that the referenced sockets directly communicate with each other.
Definition at line 4228 of file net-syscalls.cc.
References SharedPointer< T >::get(), m_EndpointMutationLock, m_EndpointStateLock, and ReadinessSource::notifyReadiness().
|
virtual |
Reimplemented from NetworkSyscalls.
Definition at line 4159 of file net-syscalls.cc.
|
private |
Definition at line 3133 of file net-syscalls.cc.
|
virtual |
Return a level-triggered snapshot for the requested I/O directions.
Reimplemented from NetworkSyscalls.
Definition at line 4097 of file net-syscalls.cc.
References SharedPointer< T >::get(), and UnixSocket::select().
|
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 NetworkSyscalls.
Definition at line 4148 of file net-syscalls.cc.
References SharedPointer< T >::get().
|
virtual |
Implements NetworkSyscalls.
Definition at line 3598 of file net-syscalls.cc.
|
private |
Definition at line 3029 of file net-syscalls.cc.
|
private |
Definition at line 3012 of file net-syscalls.cc.
|
private |
Definition at line 3174 of file net-syscalls.cc.
|
private |
Definition at line 3206 of file net-syscalls.cc.
|
private |
Definition at line 3199 of file net-syscalls.cc.
|
virtual |
Implements NetworkSyscalls.
Definition at line 3433 of file net-syscalls.cc.
|
virtual |
Implements NetworkSyscalls.
Definition at line 4009 of file net-syscalls.cc.
|
virtual |
Reimplemented from NetworkSyscalls.
Definition at line 3946 of file net-syscalls.cc.
|
private |
Definition at line 3248 of file net-syscalls.cc.
|
virtual |
Reimplemented from NetworkSyscalls.
Definition at line 4218 of file net-syscalls.cc.
|
virtual |
Reimplemented from NetworkSyscalls.
Definition at line 4201 of file net-syscalls.cc.
|
private |
Definition at line 3042 of file net-syscalls.cc.
|
staticprivate |
Definition at line 3057 of file net-syscalls.cc.
|
inlineoverrideprotectedvirtual |
Reimplemented from NetworkSyscalls.
Definition at line 319 of file net-syscalls.h.
|
friend |
Definition at line 325 of file net-syscalls.h.
|
private |
Definition at line 406 of file net-syscalls.h.
|
private |
Definition at line 407 of file net-syscalls.h.
|
private |
Definition at line 403 of file net-syscalls.h.
|
private |
Definition at line 401 of file net-syscalls.h.
|
private |
Serializes bind/connect mutations without covering blocking I/O.
Definition at line 399 of file net-syscalls.h.
Referenced by lastDescriptorClosed(), and pairWith().
|
private |
Definition at line 400 of file net-syscalls.h.
|
private |
Definition at line 402 of file net-syscalls.h.
|
mutableprivate |
Serializes generation snapshots with endpoint and path publication.
Definition at line 397 of file net-syscalls.h.
Referenced by bind(), and pairWith().
|
private |
Definition at line 404 of file net-syscalls.h.
|
private |
Definition at line 409 of file net-syscalls.h.
|
private |
Definition at line 411 of file net-syscalls.h.
|
staticprivate |
Definition at line 332 of file net-syscalls.h.
|
staticprivate |
Definition at line 333 of file net-syscalls.h.
|
private |
Definition at line 405 of file net-syscalls.h.
|
private |
Definition at line 410 of file net-syscalls.h.
|
staticprivate |
Definition at line 331 of file net-syscalls.h.
|
staticprivate |
Definition at line 334 of file net-syscalls.h.