summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter/tools/ipsyncs.c
diff options
context:
space:
mode:
authorguido <guido@FreeBSD.org>2006-08-16 11:51:32 +0000
committerguido <guido@FreeBSD.org>2006-08-16 11:51:32 +0000
commit092f5d1218f4867a87b382d75613b9d2b3e56c18 (patch)
treee49755bc5470450d9acf44918f68b5acd3915e51 /contrib/ipfilter/tools/ipsyncs.c
parent9749beb9e35afd40d054e5592764d50ed069a890 (diff)
downloadFreeBSD-src-092f5d1218f4867a87b382d75613b9d2b3e56c18.zip
FreeBSD-src-092f5d1218f4867a87b382d75613b9d2b3e56c18.tar.gz
Import IP Filter 4.1.13
Diffstat (limited to 'contrib/ipfilter/tools/ipsyncs.c')
-rw-r--r--contrib/ipfilter/tools/ipsyncs.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/contrib/ipfilter/tools/ipsyncs.c b/contrib/ipfilter/tools/ipsyncs.c
index 29c63af..0d95a9d 100644
--- a/contrib/ipfilter/tools/ipsyncs.c
+++ b/contrib/ipfilter/tools/ipsyncs.c
@@ -5,7 +5,7 @@
*/
#if !defined(lint)
static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed";
-static const char rcsid[] = "@(#)$Id: ipsyncs.c,v 1.5.2.1 2004/10/31 18:46:44 darrenr Exp $";
+static const char rcsid[] = "@(#)$Id: ipsyncs.c,v 1.5.2.3 2006/03/27 02:09:47 darrenr Exp $";
#endif
#include <sys/types.h>
#include <sys/time.h>
@@ -19,7 +19,7 @@ static const char rcsid[] = "@(#)$Id: ipsyncs.c,v 1.5.2.1 2004/10/31 18:46:44 da
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
-#include <strings.h>
+#include <string.h>
#include <unistd.h>
#include <syslog.h>
#include <errno.h>
@@ -32,6 +32,7 @@ static const char rcsid[] = "@(#)$Id: ipsyncs.c,v 1.5.2.1 2004/10/31 18:46:44 da
#include "netinet/ip_sync.h"
int main __P((int, char *[]));
+void usage __P((const char *progname));
int terminate = 0;
@@ -41,11 +42,12 @@ void usage(const char *progname) {
progname);
}
+#if 0
static void handleterm(int sig)
{
terminate = sig;
-
}
+#endif
#define BUFFERLEN 1400
@@ -130,8 +132,7 @@ char *argv[];
goto tryagain;
}
- syslog(LOG_INFO, "Established connection to %s",
- inet_ntoa(sin.sin_addr));
+ syslog(LOG_INFO, "Listening to %s", inet_ntoa(sin.sin_addr));
inbuf = 0;
while (1) {
@@ -223,14 +224,15 @@ moreinbuf:
n2 = sizeof(*sh) + len;
n3 = write(lfd, buff, n2);
if (n3 <= 0) {
- syslog(LOG_ERR, "Write error: %m");
+ syslog(LOG_ERR, "%s: Write error: %m",
+ IPSYNC_NAME);
goto tryagain;
}
if (n3 != n2) {
- syslog(LOG_ERR, "Incomplete write (%d/%d)",
- n3, n2);
+ syslog(LOG_ERR, "%s: Incomplete write (%d/%d)",
+ IPSYNC_NAME, n3, n2);
goto tryagain;
}
OpenPOWER on IntegriCloud