If you receive a SocketException when calling the Bind method, use the SocketException.ErrorCode property to obtain the specific error code. After you have obtained this code, refer to the Windows Sockets version 2 API error code documentation for a detailed description of the error.
WSAEADDRNOTAVAIL - 10049 - Cannot assign requested address.
The requested address is not valid in its context. This normally results from an attempt to bind to an address that is not valid for the local computer. This can also result from connect, sendto, WSAConnect, WSAJoinLeaf, or WSASendTo when the remote address or port is not valid for a remote computer (for example, address or port 0).
ок, здесь выдает ошибку.
Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Raw, ProtocolType.Icmp);
И ещё может это косяк Packet Crafting но в полученных данных нету пакета информации или он битый.
Зачем 3 SQLiteCommand и SQLiteDataReader? Одного не хватило? Туда же 3 цикла чтения данных...
Для начала ознакомьтесь с документацией (похоже не только к используемым модулям, но и по языку), т.к. сейчас это больше похоже на мешанину кода.
Учитывая, что отмечен статус студента, ряд советов: