Software Downloads – libslink v. 2.6 – Revision history

Release version 2.6 (2016.290)

  • Change host name resolution to use getaddrinfo() on all platforms except Windows. Support is now nearly ubiquitous. Still limited to IPv4 addresses.
  • Add Cygwin target to platforms and cleanup platform support.
  • Replace data sample unpacking routines from qlib2 with new routines developed from scratch in libmseed. All code is now LGPL licensed.
  • Add sl_msr_srcname() function to generate “Net_Sta_Loc_Chan[_Qual]”.
  • Switch to simpler SOCKET type defined as needed by platform includes or as int when not set.
  • Clarify/update licensing to be LGPLv3.
  • Cleanup Makefile (remove unused targets) and README, add INSTALL.
  • Support data sample unpacking with byte order specified in Blockette 1000, specifically allows little endian decoding. Thanks to patch by Yen Soon.
  • Port socket usage to portable SLP_SOCKET type, either int or SOCKET.
  • Change default use of lastpkttime to true (1) in sl_newslcd().
  • Quiet some MSVC warnings with a define suggested by Kevin Frechette.

Release version 2.4b (2013.305)

  • sl_read_streamlist(): Allow ! character in selectors field, this is allowed to negate selector(s). This routine is only used when parsing selections from a file.

Release version 2.4 (2012.152)

  • Integrate a patch from Jacob Crummey that adds support for data record lengths other than 512-byte. The client must know apriori the record lengths to expect, by default 512-byte record lengths are used and expected by all SeedLink clients, so this is only useful in particular situations (e.g. low latency data collection).

Release version 2.3 (2010.075)

  • Add BATCH mode support, patch from Andres Heinloo/GFZ.
  • Add protocol version check for BATCH command >= 3.1.
  • Increase header search length and hostname resolution buffer (GFZ).
  • Set protocol version to 3.1.

Release version 2.2c (2009.318)

  • Add proper string limit for snprintf() call in sl_msr_print().

Release version 2.2b (2009.050)

  • Add an include for sys/stat.h for Solaris in slplatform.h.

Release version 2.2 (2008.078)

  • Use io.h header instead of unistd.h on Win32.

Release version 2.1 (2008.028)

  • Convert all buffered IO file operations to unbuffered IO routines.
  • Add sl_readline() to genutils.c to read and return a line, defined by newline characters, from unbuffered IO, i.e. a file descriptor.
  • Add slp_openfile() to slplatform.[ch] to portably open files.
  • Change Makefile and src/Makefile to use user defined CC and CFLAGS.

Release version 2.0 (2007.284)

  • No version change
  • Use memchr() instead of strnstr() in network.c for portability.
  • Add globmatch.obj to Makefile.wat and Makefile.win.

Release version 2.0 (2007.282)

  • Add parsing of capability flags included with the server version string which is now expected to be in the format:
    • "SeedLink v#.# <optional text> <:: capability flags>".
    • Currently recognized capability flags:
      • SLPROTO:#.# SeedLink protocol version *** @CAP@ Supports CAPABILITY command
      • EXTREPLY Extended reply messages supported *** @NSWILDCARD@ Network & station code wildcarding
  • Add sending of CAPABILITY command after HELLO in say_hello() if the server supports the CAPABILITY command.
  • Add ability to recognize extended replies from the server, these are in the form of "Reply\rExtended Message\r\n", for example: "ERROR\rSTATION command requires 1 or 2 arguments\r\n".

Release version 1.8 (2007.179):

  • Add globmatch.[ch], includes a function to do glob matching.
  • Use glob matching in update_stream() when updating sequence numbers of packet streams received. This is needed to facilitate the * and ? wildcards in network and station codes.
  • Change update_stream() to update all the entries in the stream chain that match the given network and station code. This allows the situation where data from a given network-station pair is selected in two or more selectors to work properly with state files.

Release version 1.7 (2006.354)

  • No functionality changes since 1.6; only function, macro and struct name changes to avoid collisions with other libraries.

Release version 1.7rc2 (2006.344)

  • Add sl_ prefix to sl_strparse, sl_strncpclean and sl_gswap functions.
  • Add SL prefix to SLstrlist typedef and SL_SWAPBTIME macro.
  • No functionality changes, symbol renaming only.

Release version 1.7rc1 (2006.336)

  • Add sl_ prefix to SEED structures to avoid collision, changed structs: sl_blkt_head_s, sl_btime_s, sl_blkt_100_s, sl_blkt_1000_s, sl_blkt_1001_s, sl_fsdh_s.
  • Add sl_ prefix to the following routines to avoid collision with libmseed functions: sl_msr_new, sl_msr_free, sl_msr_parse, sl_msr_print, sl_msr_dsamprate, sl_msr_dnomsamprate, sl_msr_depochstime.
  • Add SL to the record structure and typedef which are now: struct SLMSrecord_s, typedef SLMSrecord.
  • No functionality changes, symbol renaming only.

Release version 1.6 (2006.028)

  • No changes, only update version.

Release version 1.6rc1 (2005.342)

  • Test for NULL pointers int logging.c routines and handle them as best as possible.
  • Add b to the mode of all fopen() calls; WIN32 then does not try to translate line endings.
  • Add createlinks.sh in doc directory to re-create symbolic links after CVS checkout.

Release version 1.5 (2005.103)

  • Fixup some in-line comments.
  • Add an SLP_PACKED defined to __attribute__ ((packed)) to slplatform.h when using the GCC compiler.
  • Use the SLP_PACKED attribute where needed for portability to the XScale (ARM) architecture. Thanks Andres.

Release version 1.5pre2 (2005.097)

  • Modify sl_addstream() to NOT check for duplicate streams.
  • Change Makefile and example/Makefile to include specific targets for gcc. By default $CC is used with the -O flag.

Release version 1.5pre1 (2005.089)

  • Add msr_dnomsamprate() to calculate the nominal sampling rate for an MSrecord, use it in msr_dsamprate().
  • Include calculated sample rate in Hz in msr_print() output.
  • Support for microsecond precision in record start time, including msr_print() and msr_depochstime().
  • 'host:port' parsing extended to include possibility of a single colon translating to 'localhost:18000'. The parsing is now:
    • ':' => 'localhost:18000'
    • '<host>' => '<host>:18000'
    • ':<port>' => 'localhost:<port>'
  • Better checking for termination during connection opening and negotiation, termination should occur without timeout expiration.
  • Use gswap routines instead of tswap routines.

Release version 1.4 (2004.222)

  • sl_connect will set the SLCD->terminate flag if a permanent error (invalid port specified) was detected. This way the sl_collect routines will not re-connect endlessly.
  • String termination bug fixed in the new sladdr parsing.
  • Remove sleep call in sl_collect().
  • Update the slclient example program.

Release version (2004.219):

  • Add sl_ping which connects to server, issues HELLO, receives response lines and disconnects.
  • sl_connect now does it’s own parsing of the sladdr string and fills in default hostname and port (localhost and 18000).
  • sl_connect now takes one more argument (int sayhello) which controls whether sl_sayhello is called after making the connection.

Release version 1.3 (2004.196)

  • Add a new class of log level for a total of three levels:
    • 0 : Normal log messages, defaulting to stdout with logprefix
    • 1 : Diagnostic messages, defaulting to stderr with logprefix
    • 2+ : Error messages, defaulting to stderr with errprefix
  • Go through library and change most log output to the diagnostic level, meaning most output will go to stderr with the exception of the msr_print() output which is logged at the 0 level.

Release version 2004.174:

  • sl_log_main: use fprintf instead of printf and change default destination for error messages to stderr. Log messages still go to stdout.
  • Change SLCD->server_version to SLCD->protocol_ver to better reflect what that value is or at least supposed to be.
  • Update Windows Makefile’s for the previous source file renaming changes.

Release version 1.2a (2004.170)

  • sl_recvresp: cast buffer to type (char ) so pointer arithmetic will work under compilers that do not assume void is char size (e.g. Sun cc).

Release version 1.2 (2004.168)

  • sl_collect[_nb]: process data in receive buffer even if connection is not in SL_DATA state, this means the buffer will be emptied even when the connection is not up.
  • sl_collect[_nb]: reset keepalive_trig after successfully connecting so a keepalive will not be sent directly after a re-connection.
  • sl_collect[_nb]: update timing variables every time unless data is received, termination is triggered or other early exit conditions appear; previously this was only done when more than a 1/4 second had elapsed.
  • libslink.h: remove the previous_time element from the SLstat type.
  • sl_collect: handle a failure of select() more elegantly by resetting the connection.
  • sl_collect: change strerror() to slp_strerror() for any errors with select() so the error will be correct under Win32.
  • msr_parse: free allocated MSrecord and set *ppmsr to NULL on errors in addition to returning NULL.
  • Change some boolean values to type int8_t.

Release version 2004.166

  • Correctly reset sendpacket flag in sl_collect[_nb]. Previously it might have been possible that data packets would be skipped if heartbeats were received while receiving a high rate of data packets. This behavior was never reported with this codebase; nevertheless it might be possible to exercise this bug with particularly written client code. Thanks Anthony Lomax.
  • Changed the sendpacket and terminator variables in sl_collect[_nb] to type int8_t as they’re only boolean values.
  • Rename sendpacket to retpacket in sl_collect[_nb] for clarity.
  • Rename source file slutils.c->genutils.c and main.c->slutils.c

Release version 2004.142

  • Do not send terminating NULL characters in command strings sent to the server. The protocol stipulates that commands must be terminated with a carriage return (\r) followed by an optional new line (\n). The library now strictly terminates commands with only a carriage return. Thanks Ernesto Del Prete.
  • Add sl_recvresp() to robustly receive responses from the server that are terminated with ‘\r\n’. This should improve usage when the server responds slowly or with longer responses to commands.
  • Use sl_recvresp() in say_hello() to get the two response lines and report them both.
  • Change argument 'code' to 'ident' in sl_*data() routines.

Release version 2004.131
  • Removed space from 'error sending' message in sl_senddata().
  • Add define for LIBSLINK_RELEASE with the date of release, e.g. “2004.131”.

Release version 1.1 (2004.125)

  • Make parsing of server version more generic and robust with a patch from Andres. The server response to HELLO is expected to be in the format 'seedlink v#.# <optional text>', if it’s not the server_version is set to 0.0 and the library will not check the server version when using advanced protocol features.

Release version 2004.118

  • Port and test under Mac OS X (Darwin) and add SLP_DARWIN define.
  • sl_request_info(): Print INFO request type when request is denied due to a pending request.
  • Update Makefile usage of ar to include the -s flag, this was needed under Darwin to build an index into the static library and is a good idea anyway.
  • Update Makefile to create symbolic links when shared/dynamic libraries are built.
  • Consolidate INSTALL and README files into just README.

Release version 1.0 (Yay!) (2003.309)

  • Add a missing include for Solaris.

Release version 1.0pre1 (2003.307)

  • Change slp_getaddrinfo() to use the reentrant gethostbyname_r() under glibc2 and Solaris. getaddrinfo() is only supported under Solaris 8 and later, and early glibc2 does strange things.
  • In slplatform.h define SLP_GLIBC2, SLP_SOLARIS or SLP_WIN32 based on the architecture.
  • Add a Makefile.wat (also for the example) for Open Watcom’s wmake utility.
  • Documentation updates.

Release version 0.9.6 (2003.280)

  • Add two new functions sl_log_rl() and sl_loginit_rl(); these are versions of the logging facility that work directly on a SLlog struct. If no SLlog is given to sl_log_rl() it will use the global logging parameters. If no SLlog is given to sl_loginit_rt() it will allocated space before initializing the parameters.
  • Update msr_parse() and msr_print() to take an SLlog (instead of an SLCD) for logging parameters and use the new sl_log_rl() internally.
  • Change the verbosity level of two messages as suggested by Andres.

Release version 0.9.5a (2003.276)

  • Add two new functions sl_log_r() and sl_loginit_r(); these are reentrant versions of the previous functions. Intended for use in threaded programs where the each thread can use it’s own logging scheme.
  • Updated most of the library logging to use sl_log_r with the appropriate SLCD, this required a small bit of re-arrangement including a change to the arguments for msr_parse() and msr_print() which now need a SLCD.

Release version 0.9.4 (2003.274)

  • Create slp_getaddrinfo(), this will use gethostbyname() on Win32 and getaddrinfo() on others. getaddrinfo is only supported in very recent Win32 platforms.
  • A few other tweaks for compiling under Win32.

Release version 0.9.3 (2003.273)

  • Making things thread safe/friendly:
  • Make a new SLstat struct to hold all persistent (static) state variables used in sl_collect[_nb](). Added a pointer to one of these in the SLCD. Also updated sl_newslcd() and sl_freeslcd() to support this.
  • Use getaddrinfo() instead of gethostbyname() in sl_connect().
  • Change update_stream() to extract FSDH information without using msr_parse(). Both faster and thread safe.
  • Change encoding_hash() to be reentrant and modify msr_print() to use it.

Release version 0.9.2 (2003.272)

  • Fix bug in slp_usleep().
  • Minor changes to strtoul() usage in sl_connect().
  • Add -lrt to the Solaris LDLIBS to get nanosleep().

Release version 0.9.1 (2003.262)

  • New portability function slp_usleep() sleeps for given micro seconds. Uses SleepEx under Win32 and nanosleep() for others.
  • Update sl_collect() and sl_collect_nb() to always return SLPACKET, SLTERMINATE or SLNOPACKET.
  • Reset some verbosity flags for uni-sta. negotiation, now it’s like multi-sta. negotiation.
  • Update to example/slclient.c, standard flag usage.

Release version 003.237

  • Change Makefile to use GCC by default and use -O2 optimization.
  • Fix some variable initializations.
  • Minor cleanups, move MAX_LOG_MSG_LENGTH to libslink.h.

Release version 0.9 (2003.182)

  • Move sl_sequence and sl_packettype into main.c from slutils.c.
  • Move doy2md() from main.c to sl_doy2md() in slutils.c and “export” it (i.e. declare it in libslink.h).
  • Add sl_doy2md() and strncpclean() to utils man page.
  • Remove barely used constants from libslink.h.

Release version 0.8.4 (2003.181)

  • Use only a single error indicator for bad Steim compression flags regardless of compression level. If the caller needs to know the level it is in the FSDH.
  • Rename the MSrecord element from unpackflag to unpackerr to avoid confusion with the argument to msr_parse().
  • Update the documentation to describe the new unpackerr flag.
  • Update a few non-standard func. declarations in slplatform.h

Release version 0.8.2 (2003.177)

  • Rename the MSheader struct to MSrecord to reflect the fact that the mini-system processes more than just the header.
  • Add an element to the MSrecord struct, 'unpackflag' that will be set by the unpacking routines to indicates errors.
  • Rename all the MSrecord related functions, now they are prefixed with 'msr_' for clarify/uniformity.
  • Change RECSIZE declaration in libslink.h to SLRECSIZE.
  • Remove unneeded main loop in sl_collect_nb(), it never loops.

Release version 2003.174

  • Change char *‘s to const char *‘s in save/recover state routines (patch from Andres).

Release version 0.8 (2003.169)

  • Minor updates to Makefile.win.
  • Change requested Windows Sockets version to 2.2.

Release version 2003.168

  • Include a man page for sl_dtime().
  • Many more small changes for portability to WIN32.
  • Include an Nmake compatible Makefile.win for building on WIN32.
  • Update the slclient.c example and include a Makefile.win to build it on a WIN32 platform.

Release version 2003.167

  • Change sl_readdata() and sl_writedata() to sl_recvdata() and sl_senddata() respectively. These new functions use the recv() and send() system calls for network socket operation; they are much more portable than read/write.
  • Create slplatform.c to hold portable functions, basically these are functions to provide a common interface to differing system implementations.
  • Rename slstdint.h to slplatform.h and use it for including platform specific headers.

Release version 0.7.2 (2003.163)

  • Include and use a slstdint.h header file to help deal with portability of the standard integer types. It’s a bit sparse right now.
  • Add resume flag to the SLCD to control the usage of sequence numbers with DATA/FETCH commands. Default is true.
  • Change char *‘s in logging routines to const char *‘s.
  • Change default use of lastpkttime to false in new_slcd().

Release version 0.7.1 (2003.162)

  • Change host_latency(), to use the new helper functions.
  • Add helper functions double_samprate() and depoch_starttime() to msheader.c
  • Change msrecord pointer (MSheader struct) to a const char pointer
  • Change argument for print_MSheader() from ‘header’ to ‘msheader’ for consistency with related functions.
  • Change sl_log() calls in print_MSheader() to use a verbosity level of 0 instead of 1. If print_MSheader() is called the ouput should be printed, period (the only exception is when the logging verbosity is less than 0).

Release version 0.7 (2003.157)

  • Changed the declaration of sl_collect(). Now a pointer to a pointer for an SLpacket is passed, when a packet is received this pointer is updated. sl_collect() now returns an integer giving more possibilities for return values. When a packet is received SLPACKET is returned (a positive integer), when an error or termination is occurs 0 is returned.
  • Added a non-blocking version of sl_collect() called, creatively, sl_collect_nb(). This acts the same as sl_collect() but, instead of blocking, will return SLNOPACKET (defined in libslink.h) when no data is available. This routine is considered experimental and not documented.

Release version 2003.156

  • Add terminate flag to the SLCD and include a sl_terminate() function to set it. Modify sl_connect() to close the connection, send remaining packets in buffer and finish with a NULL when this flag is set. Also modified the example client to use this new shutdown technique.
  • Add lastpkttime flag to the SLCD to indicate if the last packet time should be appended to the FETCH/DATA command during negotiation. Default is 1 (true).
  • Add numsamples element to the MSheader data type to indicate the actual number of data samples unpacked. If no unpacking is requested this is set to -1.
  • Declare unpack_* routines in unpack.c as static to avoid function name collision.
  • Use the const qualifier for char and SLCD types when no modification is done.
  • Standardize sl_freeslcd() function name.

Release version 0.6 (2003.083)

  • Fix memory leaks in parse_streamlist().

Release version 0.5 (2003.073)

  • Renaming for consistency and many cleanups.

Release version 0.1 (Early 2003)

  • Re-fit utility functions from slinktool for library usage.
  • Add lots of other useful functions including config (stream list) file reading, state file functions, Mini-SEED record parsing and data sample unpacking/decompressing, etc.
  • Write a short Users Guide and some man pages.
07:26:24 v.28f29ea9