=== liblxi v1.20 ===



Changes since liblxi v1.19:

Rob Carruthers:

 * refactor(bonjour): Fix typo & Refine browse default domain

 * feat(bonjour): Add mdns support for macOS

    This code is designed to discover LXI (LAN eXtensions for Instrumentation) devices using the Bonjour service (dns_sd.h) discovery protocol. The flow of the implementation is as follows:

    1. bonjour_discover(lxi_info_t *info, int timeout_ms) is the entry point of the code. It takes an lxi_info_t struct to store the discovered information and a timeout in milliseconds. It calls the browse_lxi_services() function with these parameters. The lxi_info_t is setup with callbacks to initially to recieve the discovered instrument data. See test folder for examples.

    2. lxi_info_t struct is defined in lxi.h.
    browse_lxi_services(lxi_info_t *info, int timeout_ms) iterates through lxi_services (defined in lxi.h) and calls the Bonjour DNSServiceBrowse() function for each service. It then processes the results and sets a timeout to stop waiting for results after a specified duration. It provides the browse_callback() function as a callback.

    3. browse_callback() is called for each discovered service. It extracts relevant information about the service and then creates a browse_data_t struct to aggregate service data. It calls DNSServiceResolve() to resolve the service's hostname, and provides resolve_callback() as a callback.

    4. resolve_callback() is called once the service hostname is resolved. It calls the resolve_ip_address() function to convert the hostname into an IP address. It also extracts more information about the service and then calls the info->service() callback function with the discovered service's information. Finally, it frees the memory allocated for the browse_data_t struct.

    5. resolve_ip_address() takes a hostname and port, and converts them into an IP address using the getaddrinfo() function. The resulting IP address is stored in the provided buffer.

    Service types and labels are declared in the lxi_services array in  src/lxc.c



Changes since liblxi v1.18:

 * Silence cast of function type in autogenerated vxi11 code

 * Add test example demonstrating how to use RAW protocol

 Rob Carruthers:

 * Docs: Update README with Homebrew installation instructions

 * macOS: Build support

 * macOS: Add check for RPC headers

 * macOS: Remove libtirpc dependency during build process



Changes since liblxi v1.17:

Alexander von Gluck IV:

 * build: make avahi optional again after meson conversion

   * matches readme again
   * liblxi is still usable, but it definitely
     takes some of the fun out of it.

 * vxi11: Drop non-portable pthread timeout call; solves #30

   * Convert to manually constructing a timedjoin
     wrapper which should work outside of Linux
   * Tested functional



Changes since liblxi v1.16:

Perry Hung:

 * vxi11: do not fail on zero length messages

   Zero length messages are valid replies in VXI-11. Do not return an error
   and prematurely exit.

   Reads should be repeated until EOI or an error is encountered.

Holzapfel:

 * Fixed missing VXI11 connect-abort multithreading synchronization

 * Fixed LXI connect error memory leak



Changes since liblxi v1.15:

 * Fix handling of send errors for TCP/RAW connections



Changes since liblxi v1.14:

 * Fix meson libtirpc dependency

   Remove the hardcoded include patch to libtirpc and replace it with one
   dynamically resolved via pkg-config.

   The reason for implementing the meson dependency check this way is to
   avoid linking with libtirpc because it is broken with regards to its Sun
   RPC implementation so instead we link with the RPC implementation which
   still reside in glibc. However, glibc removed their RPC header files so
   we need the headers from libtirpc.

   Further investigation is required to find and fix the bug in the
   libtirpc RPC implementation so we can get back to normal. They changed
   something moving it out of glibc and they shouldn't have.



Changes since liblxi v1.13:

 * Add lxi_discover_if() function

   Works exactly like the lxi_discover() function but adds an additional
   parameter ifname that specifies which network interface to broadcast on
   in case of using the DISCOVER_VXI11 discovery type.

 * Bypass linking with libtirpc because of bug

   When linking with libtirpc some of the VXI11 connect calls starts
   failing for some instruments. More investigation is needed to find out
   exactly why. It may be some regression in the libtirpc Sun RPC
   implementation. The Sun RPC features have recently been moved out of
   glibc into libtirpc.

   When we do not link with libtirpc we fallback to using glibc's
   implementation of the RPC features which seem to work better.

   We will accept this hack for now.

 * Remove include directory

 * Reduce compiler optimization level

 * Introduce proper Avahi timeout handling for mDNS

 * Increase number of allowed concurrent sessions

 * Fix timeout for VXI11 connect

   The VXI11 API does not provide any way to specify a communications
   timeout when connecting. To fix that we move the VXI11 connect action
   into a separate thread that is killed if the timeout is reached before
   the thread exits.

   The old behavior was that the connect action would eventually time out
   for instruments on known subnets.  However, if you tried to connect to
   an instrument on an unknown subnet it would stall forever.

   This new implementation will respect the timeout for all cases.

 * Replace autotools with meson

zramudzuli:

 * Added timeout for RAW/TCP connections



Changes since liblxi v1.12:

 * Fix Sun RPC headers configure check

   The Sun RPC headers have been moved out of glibc into a separate
   library, libtirpc.

   Hence, check for glibc headers first and in case that fails search for
   headers in libtirpc via pkg-config.

 * Add const qualifier

   Because it is the right thing to do.

 * Update Travis

 * Use libtirpc for Sun RPC headers

 * Move test directory



Changes since liblxi v1.11:

 * Add send/receive sanity checks

 * Strip CR from ID response string

   Fixes corrupted output from 'lxi discover'.



Changes since liblxi v1.10:

 * Fix mDNS/DNS-SD discover feature



Changes since liblxi v1.9:

 * Update Travis

 * Cleanup

 * Add --disable-avahi configure option

   Makes avahi mandatory unless --disable-avahi is provided.



Changes since liblxi v1.8:

 * Update AUTHORS

 * Convert tabs to spaces

 * Make API usable in C++

   As suggested by Dima Kogan, lets wrap the API so that it is usable in
   C++.

 * Only export lxi API specific functions

   Hide visibility of internal functions so that only the lxi API specific
   ones are exported/visible to applications linking with liblxi.

   These changes are applied on behalf of Dima Kogan.

 * Add discover fallback to request ID via HTTP/XML

   If retrieving the instrument ID fails via VXI-11 during discovery then
   try to retrieve the ID via the /lxi/identification XML file hosted by
   some instruments via HTTP.

   Adds dependency on libxml2.

Dmitri Goutnik:

 * Make code clang friendly, fix warnings



Changes since liblxi v1.7:

 * Fix lxi_connect() so it does not apply lock

   Some instruments fail to lock for exclusive access when creating a
   VXI-11 connection. So, to play it safe, we will simply not try to lock
   when setting up the connection.



Changes since liblxi v1.6:

 * Update to new URL

 * Update README

 * Update AUTHORS

 * Use HTTPS in the configure script

Jakub Wilk:

 * Fix typos



Changes since liblxi v1.5:

 * Update README

 * Add authors section in README

 * Add README.md to prettify GitHub page



Changes since liblxi v1.4:

 * Add support for mDNS/DNS-SD discovery

   Add parameter to lxi_discover() so it is possible to select discovery
   using VXI-11 or mDNS/DNS-SD.

   If detected available, Avahi is used as the mDNS/DNS-SD backend
   implementation.

 * Print errors to stderr

 * Update README



Changes since liblxi v1.3:

 * Fix discover output strings

   Discovery of multiple LXI instruments revealed a bug in the id string
   handling which results in garbled output strings. Adding missing string
   termination fixes this.

 * Add timeout handling for raw/TCP

 * Update examples

 * Cleanup

 * Update README

 * Add support for configurable protocol backends

   Reworked the code to support configurable protocol backends. Currently
   supported protocols include VXI11 and raw TCP. In the future support for
   HiSlip can be added.



Changes since liblxi v1.2:

 * Fix building with multiple jobs (make -jN, N>1)

 * Update README



Changes since liblxi v1.1:

 * Added AUTHORS file

 * Update COPYING

 * Update README

 * Update connect test

 * Improve lxi_connect() with device name and timeout

 * Make timeout error message human readable

   Lets explain the most common error, that is timeout, in a human readable
   format.

 * Fix timeout handling

 * Use thread-safe version of VXI11 function calls

 * Autogenerate VXI11 RPC functions

   Automatically generate VXI11 RPC functions instead of using bundled or
   system provided VXI11 library. This allows us to generate thread-safe
   versions of the VXI11 RPC functions in the future.



Changes since liblxi v1.0:

 * Fixed instrument not responding

   Use the default LAN Device Name of "inst0". Some instruments do not
   respond if this device name is not used.

 * Remove unused rpcgen tool check

 * Cleanup rpc header check

 * Add support for use of system VXI library

   Added configure option '--with-vxi=[internal/system]' which allows the
   user to decide whether to use the internally bundled VXI library or the
   VXI library provided by the system.

   By default the internal VXI library is used.



liblxi v1.0:

 * First release (stable)

