ssize_t sendto(int socket, const void *message, size_t length, int flags, const struct sockaddr *dest_addr, socklen_t dest_len);
| 317 | |
| 318 | // ssize_t sendto(int socket, const void *message, size_t length, int flags, const struct sockaddr *dest_addr, socklen_t dest_len); |
| 319 | U32 ksendto(KThread* thread, U32 socket, U32 message, U32 length, U32 flags, U32 dest_addr, U32 dest_len) { |
| 320 | KFileDescriptorPtr fd = thread->process->getFileDescriptor(socket); |
| 321 | |
| 322 | if (!fd) { |
| 323 | return -K_EBADF; |
| 324 | } |
| 325 | if (IS_NOT_SOCKET(fd)) { |
| 326 | return -K_ENOTSOCK; |
| 327 | } |
| 328 | std::shared_ptr<KSocketObject> s = std::dynamic_pointer_cast<KSocketObject>(fd->kobject); |
| 329 | return s->sendto(thread, fd, message, length, flags, dest_addr, dest_len); |
| 330 | } |
| 331 | |
| 332 | // ssize_t recvfrom(int socket, void *restrict buffer, size_t length, int flags, struct sockaddr *restrict address, socklen_t *restrict address_len); |
| 333 | U32 krecvfrom(KThread* thread, U32 socket, U32 buffer, U32 length, U32 flags, U32 address, U32 address_len) { |
no test coverage detected