#include <socket.h>
Inheritance diagram for os::posix::socket_implementable< T >:Public Types | |
| using | value_type = T |
Types & Constants | |
| enum class | type : type_t { unknown = 0 , not_set = 1 << 0 , char_device = 1 << 1 , block_device = 1 << 2 , tty = 1 << 3 , file = 1 << 4 , socket = 1 << 5 } |
| using | type_t = unsigned int |
Public Member Functions | |
Constructors & Destructor | |
| socket_implementable (class net_stack &ns) | |
| virtual | ~socket_implementable () |
Public Member Functions | |
| value_type & | impl (void) const |
Public Member Functions | |
| virtual socket * | accept (sockaddr *address, socklen_t *address_len) |
| virtual int | bind (const sockaddr *address, socklen_t address_len) |
| virtual int | connect (const sockaddr *address, socklen_t address_len) |
| virtual int | getpeername (sockaddr *address, socklen_t *address_len) |
| virtual int | getsockname (sockaddr *address, socklen_t *address_len) |
| virtual int | getsockopt (int level, int option_name, void *option_value, socklen_t *option_len) |
| virtual int | listen (int backlog) |
| virtual ssize_t | recv (void *buffer, size_t length, int flags) |
| virtual ssize_t | recvfrom (void *buffer, size_t length, int flags, sockaddr *address, socklen_t *address_len) |
| virtual ssize_t | recvmsg (msghdr *message, int flags) |
| virtual ssize_t | send (const void *buffer, size_t length, int flags) |
| virtual ssize_t | sendmsg (const msghdr *message, int flags) |
| virtual ssize_t | sendto (const void *message, size_t length, int flags, const sockaddr *dest_addr, socklen_t dest_len) |
| virtual int | setsockopt (int level, int option_name, const void *option_value, socklen_t option_len) |
| virtual int | shutdown (int how) |
| virtual int | sockatmark (void) |
| class net_stack * | net_stack (void) |
Public Member Functions | |
| virtual int | close (void) |
| virtual ssize_t | read (void *buf, std::size_t nbyte) |
| virtual ssize_t | write (const void *buf, std::size_t nbyte) |
| virtual ssize_t | writev (const iovec *iov, int iovcnt) |
| int | fcntl (int cmd,...) |
| virtual int | vfcntl (int cmd, std::va_list args) |
| int | isatty (void) |
| virtual int | fstat (struct stat *buf) |
| virtual off_t | lseek (off_t offset, int whence) |
| type_t | get_type (void) const |
| file_descriptor_t | file_descriptor (void) const |
| bool | is_opened (void) |
Protected Member Functions | |
Private Member Functions | |
| void | file_descriptor (file_descriptor_t fildes) |
| void | clear_file_descriptor (void) |
| io * | alloc_file_descriptor (void) |
Definition at line 337 of file posix-io/socket.h.
|
inherited |
| using os::posix::socket_implementable< T >::value_type = T |
Definition at line 342 of file posix-io/socket.h.
|
stronginherited |
| Enumerator | |
|---|---|
| unknown | |
| not_set | |
| char_device | |
| block_device | |
| tty | |
| file | |
| socket | |
Definition at line 126 of file io.h.
| os::posix::socket_implementable< T >::socket_implementable | ( | class net_stack & | ns | ) |
Definition at line 572 of file posix-io/socket.h.
References os::trace::printf().
|
virtual |
Definition at line 581 of file posix-io/socket.h.
References os::trace::printf().
|
virtualinherited |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 58 of file socket.cpp.
References os::posix::io::alloc_file_descriptor(), os::posix::socket_impl::do_accept(), and os::posix::socket::impl().
Referenced by os::posix::socket_lockable< T, L >::accept().
|
protectedinherited |
Definition at line 189 of file io.cpp.
References os::posix::file_descriptors_manager::allocate(), os::posix::io::clear_file_descriptor(), os::posix::io_impl::do_close(), os::posix::io::impl(), and os::trace::printf().
Referenced by os::posix::socket::accept(), os::posix::socket(), os::posix::device::vopen(), and os::posix::file_system::vopen().
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 73 of file socket.cpp.
References os::posix::socket_impl::do_bind(), and os::posix::socket::impl().
Referenced by os::posix::socket_lockable< T, L >::bind().
|
inlineprotectedinherited |
Definition at line 446 of file io.h.
References os::posix::no_file_descriptor.
Referenced by os::posix::io::alloc_file_descriptor().
|
virtualinherited |
Reimplemented in os::posix::block_device_lockable< T, L >, os::posix::device, os::posix::file, os::posix::file_lockable< T, L >, and os::posix::socket_lockable< T, L >.
Definition at line 164 of file io.cpp.
References os::posix::file_descriptors_manager::deallocate(), os::posix::io_impl::do_close(), os::posix::io::impl(), os::posix::no_file_descriptor, and os::trace::printf().
Referenced by os::posix::device::close(), os::posix::file::close(), and os::posix::socket_lockable< T, L >::close().
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 82 of file socket.cpp.
References os::posix::socket_impl::do_connect(), and os::posix::socket::impl().
Referenced by os::posix::socket_lockable< T, L >::connect().
|
inherited |
Definition at line 363 of file io.cpp.
References os::posix::io::vfcntl().
|
inlineprotectedinherited |
|
inlineinherited |
Definition at line 452 of file io.h.
Referenced by os::posix::file_descriptors_manager::allocate(), os::posix::file_descriptors_manager::assign(), os::posix::device::vopen(), and os::posix::vopen().
|
virtualinherited |
Reimplemented in os::posix::file_lockable< T, L >.
Definition at line 416 of file io.cpp.
References os::posix::io_impl::do_fstat(), os::posix::io::impl(), and os::trace::printf().
Referenced by os::posix::file_lockable< T, L >::fstat().
|
inlineinherited |
Definition at line 434 of file io.h.
Referenced by os::posix::file_descriptors_manager::socket().
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 92 of file socket.cpp.
References os::posix::socket_impl::do_getpeername(), and os::posix::socket::impl().
Referenced by os::posix::socket_lockable< T, L >::getpeername().
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 102 of file socket.cpp.
References os::posix::socket_impl::do_getsockname(), and os::posix::socket::impl().
Referenced by os::posix::socket_lockable< T, L >::getsockname().
|
virtualinherited |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 112 of file socket.cpp.
References os::posix::socket_impl::do_getsockopt(), and os::posix::socket::impl().
Referenced by os::posix::socket_lockable< T, L >::getsockopt().
| socket_implementable< T >::value_type & os::posix::socket_implementable< T >::impl | ( | void | ) | const |
Definition at line 590 of file posix-io/socket.h.
|
inlineinherited |
Definition at line 458 of file io.h.
References os::posix::io_impl::do_is_opened(), and os::posix::io::impl().
|
inherited |
Definition at line 406 of file io.cpp.
References os::posix::io_impl::do_isatty(), and os::posix::io::impl().
|
virtualinherited |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 123 of file socket.cpp.
References os::posix::socket_impl::do_listen(), and os::posix::socket::impl().
Referenced by os::posix::socket_lockable< T, L >::listen().
|
virtualinherited |
Reimplemented in os::posix::block_device_lockable< T, L >, and os::posix::file_lockable< T, L >.
Definition at line 447 of file io.cpp.
References os::posix::io_impl::do_lseek(), os::posix::io::impl(), and os::trace::printf().
Referenced by os::posix::block_device_lockable< T, L >::lseek(), and os::posix::file_lockable< T, L >::lseek().
|
inlineinherited |
Definition at line 558 of file posix-io/socket.h.
|
virtualinherited |
Reimplemented in os::posix::block_device_lockable< T, L >, and os::posix::file_lockable< T, L >.
Definition at line 217 of file io.cpp.
References os::posix::io_impl::do_read(), os::posix::io::impl(), and os::trace::printf().
Referenced by os::posix::block_device_lockable< T, L >::read(), and os::posix::file_lockable< T, L >::read().
|
virtualinherited |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 132 of file socket.cpp.
References os::posix::socket_impl::do_recv(), and os::posix::socket::impl().
Referenced by os::posix::socket_lockable< T, L >::recv().
|
virtualinherited |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 141 of file socket.cpp.
References os::posix::socket_impl::do_recvfrom(), and os::posix::socket::impl().
Referenced by os::posix::socket_lockable< T, L >::recvfrom().
|
virtualinherited |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 151 of file socket.cpp.
References os::posix::socket_impl::do_recvmsg(), and os::posix::socket::impl().
Referenced by os::posix::socket_lockable< T, L >::recvmsg().
|
virtualinherited |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 160 of file socket.cpp.
References os::posix::socket_impl::do_send(), and os::posix::socket::impl().
Referenced by os::posix::socket_lockable< T, L >::send().
|
virtualinherited |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 169 of file socket.cpp.
References os::posix::socket_impl::do_sendmsg(), and os::posix::socket::impl().
Referenced by os::posix::socket_lockable< T, L >::sendmsg().
|
virtualinherited |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 178 of file socket.cpp.
References os::posix::socket_impl::do_sendto(), and os::posix::socket::impl().
Referenced by os::posix::socket_lockable< T, L >::sendto().
|
virtualinherited |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 188 of file socket.cpp.
References os::posix::socket_impl::do_setsockopt(), and os::posix::socket::impl().
Referenced by os::posix::socket_lockable< T, L >::setsockopt().
|
virtualinherited |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 199 of file socket.cpp.
References os::posix::socket_impl::do_shutdown(), and os::posix::socket::impl().
Referenced by os::posix::socket_lockable< T, L >::shutdown().
|
virtualinherited |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 208 of file socket.cpp.
References os::posix::socket_impl::do_sockatmark(), and os::posix::socket::impl().
Referenced by os::posix::socket_lockable< T, L >::sockatmark().
|
virtualinherited |
Reimplemented in os::posix::block_device_lockable< T, L >, and os::posix::file_lockable< T, L >.
Definition at line 380 of file io.cpp.
References os::posix::io_impl::do_vfcntl(), os::posix::io::impl(), and os::trace::printf().
Referenced by os::posix::io::fcntl(), os::posix::block_device_lockable< T, L >::vfcntl(), and os::posix::file_lockable< T, L >::vfcntl().
|
virtualinherited |
Reimplemented in os::posix::block_device_lockable< T, L >, and os::posix::file_lockable< T, L >.
Definition at line 268 of file io.cpp.
References os::posix::io_impl::do_write(), os::posix::io::impl(), and os::trace::printf().
Referenced by os::posix::block_device_lockable< T, L >::write(), and os::posix::file_lockable< T, L >::write().
|
virtualinherited |
Reimplemented in os::posix::block_device_lockable< T, L >, and os::posix::file_lockable< T, L >.
Definition at line 321 of file io.cpp.
References os::posix::io_impl::do_writev(), os::posix::io::impl(), and os::trace::printf().
Referenced by os::posix::block_device_lockable< T, L >::writev(), and os::posix::file_lockable< T, L >::writev().