MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / kgetpeername

Function kgetpeername

source/kernel/ksocket.cpp:148–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148U32 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
161U32 ksocketpair(KThread* thread, U32 af, U32 type, U32 protocol, U32 socks, U32 flags) {
162 FD fd1 = 0;

Callers 2

syscall_socketcallFunction · 0.85
syscall_getpeernameFunction · 0.85

Calls 2

getFileDescriptorMethod · 0.80
getpeernameMethod · 0.45

Tested by

no test coverage detected