How stonemaguire/nativeethernet works
NativeEthernet is a Teensy 4.1 networking library that replaces the Arduino Ethernet API, backed by the FNET stack. A sketch configures Ethernet and then uses TCP client/server or UDP APIs; hostname-based UDP destinations use DNS resolution, and the library also exposes mDNS service registration. The excerpts show socket operations delegated to a socket layer and FNET calls, but do not establish every initialization or dispatch relationship, so those links are omitted.
Main entry points: Nativesocket.cpp Socket Operations · NativeEthernet.h Compatibility API · NativeEthernetUdp.cpp UDP · NativeEthernetClient.cpp TCP Client
Components 11
Ethernet API
- Ethernet Setup
src/NativeEthernet.cpp - Compatibility API
src/NativeEthernet.h - TCP Client
src/NativeEthernetClient.cpp - TCP Server
src/NativeEthernetServer.cpp - UDP
src/NativeEthernetUdp.cpp
Network Services
- DNS Resolver
src/NativeDns.cpp - mDNS Services
src/NativeMdns.cpp
Socket Transport
- Socket Operations
src/Nativesocket.cpp - Socket Definitions
src/utility/NativeW5100.h
Other components
- Arduino Sketch
- FNET Stack
Connections 13
- Arduino Sketch → Compatibility API: uses
README.md - Ethernet Setup → FNET Stack: initializes stack
src/NativeEthernet.cpp - TCP Client → Compatibility API: uses socket API
src/NativeEthernetClient.cpp - TCP Server → Compatibility API: uses socket API
src/NativeEthernetServer.cpp - UDP → Compatibility API: uses socket API
src/NativeEthernetUdp.cpp - UDP → DNS Resolver: resolves host
src/NativeEthernetUdp.cpp - DNS Resolver → FNET Stack: resolves names
src/NativeDns.cpp - mDNS Services → FNET Stack: registers services
src/NativeMdns.cpp - TCP Client → Socket Operations: sends and receives
src/NativeEthernetClient.cpp - UDP → Socket Operations: sends and receives
src/NativeEthernetUdp.cpp - Socket Operations → FNET Stack: operates sockets
src/Nativesocket.cpp - TCP Server → FNET Stack: accepts connections
src/NativeEthernetServer.cpp - Socket Operations → Socket Definitions: uses protocol states
src/Nativesocket.cpp