| 244 | } |
| 245 | |
| 246 | U32 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 | |
| 263 | U32 KNetLinkObject::connect(KThread* thread, const KFileDescriptorPtr& fd, U32 address, U32 len) { |
| 264 | return -K_EOPNOTSUPP; |
no test coverage detected