Releases: ssilverman/QNEthernet
Releases · ssilverman/QNEthernet
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.
0.29.1
Fixed
- Fixed being able to process more than one incoming frame in a row in the driver.
0.29.0
Added
- Added protected access to the internal
std::FILE*stream in theStdioPrintutility class. - Added more unit tests:
- test_ethernet:
- test_server_zero_port
- test_server_accept
- test_server_construct_int_port
- test_ethernet:
- Added
printfformat string checking forPrint-derived classes. As of this writing, Teensyduino (1.59) and other platforms don't do compiler checking forPrint::printf. - Added more support for
errno. Appropriate functions will set this after encountering an error. - Added tests for the Arduino-API
begin(...)functions. - Added a way to utilize an externally-defined driver.
- Added
driver_is_mac_settable()to the driver API. This checks if the MAC address can be set.
Changed
- Updated and improved PixelPusherServer example.
- Call
qnethernet_hal_get_system_mac_address(mac)in the unsupported driver'sdriver_get_system_mac(mac)implementation. This enables MAC address retrieval for more platforms when communication isn't needed; Teensy 4.0, for example. - Turned the internal MAC address into an optional and simplified the
Ethernetconstructor. This change should make it easier to initialze a MAC address from a custom driver. - Changed Arduino-API non-DHCP
begin(...)functions to returnbool. - Improved driver logic so that lwIP options can be included in the driver headers.
- Improved
OSCPrinterexample to use the UDP data directly. - Renamed
driver_set_mac_address_allowed()todriver_set_incoming_mac_address_allowed(). - Changed
driver_proc_input(netif)to return apbuf*.
Fixed
- Fixed
EthernetServer::port()to return the system-chosen port if a zero value was specified. - Fixed
EthernetUDP::stop()to leave any multicast group joined when starting to listen on a multicast address. - Fixed MAC address restore if an Arduino-API non-DHCP
begin(...)call fails. - Fixed
EthernetClient::read()andpeek()to return -1 instead of 0 when there's no internal state. - Properly initializing multicast filtering so that it happens before
igmp_start(), which sets up the all-systems group.
0.28.0
Added
- Added raw frame loopback support and a
QNETHERNET_ENABLE_RAW_FRAME_LOOPBACKmacro to enable. - Added a fourth step to the MbedTLSDemo example instructions: modify the config.
- New
EthernetFrameClassfunctions:destinationMAC(),sourceMAC(),etherTypeOrLength(), andpayload(). - Consolidated all the hardware abstraction layer (HAL) functions into one place:
qnethernet_hal.cpp. - New
NullPrintandPrintDecoratorutility classes in theqindesign::network::utilnamespace. - Added
driver_is_link_state_detectable()function to the driver. This is for detecting whether the hardware is able to read the link state. - Added
EthernetClass::isLinkStateDetectable()to detect whether the driver is capable of detecting link state. - Added
setOutgoingDiffServ(ds)andoutgoingDiffServ()functions for modifying and accessing the differentiated services (DiffServ) field, respectively, in the outgoing IP header, toEthernetClientandEthernetUDP. - Added
EthernetUDP::receivedDiffServ()for retrieving the DiffServ value of the last received packet. - Added
EthernetFrameClass::clear()for clearing the outgoing and incoming buffers.
Changed
- Updated the Mbed TLS version in the README and comments to 2.28.8 (was 2.28.6).
- Updated
mbedtls_hardware_poll()in MbedTLSDemo example for other platforms. - Renamed
QNETHERNET_ENABLE_CUSTOM_WRITEtoQNETHERNET_CUSTOM_WRITE. - Improved the PixelPusherServer example.
- The address-changed callback is now called for independent IP address, netmask, and gateway changes.
- Improved link function documentation for
linkStatus(),linkState(), andisLinkStateDetectable(). - Updated
EthernetClient::setNoDelay(flag)to return whether successful. - Add another 2 to
MEMP_NUM_SYS_TIMEOUToption for mDNS, for a total of an additional 8. Timeout exhaustion was still observed with 6. Why 8 and not 7: - Updated
EthernetClient::connect()to return a Boolean value. (The function signatures don't change; they still return anint.) This matches the new definition at Ethernet - client.connect(). - Changed
EthernetClient::connectNoWait()return types tobool.
Fixed
- Improved marking of unused parameters.
- Fixed up use of
__has_include(), per: __has_include (The C Preprocessor) - In mDNS, ensure there's at least an empty TXT record, otherwise the SRV record doesn't appear.
- Make the alternative
yield()implementationextern "C". - Fixed
EthernetUDPdata copy for zero-length outgoing packets.pbuf_take()considers NULL data an error, so only copy the data if the packet's size is not zero.