AppleWin/source/Tfe/IPRaw.h
Andrea 60cbbb40db
Uthernet II: 2 fixes and minor changes (PR #1100)
* Enable virtual DNS by default.
* Improve handling of header size:
This fixes an issue in UDP, where it would not take the header size into account when deciding how much to read.
* IPRAW socket. Fix an issue where the header would include "our" IP Address.
The doc is not very clear 5.2.3: they say "destination". But for consistency with UDP (5.2.2) where it seems clear that this is the peer's ip, we replace with the "destination" of the socket, or the "source" of the packet.
* minor tweak: signal with SOCK_SYNSENT that a connection is being established.
* remove Socket::myErrno as it serves no purpose.
It is a duplicate of (sn_sr == W5100_SN_SR_SOCK_SYNSENT).
* add some logging when reading/writing on a closed socket.
2022-05-19 19:30:34 +01:00

12 lines
579 B
C++

#pragma once
struct MACAddress;
std::vector<uint8_t> createETH2Frame(const std::vector<uint8_t> &data,
const MACAddress *sourceMac, const MACAddress *destinationMac,
const uint8_t ttl, const uint8_t tos, const uint8_t protocol,
const uint32_t sourceAddress, const uint32_t destinationAddress);
void getIPPayload(const int lengthOfFrame, const uint8_t *frame,
size_t &lengthOfPayload, const uint8_t *&payload, uint32_t &source, uint8_t &protocol);