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

Method recvfrom

source/kernel/knetlink.cpp:646–663  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

644}
645
646U32 KNetLinkObject::recvfrom(KThread* thread, const KFileDescriptorPtr& fd, U32 buffer, U32 length, U32 flags, U32 address, U32 address_len) {
647 if (address == 0) {
648 if (flags) {
649 kpanic_fmt("KUnixSocketObject::recvfrom unhandled flags=%x", flags);
650 }
651 return read(thread, buffer, length);
652 }
653 if (address) {
654 if (afBound) {
655 KMemory* memory = thread->memory;
656 memory->writew(address, this->afBound->nl_family);
657 memory->writew(address + 2, 0);
658 memory->writed(address + 4, 0); // pid from kernel
659 memory->writed(address + 8, this->afBound->nl_groups);
660 }
661 }
662 return read(thread, buffer, length);
663}

Callers 2

krecvFunction · 0.45
krecvfromFunction · 0.45

Calls 4

kpanic_fmtFunction · 0.85
readFunction · 0.85
writewMethod · 0.45
writedMethod · 0.45

Tested by

no test coverage detected