Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/dist/ipf Import IP Filter 3.4.2



details:   https://anonhg.NetBSD.org/src/rev/8cc296bdd08a
branches:  trunk
changeset: 486038:8cc296bdd08a
user:      veego <veego%NetBSD.org@localhost>
date:      Thu May 11 19:49:13 2000 +0000

description:
Import IP Filter 3.4.2

diffstat:

 dist/ipf/common.c |  21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diffs (32 lines):

diff -r 87c66bb743d3 -r 8cc296bdd08a dist/ipf/common.c
--- a/dist/ipf/common.c Thu May 11 19:46:05 2000 +0000
+++ b/dist/ipf/common.c Thu May 11 19:49:13 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: common.c,v 1.1.1.1 2000/05/03 10:55:30 veego Exp $     */
+/*     $NetBSD: common.c,v 1.1.1.2 2000/05/11 19:49:13 veego Exp $     */
 
 /*
  * Copyright (C) 1993-2000 by Darren Reed.
@@ -576,3 +576,22 @@
                printf(" port %s %s", pcmp1[frp->frp_cmp],
                             portname(pr, frp->frp_port));
 }
+
+
+void printbuf(buf, len, zend)
+char *buf;
+int len, zend;
+{
+       char *s, c;
+       int i;
+
+       for (s = buf, i = len; i; i--) {
+               c = *s++;
+               if (isprint(c))
+                       putchar(c);
+               else
+                       printf("\\%03o", c);
+               if ((c == '\0') && zend)
+                       break;
+       }
+}



Home | Main Index | Thread Index | Old Index