170 #define IPAddress_P PROGMEM IPAddress_P_
172 #ifdef ACROSS_ARDUINO
173 #define IPADDR_P(b0,b1,b2,b3) (__extension__({static IPAddress_P_ __c PROGMEM = {(b0),(b1),(b2),(b3)}; &__c;}))
176 #define IPADDR_P(b0,b1,b2,b3) {{ (b0),(b1),(b2),(b3) }}
218 *
this =
IPADDR_P(255, 255, 255, 255);
229 static char addressString[16];
230 sprintf(addressString,
"%d.%d.%d.%d", b[0], b[1], b[2], b[3]);
231 return addressString;
242 #define MACAddress_P PROGMEM MACAddress_P_
243 #ifdef ACROSS_ARDUINO
244 #define MACADDR_P(b0,b1,b2,b3,b4,b5) (__extension__({static MACAddress_P_ __c PROGMEM = {(b0),(b1),(b2),(b3),(b4),(b5)}; &__c;}))
247 #define MACADDR_P(b0,b1,b2,b3,b4,b5) {{ (b0),(b1),(b2),(b3),(b4),(b5) }}
helper struct to store an IP address in PROGMEM
Stores a MAC address in memory.
static const uint8_t SCK_STATE_FIN_WAIT_1
(both server and client) represents waiting for a connection termination request from the remote TCP...
static const uint8_t DHCP_STATE_REBINDING
The client has failed to renew its lease with the server that originally granted it, and now seeks a lease extension with any server that can hear it.
Union of all the different protocol headers and layers to help EtherDune interpret or build packet...
uint8_t ECE
ECN-Echo has a dual role, depending on the value of the SYN flag.
static const uint8_t ICMP_TYPE_ECHOREPLY
ICMP echo reply operation type.
uint8_t RST
Reset the connection.
void zero()
sets the variable to 0.
static const uint8_t SCK_STATE_LAST_ACK
(both server and client) represents waiting for an acknowledgment of the connection termination reque...
static const uint8_t DHCP_STATE_BOUND
Client has a valid lease and is in its normal operating state.
static const uint16_t ETHTYPE_IP
Ethernet header protocol type for IP.
uint8_t HLEN
Hardware address length.
nint16_t option1_value
option value
uint32_t u
access the IP as a uint32_t for convenience
nint16_t h
most significant integer
uint8_t b[4]
byte-wise access to IP address
static const uint8_t SCK_STATE_FIN_WAIT_2
(both server and client) represents waiting for a connection termination request from the remote TCP...
uint8_t PLEN
Protocol address length.
uint16_t rawValue
provides low level access to the memory containing the network-order integer
uint32_t rawValue
provides low level access to the memory containing the network-order integer
nint16_t l
least significant integer
void operator=(MACAddress_P_ *mac)
Assigns from a MAC address stored in PROGMEM
static const uint8_t ARP_OPCODE_REPLY_L
ARP Opcode for reply.
static const uint8_t ARP_OPCODE_REQ_L
ARP Opcode for request.
IPAddress targetIP
Target protocol address.
static const uint8_t SCK_STATE_SYN_RECEIVED
(server) represents waiting for a confirming connection request acknowledgment after having both rece...
static const uint8_t SCK_STATE_CLOSED
(both server and client) represents no connection state at all.
uint8_t raw
byte-wise access to all flags
byte udpData[566-sizeof(EthernetHeader)-sizeof(IPHeader)-sizeof(UDPHeader)]
MACAddress mac
MAC address.
void setBroadcastIP()
Sets the IP to 255.255.255.255
represents an IP address in memory
static const uint8_t SCK_STATE_SYN_SENT
(client) represents waiting for a matching connection request after having sent a connection request...
static const uint8_t SCK_STATE_RESOLVING
IP Address is being resolved.
Represents a network byte order 32 bit integer.
#define IPADDR_P(b0, b1, b2, b3)
defines an IP address as stored in PROGMEM
static const uint8_t ICMP_TYPE_ECHOREQUEST
ICMP echo request operation type.
void operator=(IPAddress_P_ *ip)
Assigns from an IP address stored in PROGMEM
uint8_t raw[28]
byte-wise access to all fields
static const uint8_t SCK_STATE_TIME_WAIT
(either server or client) represents waiting for enough time to pass to be sure the remote TCP receiv...
Represents a network byte order 16 bit integer.
uint8_t option1_length
option length
char * toString() const
Converts the IP address to a string for display.
uint8_t b[6]
byte-wise access to the MAC address
void clear()
Sets all flags to zero.
MACAddress senderMAC
Sender hardware address.
uint8_t PSH
Push function.
uint8_t URG
Indicates that the Urgent pointer field is significant.
static const uint16_t ETHTYPE_ARP
Ethernet header protocol type for ARP.
#define EtherDune_BUFFER_SIZE
RAM memory buffer size to hold a packet.
void zero()
Sets the IP address to zero.
void operator=(uint32_t v)
Assigns a little endian value to this network-order integer
Structure to encode one 2-byte long TCP option.
uint8_t CWR
Congestion Window Reduced (CWR) flag is set by the sending host to indicate that it received a TCP se...
MACAddress targetMAC
Target hardware address.
static const uint8_t IP_PROTO_TCP
IP header protocol type for TCP.
static const uint8_t DHCP_STATE_REQUESTING
The client is waiting to hear back from the server to which it sent its request.
static const uint8_t SCK_STATE_LISTEN
(server) represents waiting for a connection request from any remote TCP and port.
TCP flags data structure.
uint8_t FIN
No more data from sender.
static const uint8_t SCK_STATE_ESTABLISHED
(both server and client) represents an open connection, data received can be delivered to the user...
static const uint8_t SCK_STATE_CLOSING
(both server and client) represents waiting for a connection termination request acknowledgment from ...
uint8_t l
least significant byte
static const uint8_t IP_PROTO_ICMP
IP header protocol type for ICMP.
helper struct to store a MAC address in PROGMEM
nint16_t HTYPE
Hardware type.
IPAddress senderIP
Sender protocol address.
struct to represent the remaining space for DHCP options
uint8_t h
most significant byte
uint8_t option1
Option kind.
static const uint8_t DHCP_STATE_INIT
This is the initialization state, where a client begins the process of acquiring a lease...
static const uint8_t DHCP_STATE_RENEWING
Client is trying to renew its lease.
void operator=(uint16_t v)
Assigns a little endian value to this network-order integer
nint16_t PTYPE
Protocol type.
void zero()
sets the variable to 0.
uint8_t ACK
Indicates that the Acknowledgment field is significant.
uint8_t SYN
Synchronize sequence numbers.
static const uint8_t IP_PROTO_UDP
IP header protocol type for UDP.
static const uint8_t SCK_STATE_CLOSE_WAIT
(both server and client) represents waiting for a connection termination request from the local user...
byte data[566-sizeof(DHCPHeader)-sizeof(UDPHeader)-sizeof(IPHeader)-sizeof(EthernetHeader)]
int8_t status_TTL
TTL in minutes to consider the entry valid.
static const uint8_t DHCP_STATE_SELECTING
The client is waiting to receive DHCPOFFER messages from one or more DHCP servers, so it can choose one.