OSSP CVS Repository

ossp - History for /ossp-pkg/sa/sa.c
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Directory]  [Show Milestones

DateVersion Description
2006-Jun-10 12:00    1.92    Check-in [5414]: Adjusted all copyright messages for year 2006 By rse. (diff)
2005-Oct-03 10:16    1.91    Check-in [5218]: Removed SA_SYSCALL_GETHOSTBYNAME because gethostbyname(3) cannot be overridden as at is use point (function sa_addr_u2a) the sa_t object is not available. Additionally, for IPv6 getaddrinfo(3) would have been overridden, too. This fixed compilation on platforms without IPv6 APIs. By rse.
2005-Mar-29 21:24    1.90    Check-in [5041]: Follow FlexeLint suggestions and "constify" some API function parameters. By rse. (diff)
2005-Jan-29 09:17    1.89    Check-in [4990]: Fix timeout handling in various functions by fixing the internal select(2) usage: the timeout structure is (standard compliantly) modified in place on some platforms (like Linux), so its values have to be preserved before calls to select(2)).

Problem found by: Robert Wood <Robert.Wood@smdc.army.mil> By rse. (diff)

2005-Jan-24 16:10    1.88    Check-in [4981]: welcome 2005 in OSSP sa, too By rse. (diff)
2004-Oct-03 16:49    1.87    Check-in [4736]: Do not pass NULL directly to variadic functions because NULL is not guarrantied to be a pointer. By rse. (diff)
2004-Oct-03 16:00    1.86    Check-in [4734]: Added SA_SYSCALL_GETHOSTBYNAME for supporting the overloading of gethostbyname(2) system calls. By rse. (diff)
2004-Jun-26 13:38    1.85    Check-in [4608]: o Provide Autoconf check (AC_CHECK_VA_COPY) for va_copy(d,s) macro and fallback implementations and now that we can be sure that va_copy() exists for us, use it in var_formatv() and ts.c instead of the direct assignments (which are not sufficiently portable).

o Remove "#undef socklen_t" from sa.h because the socklen_t fallback is a "typedef" since a longer time. By rse. (diff)

2004-Jun-26 13:16    1.84    Check-in [4605]: Allow negative values for SA_OPTION_LINGER to cover the special case of l_onoff=1/l_linger=0 where a TCP RST based connection termination is performed on close(2).

Submitted by: Alexandre Balaban <abalaban@free.fr> By rse. (diff)

2004-Jun-11 12:30    1.83    Check-in [4599]: Fix timeout implementation related to SO_RCVTIMEO/SO_SNDTIMEO. By rse. (diff)
2004-Apr-02 20:49    1.82    Check-in [4481]: remember the reason directly in the source, too By rse. (diff)
2004-Apr-02 20:47    1.81    Check-in [4480]: In sa_connect() also select(2) on the socket if EINTR was returned similar to what is done already for EINPROGRESS, because one is not allowed to re-start connect(2) according to STEVENS (Unix Network Programming, volume 1, section 5.9) but instead have to perform the same post-processing under EINTR (under both timeout and non-timeout situations) what we already did for EINPROGRESS (in timeout-aware situation). By rse. (diff)
2004-Apr-02 20:21    1.80    Check-in [4478]: Adjusted all copyright messages for new year 2004. By rse. (diff)
2004-Apr-02 14:26    1.79    Check-in [4473]: restart accept(2) after interrupted system call By thl. (diff)
2004-Mar-26 17:57    1.78    Check-in [4466]: add more compiler warning options and fix prototype declarations found by -Wstrict-prototypes By thl. (diff)
2004-Mar-26 17:05    1.77    Check-in [4461]: Add autoconf check to detect unimplemented setsockopt features. Reported by Amos Gouaux. By thl. (diff)
2004-Feb-17 10:21    1.76    Check-in [4435]: correct spelling: privileges, convenient; By thl. (diff)
2003-Nov-10 19:52    1.75    Check-in [3674]: be consistent in quoting ;-) By rse. (diff)
2003-Feb-07 21:47    1.74    Check-in [3181]: Add internal address resolving support via the new IEEE Std 1003.1g-2000 ("POSIX.1") getaddrinfo(3) API. This especially provides more portable IPv6 address resolving. By rse. (diff)
2003-Jan-06 14:11    1.73    Check-in [3067]: - Adjusted all copyright messages for new year 2003. - Fixed generated owner in distribution tarball. - Prepare for 1.0.3 release By rse. (diff)
2002-Nov-28 16:42    1.72    Check-in [2917]: fix a few bugs, remove a lot of warnings; all found by splint By rse. (diff)
2002-Nov-14 09:54    1.71    Check-in [2818]: be pedantic about unused variables By rse. (diff)
2002-Nov-07 13:44    1.70    Check-in [2751]: Make sure that "va_list" variables are not compared against NULL because this is not possible on all platforms. By rse. (diff)
2002-Nov-07 13:17    1.69    Check-in [2750]: Ported to brain-dead OpenUNIX where shutdown(3)'s SHUT_XX values are not easily available and where variables named sa_len conflict with structure fields in vendor headers. By rse. (diff)
2002-Nov-07 07:24    1.68    Check-in [2746]: Fixed two compile-time warnings.

Submitted by: Alvaro Lopez Ortega <alvaro@alobbs.com> By rse. (diff)

2002-Oct-31 08:20    1.67    Check-in [2704]: Consistently return SA_ERR_MEM instead of SA_ERR_SYS if memory allocations failed. By rse. (diff)
2002-Oct-30 21:22    1.66    Check-in [2701]: API Cleanups: use politically correct use "extern" keyword in sa.h; use leading underscores for variables names in prototypes; move "raddr" argument to second position in sa_{send,recv,sendf}. By rse. (diff)
2002-Oct-30 20:09    1.65    Check-in [2694]: Added a function sa_sendf(3) which is a convience wrapper to sa_send(3) for sending formatted data. This is similar to what sa_writef(3) does for sa_write(3).

The difference is just that sa_writef(3) does not need a temporary buffer (because can use the stream I/O write buffer) while sa_sendf(3) requires a temporary buffer for its operation. Nevertheless the temporary buffer is allocated only if the formatted data is large. For small formatted data a fast stack-based buffer is used for higher performance. By rse. (diff)

2002-Oct-30 10:21    1.64    Check-in [2688]: flush write buffer on write-side shutdown By rse. (diff)
2002-Oct-30 09:42    1.63    Check-in [2686]: Rewrote the implementation of sa_option(3) in order to make options configurable before the underlying socket is implicitly allocated. This fixes especially sa_option(sa, SA_OPTION_REUSEADDR, 1) before sa_bind(). By rse. (diff)
2002-Oct-26 17:45    1.62    Check-in [2677]: strip trailing whitespaces By rse. (diff)
2002-Oct-26 13:11    1.61    Check-in [2676]: be smart enough also for people who cannot read By rse. (diff)
2002-Oct-25 17:27    1.60    Check-in [2668]: Fix error processing logic in sa_read().

Submitted by: Ulrich Dessauer <udessauer@agnitas.de> By rse. (diff)

2002-Oct-11 17:27    1.59    Check-in [2566]: - fix inet_ntoa(3) usage - fallback to usage of inet_addr(3) if inet_aton(3) does not exists - add casts for arguments to [gs]etsockopt(3) to shut down warnings

(This especially gets OSSP sa running under dead Solaris 2.6...) By rse. (diff)

2002-Mar-15 11:47    1.58    Check-in [2017]: polishing for release By rse. (diff)
2002-Mar-07 12:51    1.57    Check-in [1963]: Hell, why did the compiler not complain? The ctx stuff is only allowed to be used if real output is written. Hmmmm... By rse. (diff)
2002-Mar-07 12:23    1.56    Check-in [1962]: Oops, the NUL-terminating check is done later, so do not destroy it by already reducing the size in advance. Else an exactly sized buffer (including space for the NUL-termination) would result in an unexpected error. By rse. (diff)
2002-Jan-30 17:43    1.55    Check-in [1721]: add optional OSSP ex based exception handling support By rse. (diff)
2002-Jan-29 13:48    1.54    Check-in [1684]: cleanups triggered by Intel ICC By rse. (diff)
2002-Jan-27 21:43    1.53    Check-in [1669]: Ops, an else was killed... add it again By rse. (diff)
2002-Jan-27 21:42    1.52    Check-in [1668]: Linux does not have SA_OPTION_REUSEPORT, so use this optionally only. By rse. (diff)
2002-Jan-02 14:53    1.51    Check-in [1487]: fix syntax By rse. (diff)
2002-Jan-02 14:52    1.50    Check-in [1486]: rewrite with a more readable switch() statement By rse. (diff)
2002-Jan-02 14:44    1.49    Check-in [1485]: add support for lingering on close By rse. (diff)
2002-Jan-02 14:35    1.48    Check-in [1484]: add support for reusability of address or port By rse. (diff)
2002-Jan-02 14:27    1.47    Check-in [1483]: complain if no socket is available for SA_OPTION_NONBLOCK By rse. (diff)
2002-Jan-02 14:21    1.46    Check-in [1482]: ops, syntax error By rse. (diff)
2002-Jan-02 14:20    1.45    Check-in [1481]: first cut for PF_XXX usage By rse. (diff)
2002-Jan-02 14:08    1.44    Check-in [1480]: conditionalize variable, too. By rse. (diff)
2002-Jan-02 14:08    1.43    Check-in [1479]: use faster IPPROTO_XXX instead of getprotobyname if available By rse. (diff)
2002-Jan-02 13:43    1.42    Check-in [1478]: bump copyright year By rse. (diff)
2002-Jan-02 13:33    1.41    Check-in [1476]: ops, uninitialized variable. By rse. (diff)
2002-Jan-02 13:31    1.40    Check-in [1475]: add support for optional port matching By rse. (diff)
2001-Oct-31 21:42    1.39    Check-in [1241]: Make sure we import only supported addresses on sa_addr_s2a(). By rse. (diff)
2001-Oct-31 13:41    1.38    Check-in [1229]: - provide additional SA_ERR_IMP result code for indicating that an implementation part is not available on the current platform.

- provide new sa_option() function for setting various socket options.

- implement SA_OPTION_NAGLE (for enabling/disabling Nagle's Algorithm) and SA_OPTION_NONBLOCK (for enabling/disabling non-blocking I/O mode). By rse. (diff)

2001-Oct-31 12:45    1.37    Check-in [1228]: Improve performance by only flushing the output buffer of we really read from the socket. If we fulfill the request with data from the user-space buffer we now no longer force a flush of the output buffer. By rse. (diff)
2001-Oct-24 14:11    1.36    Check-in [1206]: Add support for ACLs with "IPv4-mapped IPv6 addresses" (e.g. "::ffff:") as defined by RFC 2373. This is important for security reasons because these are IPv6 addresses but which have to match incoming IPv4 addresses in ACLs. By rse. (diff)
2001-Oct-24 13:43    1.35    Check-in [1205]: fix socket descriptor handling in case of connect errors By rse. (diff)
2001-Oct-24 13:23    1.34    Check-in [1204]: Enhance/Bugfix IPv6 address handling. By rse. (diff)
2001-Oct-11 17:20    1.33    Check-in [1159]: make prefixlen=0 a real wildcard By rse. (diff)
2001-Oct-11 17:12    1.32    Check-in [1158]: - Fix Unix Domain socket handling in case of unbound remote side.

- Simplified family detection in sa_addr_s2a() in order to correctly support again the situation of unbound remote Unix Domain sockets.

- Fixed sa_readln() return code semantics by passing through sa_read() return value. By rse. (diff)

2001-Oct-11 16:36    1.31    Check-in [1157]: fix two nasty bugs By rse. (diff)
2001-Oct-10 21:32    1.30    Check-in [1150]: support for ssize_t fallback By rse. (diff)
2001-Oct-10 17:40    1.29    Check-in [1145]: complain on 'unix:' (no path) By rse. (diff)
2001-Oct-10 11:21    1.28    Check-in [1142]: Revert my idea of using an L2-style error handling also in SA, because this is not possible in a consistent way due to the multiple objects and the fact that we cannot remember anything without an object (in L2 an environment object will be introduced soon, so there is it is a different game). So we use a plain sa_error() which is now similar to strerror(3). By rse. (diff)
2001-Oct-10 11:05    1.27    Check-in [1141]: Woohoooo, fully revamp formatting stuff:

- evolve sa_mvsnprintf() into an sa_mvxprintf() which 1. is output independent 2. support especially no-output mode (length determination only) 3. performs better by output plain text in largest possible chunks 4. does output operation only once in the loop (smaller code-size)

- write a new sa_mvsnprintf() for buffer output based on sa_mvxprintf()

- change sa_writef() from brain-dead and problematic "first format anything into temporary buffer following by a single write" to the expected "format on-the-fly into the SA_BUFFER_WRITE and if not enough space exists, write directly to the socket". By rse. (diff)

2001-Oct-10 09:42    1.26    Check-in [1138]: Change

   sa_rc_t sa_buffers      (sa_t *sa, size_t rsize, size_t wsize);

to sa_rc_t sa_buffer (sa_t *sa, sa_buffer_t id, size_t size);

in order to make this API function more flexible. By rse. (diff)

2001-Oct-09 22:19    1.25    Check-in [1137]: [still untested stuff]

- Remove SA_TIMEOUT_RECV and SA_TIMEOUT_SEND, because SA_TIMEOUT_READ and SA_TIMEOUT_WRITE are sufficient because you cannot use datagram and stream communication at the same time anyway. So there is no need to distinguish between the two communications in timeouts. Additionally this enables the next point from being able to be implemented at all.

- Implement the read/write timeouts alternatively in kernel-space through the newer SO_RCVTIMEO and SO_SNDTIMEO socket options. This means a select(2) system call less for each read/write operation. By rse. (diff)

2001-Oct-09 21:58    1.24    Check-in [1134]: According to STEVENS' "Unix Network Programming, Vol.1" (p.412) we have to close the socket if a connection timeout occured to make sure that the TCP three-way handshake does not proceed further. By rse. (diff)
2001-Oct-09 20:55    1.23    Check-in [1132]: - error text cleanup - allow "sa_t *" to be NULL By rse. (diff)
2001-Oct-09 20:38    1.22    Check-in [1131]: cosmetics only. By rse. (diff)
2001-Oct-09 20:37    1.21    Check-in [1130]: cosmetics only. By rse. (diff)
2001-Oct-09 20:36    1.20    Check-in [1129]: cosmetics only. By rse. (diff)
2001-Oct-09 20:34    1.19    Check-in [1128]: Change return code semantic for timeouts from "rv == SA_ERR_SYS && errno == ETIMEDOUT" to a dedicated timeout return value "rv == SA_ERR_TMT". By rse. (diff)
2001-Oct-09 20:26    1.18    Check-in [1126]: support relative paths for 'unix:path' By rse. (diff)
2001-Oct-09 16:58    1.17    Check-in [1123]: bugfix sa_addr_match() By rse. (diff)
2001-Oct-09 16:05    1.16    Check-in [1122]: Support prefixlen == 0 for an "always matches" and instead use prefixlen == -1 for "full match". Credits to Thomas ;) By rse. (diff)
2001-Oct-09 15:19    1.15    Check-in [1120]: Implement new sa_addr_match() function which can be used for Access Control List (ACL) implementations. It is capable of matching Unix Domain and Internet Addresses (both IPv4 and IPv6) with prefix lengths. By rse. (diff)
2001-Oct-08 17:15    1.14    Check-in [1111]: support IPv6 addresses By rse. (diff)
2001-Oct-08 15:37    1.13    Check-in [1102]: clone parameters on sa_accept() By rse. (diff)
2001-Oct-08 12:03    1.12    Check-in [1097]: Various cleanups By rse. (diff)
2001-Oct-07 17:21    1.11    Check-in [1096]: Implement (still fully untested!) system call overriding support through a new function sa_syscall(). Anybody here who finds predestinated to test this out in depth? By rse. (diff)
2001-Oct-07 16:16    1.10    Check-in [1094]: Provide distinct timeouts, i.e., an own timeout for each individual I/O function. This is especially useful because an accept(2) timeout is usually something totally different than a connect(2) timeout. By rse. (diff)
2001-Oct-06 18:01    1.9    Check-in [1093]: Add sa_error() function. By rse. (diff)
2001-Oct-05 22:52    1.8    Check-in [1083]: Woohhhooo: Second major revamp of Socket Abstraction (SA) library. This time is gets really close to a 100% clean and polished library. By rse. (diff)
2001-Oct-05 15:19    1.7    Check-in [1081]: fix sa_connect() if no timeout is set By rse. (diff)
2001-Oct-05 15:17    1.6    Check-in [1079]: Support fully unbuffered I/O and make this the default. By rse. (diff)
2001-Oct-05 13:48    1.5    Check-in [1075]: use snprintf(3) if exists By rse. (diff)
2001-Oct-05 13:40    1.4    Check-in [1074]: Major revamp of SA library in order to support Unix Domain sockets. - "{tcp,udp}://host:port" addresses are now "inet://host:port" addresses - "unix:/path/to/socket" is the address for Unix Domain sockets - sa_type() was introduced which sets socket type to stream or datagram By rse. (diff)
2001-Oct-04 13:25    1.3    Check-in [1067]: Change sa_addr_t API: - there is now a constructor and destructor - renamed sa_x2x functions to sa_addr_x2x By rse. (diff)
2001-Oct-03 21:40    1.2    Check-in [1062]: - Use an own minimal snprintf(3) - Rename sa_printf to sa_writef By rse. (diff)
2001-Oct-02 15:27    1.1    Check-in [1049]: Initial revision By rse.
2001-Oct-02 15:27    Check-in [1048]: Import first cut of OSSP SA By rse.

CVSTrac 2.0.1