--- l2_ut_sa.h 2001/09/13 20:27:56 1.6
+++ l2_ut_sa.h 2001/09/14 19:06:40 1.7
@@ -1,10 +1,10 @@
/*
-** L2 - OSSP Logging Library
+** SA - OSSP Socket Abstraction Library
** Copyright (c) 2001 The OSSP Project (http://www.ossp.org/)
** Copyright (c) 2001 Cable & Wireless Deutschland (http://www.cw.com/de/)
**
-** This file is part of OSSP L2, a flexible logging library which
-** can be found at http://www.ossp.org/pkg/l2/.
+** This file is part of OSSP SA, a socket abstraction library which
+** can be found at http://www.ossp.org/pkg/sa/.
**
** Permission to use, copy, modify, and distribute this software for
** any purpose with or without fee is hereby granted, provided that
@@ -24,11 +24,11 @@
** OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
** SUCH DAMAGE.
**
-** l2_ut_sa.h: socket abstraction library
+** sa.h: socket abstraction API
*/
-#ifndef __L2_UT_SA_H__
-#define __L2_UT_SA_H__
+#ifndef __SA_H__
+#define __SA_H__
#include <string.h>
#include <sys/types.h>
@@ -49,25 +49,30 @@
SA_ERR_INT
} sa_rc_t;
-sa_rc_t sa_u2a (sa_addr_t **asaa, const char *uri, ...);
+/* address operations */
+sa_rc_t sa_u2a (sa_addr_t **saa, const char *uri, ...);
sa_rc_t sa_s2a (sa_addr_t **saa, const struct sockaddr *sabuf, socklen_t salen);
sa_rc_t sa_a2u (const sa_addr_t *saa, char **uri);
sa_rc_t sa_a2s (const sa_addr_t *saa, struct sockaddr **sabuf, socklen_t *salen);
+/* object operations */
sa_rc_t sa_create (sa_t **sa);
sa_rc_t sa_destroy (sa_t *sa);
+/* parameter operations */
sa_rc_t sa_timeout (sa_t *sa, long sec, long usec);
sa_rc_t sa_buffers (sa_t *sa, size_t rsize, size_t wsize);
+/* connection operations */
sa_rc_t sa_bind (sa_t *sa, sa_addr_t *laddr);
sa_rc_t sa_connect (sa_t *sa, sa_addr_t *raddr);
sa_rc_t sa_listen (sa_t *sa, int backlog);
sa_rc_t sa_accept (sa_t *sa, sa_addr_t **caddr, sa_t **csa);
-
sa_rc_t sa_getremote(sa_t *sa, sa_addr_t **raddr);
sa_rc_t sa_getlocal (sa_t *sa, sa_addr_t **laddr);
+sa_rc_t sa_shutdown (sa_t *sa, char *flags);
+/* input/output operations */
sa_rc_t sa_read (sa_t *sa, char *buf, size_t buflen, size_t *bufdone);
sa_rc_t sa_readfrom (sa_t *sa, char *buf, size_t buflen, size_t *bufdone, sa_addr_t **raddr);
sa_rc_t sa_readline (sa_t *sa, char *buf, size_t buflen, size_t *bufdone);
@@ -75,7 +80,6 @@
sa_rc_t sa_writeto (sa_t *sa, const char *buf, size_t buflen, size_t *bufdone, sa_addr_t *raddr);
sa_rc_t sa_printf (sa_t *sa, const char *fmt, ...);
sa_rc_t sa_flush (sa_t *sa);
-sa_rc_t sa_shutdown (sa_t *sa, char *flags);
-#endif /* __L2_UT_SA_H__ */
+#endif /* __SA_H__ */
|