OSSP CVS Repository

ossp - Check-in [905]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 905
Date: 2001-Sep-10 08:43:10 (local)
2001-Sep-10 06:43:10 (UTC)
User:ms
Branch:
Comment: Bug fixes, cleanup, and removed makefile redundancies (see end.)
Tickets:
Inspections:
Files:
ossp-pkg/l2/Makefile.in      1.19 -> 1.20     4 inserted, 50 deleted
ossp-pkg/l2/l2_ch_socket.c      1.21 -> 1.22     7 inserted, 7 deleted
ossp-pkg/l2/l2_sockmon.c      1.5 -> 1.6     1 inserted, 3 deleted

ossp-pkg/l2/Makefile.in 1.19 -> 1.20

--- Makefile.in  2001/09/09 15:57:10     1.19
+++ Makefile.in  2001/09/10 06:43:10     1.20
@@ -139,6 +139,8 @@
         $(LIBTOOL) --mode=link --quiet $(CC) $(LDFLAGS) -o l2_test l2_test.o libl2.la $(LIBS)
 l2_test++: l2_test++.o libl2++.la
         $(LIBTOOL) --mode=link --quiet $(CC) $(LDFLAGS) -o l2_test++ l2_test++.o libl2++.la $(LIBS)
+l2_sockmon: l2_sockmon.o
+        $(LIBTOOL) --mode=link --quiet $(CC) $(LDFLAGS) -o l2_sockmon l2_sockmon.o $(LIBS)
 
 #   build Unix manual pages
 l2-config.1: l2-config.pod $(_VERSION_FILE)
@@ -284,55 +286,9 @@
 l2_channel.o: l2_channel.c l2.h l2_p.h
 l2_stream.o: l2_stream.c l2.h l2_p.h
 l2_test.o: l2_test.c l2.h
+l2_sockmon.o: l2_sockmon.c
 l2_version.o: l2_version.c l2_version.c
-l2_ch_buffer.o: l2_ch_buffer.c l2.h l2_p.h
-l2_ch_fd.o: l2_ch_fd.c l2.h l2_p.h
-l2_ch_file.o: l2_ch_file.c l2.h l2_p.h
-l2_ch_filter.o: l2_ch_filter.c l2.h l2_p.h
-l2_ch_null.o: l2_ch_null.c l2.h l2_p.h
-l2_ch_pipe.o: l2_ch_pipe.c l2.h l2_p.h
-l2_ch_prefix.o: l2_ch_prefix.c l2.h l2_p.h
-l2_ch_socket.o: l2_ch_socket.c l2.h l2_p.h
-l2_ch_syslog.o: l2_ch_syslog.c l2.h l2_p.h
-l2_channel.o: l2_channel.c l2.h l2_p.h
-l2_epreuve.o: l2_epreuve.c l2.h l2_p.h
-l2_stream.o: l2_stream.c l2.h l2_p.h
-l2_test.o: l2_test.c l2.h
-l2_ut_format.o: l2_ut_format.c l2.h l2_p.h
-l2_ut_param.o: l2_ut_param.c l2.h l2_p.h
-l2_version.o: l2_version.c l2_version.c
-l2_ch_buffer.lo: l2_ch_buffer.c l2.h l2_p.h
-l2_ch_fd.lo: l2_ch_fd.c l2.h l2_p.h
-l2_ch_file.lo: l2_ch_file.c l2.h l2_p.h
-l2_ch_filter.lo: l2_ch_filter.c l2.h l2_p.h
-l2_ch_null.lo: l2_ch_null.c l2.h l2_p.h
-l2_ch_pipe.lo: l2_ch_pipe.c l2.h l2_p.h
-l2_ch_prefix.lo: l2_ch_prefix.c l2.h l2_p.h
-l2_ch_socket.lo: l2_ch_socket.c l2.h l2_p.h
-l2_ch_syslog.lo: l2_ch_syslog.c l2.h l2_p.h
-l2_channel.lo: l2_channel.c l2.h l2_p.h
-l2_epreuve.lo: l2_epreuve.c l2.h l2_p.h
-l2_stream.lo: l2_stream.c l2.h l2_p.h
-l2_test.lo: l2_test.c l2.h
-l2_ut_format.lo: l2_ut_format.c l2.h l2_p.h
-l2_ut_param.lo: l2_ut_param.c l2.h l2_p.h
-l2_version.lo: l2_version.c l2_version.c
-l2_ch_buffer.lo: l2_ch_buffer.c l2.h l2_p.h
-l2_ch_fd.lo: l2_ch_fd.c l2.h l2_p.h
-l2_ch_file.lo: l2_ch_file.c l2.h l2_p.h
-l2_ch_filter.lo: l2_ch_filter.c l2.h l2_p.h
-l2_ch_null.lo: l2_ch_null.c l2.h l2_p.h
-l2_ch_pipe.lo: l2_ch_pipe.c l2.h l2_p.h
-l2_ch_prefix.lo: l2_ch_prefix.c l2.h l2_p.h
-l2_ch_socket.lo: l2_ch_socket.c l2.h l2_p.h
-l2_ch_syslog.lo: l2_ch_syslog.c l2.h l2_p.h
-l2_channel.lo: l2_channel.c l2.h l2_p.h
-l2_epreuve.lo: l2_epreuve.c l2.h l2_p.h
-l2_stream.lo: l2_stream.c l2.h l2_p.h
-l2_test.lo: l2_test.c l2.h
-l2_ut_format.lo: l2_ut_format.c l2.h l2_p.h
-l2_ut_param.lo: l2_ut_param.c l2.h l2_p.h
-l2_version.lo: l2_version.c l2_version.c
+
 l2_ch_buffer.lo: l2_ch_buffer.c l2.h l2_p.h l2_ut_pcre.h
 l2_ch_fd.lo: l2_ch_fd.c l2.h l2_p.h l2_ut_pcre.h
 l2_ch_file.lo: l2_ch_file.c l2.h l2_p.h l2_ut_pcre.h
@@ -343,9 +299,7 @@
 l2_ch_socket.lo: l2_ch_socket.c l2.h l2_p.h l2_ut_pcre.h
 l2_ch_syslog.lo: l2_ch_syslog.c l2.h l2_p.h l2_ut_pcre.h
 l2_channel.lo: l2_channel.c l2.h l2_p.h l2_ut_pcre.h
-l2_epreuve.lo: l2_epreuve.c l2.h l2_p.h l2_ut_pcre.h
 l2_stream.lo: l2_stream.c l2.h l2_p.h l2_ut_pcre.h
-l2_test.lo: l2_test.c l2.h
 l2_ut_format.lo: l2_ut_format.c l2.h l2_p.h l2_ut_pcre.h
 l2_ut_param.lo: l2_ut_param.c l2.h l2_p.h l2_ut_pcre.h
 l2_ut_pcre.lo: l2_ut_pcre.c l2_ut_pcre.h l2_ut_pcre_tab.c


ossp-pkg/l2/l2_ch_socket.c 1.21 -> 1.22

--- l2_ch_socket.c       2001/09/10 06:41:59     1.21
+++ l2_ch_socket.c       2001/09/10 06:43:10     1.22
@@ -36,15 +36,16 @@
 #include <arpa/inet.h>
 
 #include "l2.h"
+#include "l2_config.h"
 
-#define HAVE_INET_ATON
-#ifndef HAVE_INET_PTON
-#ifdef  HAVE_INET_ATON
+#if defined(HAVE_INET_PTON)
+#define l2_inet_pton inet_pton
+#elif defined(HAVE_INET_ATON)
 
 /******************************************************************
 IPv4 source used from Unix Network Programming by Richard STEVENS
  ******************************************************************/
-static int inet_pton(int iFamily, const char *pszAddress, void *pvMemref)
+static int l2_inet_pton(int iFamily, const char *pszAddress, void *pvMemref)
 {
     int             i             = 0;
     struct in_addr  IP4Addr;
@@ -82,7 +83,6 @@
 #else
 #error "neither inet_pton nor inet_aton available"
 #endif
-#endif
 
 /* declare private channel configuration */
 typedef struct {
@@ -154,7 +154,7 @@
         memset(&IP4Sockaddr,  0, sizeof(IP4Sockaddr));
 
         /* resolve host numerically */
-        if (inet_pton(AF_INET, cfg->pszHost, &IP4Sockaddr.sin_addr.s_addr) == 1) {
+        if (l2_inet_pton(AF_INET, cfg->pszHost, &IP4Sockaddr.sin_addr.s_addr) == 1) {
             IP4Sockaddr.sin_family = AF_INET;
             IP4Sockaddr.sin_port   = htons(cfg->iPort);
         }
@@ -215,7 +215,7 @@
         memset(&IP6Sockaddr,  0, sizeof(IP6Sockaddr));
 
         /* resolve host numerically */
-        if (inet_pton(AF_INET6, cfg->pszHost, &IP6Sockaddr.sin6_addr.s6_addr) == 1) {
+        if (l2_inet_pton(AF_INET6, cfg->pszHost, &IP6Sockaddr.sin6_addr.s6_addr) == 1) {
             IP6Sockaddr.sin6_family = AF_INET6;
             IP6Sockaddr.sin6_port   = htons(cfg->iPort);
         }


ossp-pkg/l2/l2_sockmon.c 1.5 -> 1.6

--- l2_sockmon.c 2001/09/10 04:27:36     1.5
+++ l2_sockmon.c 2001/09/10 06:43:10     1.6
@@ -27,8 +27,6 @@
 **  l2_sockmon.c: Socket monitor for use with l2_test.c
 */
 
-#include <l2.h>
-
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -91,7 +89,7 @@
 int myserver(int iFamily, int iProtocol, int iPort)
 {
     char pszBuf[BUFFSIZ];
-    struct sockaddr_in  laddr4,   faddr4,    CADDR4;
+    struct sockaddr_in  laddr4,   faddr4,    caddr4;
     struct sockaddr_in6 laddr6,   faddr6,    caddr6;
     int                 iSock,    iNewsock;
     int                 iSockopt, iProtofam;

CVSTrac 2.0.1