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

Method getsockname

source/kernel/knetlink.cpp:275–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273}
274
275U32 KNetLinkObject::getsockname(KThread* thread, const KFileDescriptorPtr& fd, U32 address, U32 plen) {
276 KMemory* memory = thread->memory;
277
278 if (afBound) {
279 memory->writew(address, this->afBound->nl_family);
280 memory->writew(address + 2, 0);
281 memory->writed(address + 4, this->afBound->nl_pid);
282 memory->writed(address + 8, this->afBound->nl_groups);
283 memory->writed(plen, 12);
284 return 0;
285 }
286 return -K_ENOTCONN;
287}
288
289U32 KNetLinkObject::getpeername(KThread* thread, const KFileDescriptorPtr& fd, U32 address, U32 plen) {
290 return -K_EOPNOTSUPP;

Callers 1

kgetsocknameFunction · 0.45

Calls 2

writewMethod · 0.45
writedMethod · 0.45

Tested by

no test coverage detected