Releases: ssilverman/QNEthernet
Releases · ssilverman/QNEthernet
Release list
0.37.0
Changed
- Moved chrono utilities to the
qindesign::chrononamespace. - Changed
MAIN_TEST_PROGRAMtoQNETHERNET_MAIN_TEST_PROGRAMto detect main program inclusion. - Now starting with MIB counters (RFC 2819) disabled.
- Updated the project to use registers and functions from the
imxrt1060-regslibrary, obviating the need forimxrt.h. - Improved SNTPClient example to retry sending SNTP requests until a response is received
- Added
stratum < 16check to SNTPClient example and updated the RFC reference.
Fixed
- Fixed a
pbufcopy error inByteBuffer::read(pbuf*). - Fixed W5500 input processing to skip the rest of the frame if a
pbufcould not be allocated. - Fixed
Pingto use the current header size instead of a constant. - Moved essential operations out of LWIP_ASSERT() statements because LWIP_NOASSERT may be defined.
- Fixed W5500 driver
ETH_PAD_SIZEhandling. - Fixed STM32 Arduino core 3.0.0 builds. Arduino classes are in the
arduinonamespace;Arduino.hwas included for this architecture.
0.36.0
Added
- Added
elapsedTime::reset()for resetting the timer back to zero. - Added
repassignment operator and constructor toelapsedTimefor assigning a count. - Added
elapsedTimeoperators that use a count. - Added a
settimeofday()implementation in the HAL for Teensy, gated on the newQNETHERNET_PROVIDE_TEENSY_SETTIMEOFDAYconfiguration macro. - Added
qnethernet_hal_entropy_available()function to the HAL. - Added
operator(buf, size)andavailable()toqindesign::security::random_device. - Added some basic entropy randomness quality tests.
- Added
QNETHERNET_ENABLE_RAW_FRAME_FILTER_HOOKoption for determining whether to route incoming frames directly to the raw frame handling machinery.
(Thanks to Folkert van Heusden for helping with this: #106 (comment))
Changed
- Enabled raw frame loopback by default, but not raw frame support.
- Changed SNTPClient example to assume that the
settimeofday()function exists. - Changed entropy functions to set
errnotoEIOinstead ofEAGAINon entropy generation failure. - Made the HAL's
qnethernet_hal_deinit_entropy()andqnethernet_hal_estimate entropy()weak. - Improved entropy and
qindesign::security::random_deviceAPIs. - Updated cppreference.com URLs.
- Moved driver C functions into namespace
qindesign::network::driver. - Moved entropy C functions into namespace
qindesign::entropy. - Changed
QNETHERNET_FLUSH_AFTER_WRITEtoQNETHERNET_FLUSH_AFTER_TCP_WRITE.
Removed
- Removed
qindesign::security::RandomDevicein favour of thestd::random_device-mimickingqindesign::security::random_device.
Fixed
- Fixed the ElapsedTime example to actually toggle the LED.
- Fixed Teensy 4.1 driver to clear the MAC address hash-collision bookkeeping when the driver is uninitialized.
- Fixed TRNG (entropy) access for lower operating frequencies, on Teensy 4.
- Fixed to add some
errnoassignments and update some related comments and docs. - Fixed TRNG initialization to use the correct macros.
- Fixed raw frame loopback to pass along broadcast frames.
(Thanks to Folkert van Heusden: #106 (comment)) - Fixed Teensy 4.1 driver to not overwrite output source MAC address.
(Thanks to Folkert van Heusden: #106 (comment)) - Fixed Teensy 4.1 driver to not calculate checksums when sending raw frames.
(Thanks to Folkert van Heusden: #106 (comment), #106 (comment)) - Fixed Ping to calculate the ICMP checkum if needed.
0.35.0
Added
- Added a ping call to the main program.
- Added
qindesign::network::util::steady_clock_msandqindesign::network::util::arm_high_resolution_clockclasses that conform to the Clock C++ named requirement. These can be used with thestd::chronoAPI. The first provides a wrapper forqnethernet_hal_millis(). The second wraps the ARM DWT_CYCCNT cycle counter. - Added printing chrono clock times to network-up in the main program.
- Added
qindesign::network::util::elapsedTime<Clock>, a class similar toelapsedMillis, but uses astd::chronoClock. - Added support to the W5500 driver for interrupts via a pin.
- New SimpleIPerfServer example. It just reads from a socket as fast as possible.
- Added
write(const void*, size_t)convenience functions to allPrint-like classes. - New ChronoClocks example that demonstrates how to use the new Clocks and
std::chronofeatures. - Added
EthernetClass::linkInfo()to replacelinkSpeed(),linkIsFullDuplex(), andlinkIsCrossover(). - Implemented setting link speed, duplex, and auto-negotiation in Teensy 4.1 and W5500 drivers.
- Added
driver_reset_phy()driver function for resetting the PHY. - Added to
DriverCapabilities:isAutoNegotiationSettableisPHYResettable
- Added call to
qnethernet_hal_deinit_entropy()inRandomDevicedestructor. - Added
RandomDevice::entropy()to matchstd::random_device::entropy(). - Added
qindesign::security::random_deviceto mimicstd::random_device. - New ElapsedTime example that shows how to use the new
elapsedTimeutility.
Changed
- Improved Ping example by always sending, even if a send fails. It was stopping on error.
- Changed some sizes to
size_tinstead ofint:writeFully(client, data, len)example in the ReadmeEthernetClass::kMACAddrSizeEthernetClass::maxMulticastGroups()EthernetClass::dnsServerIP(index)EthernetClass::setDNSServerIP(index, ip)DNSClient::maxServers()DNSClient::setServer(index, ip)DNSClient::getServer(index)EthernetClient::maxSockets()EthernetFrame::maxFrameLen()EthernetFrame::minFrameLen()EthernetServer::maxListeners()EthernetUDP::maxSockets()MDNSClass::maxServices()
- Changed
EthernetClass::begin(mac, timeout)return type toboolfromint. - Robustness changes:
- Removed all implicit conversions
- Handle all return values in some way
- Reduced the number of #defines in favour of constants, enums, and static inline functions
- Changed
MDNSClassto usestd::stringinstead of the ArduinoString. - Updated examples to be more consistent with each other.
- Changed drivers to always loop until a frame can be sent instead of returning
ERR_WOULDBLOCKor NULL. - Marked IPerfServer example as "Under Repair".
- Now excluding the FCS (Frame Check Sequence) from all frame length-related definitions and use.
- Made dramatic improvements to the W5500 driver with much better buffering and how it waits to send frames.
- Updated the W5500 driver's
driver_deinit()function to power down the PHY. - Updated drivers to change link settings and get link info as a group. See the new
LinkSettingsandLinkInfostructs. - Changed all definitions of, uses of, and references to max. and min. frame length to exclude the FCS (frame check sequence).
- Made
QNETHERNET_ENABLE_PING_SENDon by default. - Updated SNTPClient example to use
settimeofday()to set the time. - Updated RandomNumbers example to use new
qindesign::security::random_deviceclass.
Removed
- Removed from
EthernetClass(and replaced withlinkInfo()):linkSpeed()linkIsFullDuplex()linkIsCrossover()
Fixed
- Fixed
EthernetClass::ping(ip, ttl)to return -1 if sending the ping failed. - Fixed RawFrameMonitor example tag interpretation to split at <=1500 and assume values in the range 1501-1535 are a type.
- Fixed setting an incorrect register in the entropy module (Teensy 4).
- Changed
DNSClientto not ignore a zero timeout. This had caused a potential use-after-scope. - Added better checks in the driver output for any buffer copy errors.
- Now checking for NULL buffer arguments in
write()ofEthernetUDPandEthernetFrameClass. - Fixed
MDNSClass:- Ensure there's final NULs after copying some strings.
- Avoid undefined casting between
void*and a function pointer. - Added some NULL argument checking.
DNSClientno longer ignores a timeout of zero. This was causing a potential use-after-scope.- Fixed the entropy module (Teensy 4) to not depend on a possibly stale
errno. - Clarified in the
EthernetServerandEthernetUDPdocs that thebeginXXX()functions are non-transactional in that they callend()orstop()first. - Fixed connection and listener iteration to first take a snapshot of the lists so that it's not possible to change the lists while iterating over them.
0.34.0
Added
- Added tests for some of the print utility functions and classes.
- Added the
QNETHERNET_ENABLE_PING_REPLYmacro to disable ICMP echo replies. - Added a "Requirements" section listing some library requirements to the README.
- Added a
QNETHERNET_PROVIDE_GNU_VERBOSE_TERMINATE_HANDLERconfiguration option for including our own version of__gnu_cxx::__verbose_terminate_handlerfor space-saving reasons. - New
StreamDecoratorclass that also doesprintfchecking. - Added
driver_restart_auto_negotiation()driver function for restarting link auto-negotiation. This is useful for when EMF brings the link down. A new "EMF interference mitigation" section was also added to the Readme. - Added
qindesign::network::util::isBroadcast(ip, localIP, mask). - New
EthernetUDP::destIP()for getting the destination IP address from a received packet.
Changed
- Improved code style and structure.
- Made
NullPrint::availableForWrite()returnINT_MAXinstead of zero. - Changed
EthernetUDP::stop()to not clear the current packet. - Changed
DNSClient::hostByName()functions to use a default value ofQNETHERNET_DEFAULT_DNS_LOOKUP_TIMEOUTfor the timeout parameter. - Improved SimplePing example to catch DNS lookup errors.
- Changed ping send enable macro to
QNETHERNET_ENABLE_PING_SENDfromQNETHERNET_ENABLE_PING. - Updated to support C++11 and C11 compilers.
- Improved setting of
errno. - Added
printfchecking toPrintDecorator. - Replaced function-like-macros with
static inlineC functions. - Renamed
QNETHERNET_ENABLE_ALTCP_DEFAULT_FUNCTIONSmacro toQNETHERNET_PROVIDE_ALTCP_DEFAULT_FUNCTIONS. EthernetUDPandEthernetFramenow share some common circular buffer code in an internal utility class.- Replaced macros in
EthernetClientwith inline functions.
Fixed
- Fixed
EthernetUDPinternal packet clear to reset all variables. - Now keeping any manually-set link UP state sticky so that the driver can choose not to set it to DOWN.
- Updated Ping and SimplePing examples to work with other systems by changing use of
elapsedMillistounsigned longplus calculations. - Fixed
ConnectionManager::iterateConnections()calls to not callEthernet.loop()in the callback because that could potentially invalidate the iterator. Also added notes about potential iteration invalidation to theiterateConnections()anditerateListeners()docs. - Fixed
EthernetClientread()andpeek()to return the correct value if not connected.
0.33.1
Fixed
- Added missing src/qnethernet/platforms/pgmspace.h file.
0.33.0
Added
- Added a way to iterate over the internal TCP connection PCBs.
- Added calls to
Ethernet.loop()in more places. - Added setting
errnotoENETDOWNinEthernetClassin more places where network initialization is checked. - Added setting
errnotoENOSYSwhen some networking feature isn't implemented. - Added support for ping (ICMP echo).
- Added two ping examples: Ping and SimplePing.
- Added new configuration and default macros to qnethernet_opts.h:
QNETHERNET_ENABLE_PINGQNETHERNET_DEFAULT_PING_IDQNETHERNET_DEFAULT_PING_TIMEOUTQNETHERNET_DEFAULT_PING_TTL
Changed
- Made
qnethernet_hal_get_system_mac_address(mac)weak. - Made
EthernetClass::hostByName(hostname, result)const. - Made
qnethernet_hal_get_system_mac_address(mac)weak. - Improved code style and structure.
- Changed
errnovalue inEthernetClass::joinGroup(ip)if network is not initialized toENETDOWNfromENOTCONN. - Updated lwIP to latest master (4599f551).
0.32.0
Added
- Added
qnethernet_hal_micros(). - Added secure TCP initial sequence numbers (ISNs), enabled with the new
QNETHERNET_ENABLE_SECURE_TCP_ISNmacro. The default is enabled.
Changed
- Changed some functions to take a
void*instead of auint8_t*. - Changed definition of
TCP_MSSto be based onMTUinstead of being a constant. - Updated LinkWatcher example to only print detectable details.
Fixed
- Restored automatic entropy initialization when including
qnethernet/security/RandomDevice.h. Callingqnethernet_hal_entropy()orqnethernet_hal_fill_entropy()will generate random values again without a prior call toqnethernet_hal_init_entropy()orRandomDevice::instance(). This also affects lwIP's internalLWIP_RAND().
0.31.0
Added
- Added
qnethernet_hal_fill_entropy(buf, size)for filling a buffer with random values. - Added
EthernetClient::setConnectionTimeoutEnabled(flag)to enable or disable blocking with calls toconnect(...)andstop(). This supersedes calls toconnectNoWait(...)andclose(). Also addedisConnectionTimeoutEnabled(). - Added templated versions of
util::writeFully()andutil::writeMagic()that use a break function that static_casts a given object to abool. - Added
EthernetClient::connecting()for determining if the client is still in the process of connecting during a non-blocking connect.
Changed
- Remove internal uses of
StringfromMDNSClassand replace them with char arrays. - Updated Mbed TLS version mentions to 2.28.9 from 2.28.8.
- Made
EthernetClient::isNoDelay()const. - Disallow compilation for Teensyduino < 1.59 because there's no support for casting a
const IPAddressto auint32_tor for equality-comparing them. - Replaced
EthernetClient::writeFully(const char *, size_t)andwriteFully(const uint8_t *, size_t)withwriteFully(const void *, size_t). - Updated the file structure to put most sources underneath src/qnethernet/.
- Changed
EthernetClient::setConnectionTimeout(timeout)andconnectionTimeout()to use 32-bit values. - Renamed
qnethernet_hal_rand()andqnethernet_hal_init_rand()toqnethernet_hal_entropy()andqnethernet_hal_init_entropy(), respectively. - Changed the non-entropy version of the entropy functions in the HAL to use
std::minstd_randinstead ofstd::rand()andstd::srand(). - Changed uses of "www.example.com" to "www.google.com" in the examples and tests.
Fixed
- Now using
(void)instead of()for all C function declarations because()doesn't mean "no parameters" in C. - Fixed
driver_unsupported'sdriver_init(void)parameters to be empty.
0.30.1
Fixed
- Fixed wait-for-close for non-altcp connections.
0.30.0
Added
- Added a SimpleHTTPClient example.
- Added a way to get the driver capabilities:
EthernetClass::driverCapabilities()anddriver_get_capabilities(dc). - Added a way to get the library version:
EthernetClass::libraryVersion(). - New
QNETHERNET_DO_LOOP_IN_YIELDconfiguration macro for indicating that the library should attempt to hook into or overrideyield()to callEthernet.loop(). - New version of
receiveQueueSize()inEthernetUDPandEthernetFramethat returns the number of unprocessed packets or frames. - Added
droppedReceiveCount()andtotalReceiveCount()toEthernetUDPandEthernetFrame. - Added
driver_set_link_speed(speed)anddriver_set_link_full_duplex(flag). - Added
EthernetClass::renewDHCP(). - Added
EthernetClass::interfaceName(). - Added
setOutgoingTTL(ttl)andoutgoingTTL()functions for modifying and accessing the TTL field, respectively, in the outgoing IP header, toEthernetClientandEthernetUDP. - Added
EthernetUDP::receivedTTL()for retrieving the TTL value of the last received packet. - Added "Compatibility with other APIs" section to the README.
Changed
- Separated setting the MAC address from driver initialization.
- Changed the netif name to "en0".
- Added macro-gated calls to
Ethernet.loop()after anyyield()s in case an overridden version doesn't call this. This affects:DNSClient::getHostByName()EthernetClass::waitForLink()EthernetClass::waitForLocalIP()EthernetClient::connect()EthernetClient::stop()
- Updated example
yield()implementation notes for non-EventResponder versions. - Changed
setReceiveQueueSize(size)tosetReceiveQueueCapacity(capacity)andreceiveQueueSize()toreceiveQueueCapacity()in bothEthernetUDPandEthernetFrame. - Updated
QNETHERNET_ENABLE_RAW_FRAME_LOOPBACKbehaviour to also check for the broadcast MAC addresses. - Added
FLASHMEMto some driver functions. - Changed
EthernetClassandMDNSClasshostname()function to return aconst char *instead of aString. - Now always setting the DNS in
EthernetClass::begin(ip, mask, gateway, dns), even if it's zero. - Use rename instead of end-then-start when the netif has already been added, in
MDNSClass::begin(hostname). - DHCP is started when just the IP address is the "any" address instead of all of the IP address, netmask, and gateway.
begin(ip, mask, gateway, dns)now always sets the DNS address.Ethernet.broadcastIP()now returns 255.255.255.255 if Ethernet is not initialized.
Removed
- Removed
EthernetClass::isLinkStateDetectable()in favour of the driver capabilities. - Removed
get_uint32(ip)utility function because astatic_cast<uint32_t>()is sufficient.
Fixed
- Fixed iperf v2 tests by commenting out per-block settings compare.
- Fixed restarting the netif by also bringing the link down.
- Fixed a bug related to closing a TCP socket when using altcp.