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

Function kgetsockname

source/kernel/ksocket.cpp:135–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135U32 kgetsockname(KThread* thread, U32 socket, U32 address, U32 plen) {
136 KFileDescriptorPtr fd = thread->process->getFileDescriptor(socket);
137
138 if (!fd) {
139 return -K_EBADF;
140 }
141 if (IS_NOT_SOCKET(fd)) {
142 return -K_ENOTSOCK;
143 }
144 std::shared_ptr<KSocketObject> s = std::dynamic_pointer_cast<KSocketObject>(fd->kobject);
145 return s->getsockname(thread, fd, address, plen);
146}
147
148U32 kgetpeername(KThread* thread, U32 socket, U32 address, U32 plen) {
149 KFileDescriptorPtr fd = thread->process->getFileDescriptor(socket);

Callers 2

syscall_socketcallFunction · 0.85
syscall_getsocknameFunction · 0.85

Calls 2

getFileDescriptorMethod · 0.80
getsocknameMethod · 0.45

Tested by

no test coverage detected