| 405 | } |
| 406 | |
| 407 | bool SocketAdapter::SendICMP(ConnectionKey Key, IP_Packet* ipPkt) |
| 408 | { |
| 409 | //IP_PayloadPtr* ipPayload = static_cast<IP_PayloadPtr*>(ipPkt->GetPayload()); |
| 410 | |
| 411 | ICMP_Session* s; |
| 412 | |
| 413 | //Need custom SendFromConnection |
| 414 | BaseSession* existingSession = nullptr; |
| 415 | connections.TryGetValue(Key, &existingSession); |
| 416 | if (existingSession != nullptr) |
| 417 | { |
| 418 | s = static_cast<ICMP_Session*>(existingSession); |
| 419 | return s->Send(ipPkt->GetPayload(), ipPkt); |
| 420 | } |
| 421 | |
| 422 | DevCon.WriteLn("DEV9: Socket: Creating New ICMP Connection"); |
| 423 | s = new ICMP_Session(Key, adapterIP, &connections); |
| 424 | |
| 425 | s->AddConnectionClosedHandler([&](BaseSession* session) { HandleConnectionClosed(session); }); |
| 426 | s->destIP = ipPkt->destinationIP; |
| 427 | s->sourceIP = dhcpServer.ps2IP; |
| 428 | connections.Add(Key, s); |
| 429 | return s->Send(ipPkt->GetPayload(), ipPkt); |
| 430 | } |
| 431 | |
| 432 | bool SocketAdapter::SendIGMP(ConnectionKey Key, IP_Packet* ipPkt) |
| 433 | { |
nothing calls this directly
no test coverage detected