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

Method bind

source/kernel/knetlink.cpp:246–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244}
245
246U32 KNetLinkObject::bind(KThread* thread, const KFileDescriptorPtr& fd, U32 address, U32 len) {
247 KMemory* memory = thread->memory;
248
249 //U32 family = memory->readw(address);
250
251 U32 port = memory->readd(address + 4);
252 if (port == 0) {
253 port = thread->process->id;
254 }
255 this->afBound = std::make_shared<k_sockaddr_nl>();
256 this->afBound->nl_family = memory->readw(address);
257 this->afBound->nl_pid = port;
258 this->afBound->nl_groups = memory->readd(address + 8);
259 this->listening = 1;
260 return 0;
261}
262
263U32 KNetLinkObject::connect(KThread* thread, const KFileDescriptorPtr& fd, U32 address, U32 len) {
264 return -K_EOPNOTSUPP;

Callers 15

preOpMethod · 0.45
MarkJumpLocationMethod · 0.45
markBufferLocationMethod · 0.45
StartElseMethod · 0.45
EndIfMethod · 0.45
dynamic_cmpxchg_lockMethod · 0.45
dynamic_xchge8r8_lockMethod · 0.45
dynamic_arith_lockMethod · 0.45

Calls 2

readdMethod · 0.45
readwMethod · 0.45

Tested by

no test coverage detected