friendev EtherDune TCP/IP library
Macros
Packet buffer configuration

Definition of buffer sizes. More...

Macros

#define EtherDune_BUFFER_SIZE   566
 RAM memory buffer size to hold a packet. More...
 
#define EtherDune_SAMPLE_SIZE   42
 Minimum amount of bytes to read to decide whether we want the rest of the packet or not. More...
 

Detailed Description

Definition of buffer sizes.

Macro Definition Documentation

#define EtherDune_BUFFER_SIZE   566

RAM memory buffer size to hold a packet.

default is 566 which is enough to hold a TCP packet of 512 bytes

Definition at line 41 of file config.h.

#define EtherDune_SAMPLE_SIZE   42

Minimum amount of bytes to read to decide whether we want the rest of the packet or not.

There is a lot of cosmic noise in an Ethernet network, broadcasts, etc that we can filter out using this feature. With 42 bytes we can read an entire ARP packet in the sample. plus we get IP and UDP full headers as well as TCP sourcePort, localPort and sequenceNumber, or even full ICMPHeader

Data Entity Size
EthernetHeader 14
ARPPacket 28
TOTAL 42
Data Entity Size
EthernetHeader 14
IPHeader 20
sourcePort 2
sequenceNumber 4
TOTAL 42
Data Entity Size
EthernetHeader 14
IPHeader 20
ICMPHeader 8
TOTAL 42

To disable sampling, set EtherDune_SAMPLE_SIZE to EtherDune_BUFFER_SIZE

Definition at line 75 of file config.h.