| 146 | } |
| 147 | |
| 148 | U32 kgetpeername(KThread* thread, U32 socket, U32 address, U32 plen) { |
| 149 | KFileDescriptorPtr fd = thread->process->getFileDescriptor(socket); |
| 150 | |
| 151 | if (!fd) { |
| 152 | return -K_EBADF; |
| 153 | } |
| 154 | if (IS_NOT_SOCKET(fd)) { |
| 155 | return -K_ENOTSOCK; |
| 156 | } |
| 157 | std::shared_ptr<KSocketObject> s = std::dynamic_pointer_cast<KSocketObject>(fd->kobject); |
| 158 | return s->getpeername(thread, fd, address, plen); |
| 159 | } |
| 160 | |
| 161 | U32 ksocketpair(KThread* thread, U32 af, U32 type, U32 protocol, U32 socks, U32 flags) { |
| 162 | FD fd1 = 0; |
no test coverage detected