Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/dist/kame/racoon have safeputchar() for tcpdump/packe...
details: https://anonhg.NetBSD.org/src/rev/187c649bc2e5
branches: trunk
changeset: 503001:187c649bc2e5
user: itojun <itojun%NetBSD.org@localhost>
date: Sun Jan 28 17:17:56 2001 +0000
description:
have safeputchar() for tcpdump/packet-isakmp.c. reported by bernd,
sync with kame.
diffstat:
crypto/dist/kame/racoon/isakmp.c | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diffs (45 lines):
diff -r ed57f8e2c303 -r 187c649bc2e5 crypto/dist/kame/racoon/isakmp.c
--- a/crypto/dist/kame/racoon/isakmp.c Sun Jan 28 16:18:09 2001 +0000
+++ b/crypto/dist/kame/racoon/isakmp.c Sun Jan 28 17:17:56 2001 +0000
@@ -1,4 +1,4 @@
-/* $KAME: isakmp.c,v 1.124 2001/01/26 04:02:46 thorpej Exp $ */
+/* $KAME: isakmp.c,v 1.125 2001/01/28 17:17:17 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -55,6 +55,7 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
+#include <ctype.h>
#if !defined(HAVE_GETADDRINFO) || !defined(HAVE_GETNAMEINFO)
#include "addrinfo.h"
@@ -2046,6 +2047,7 @@
#ifdef INET6
char *getname6 __P((const u_char *));
#endif
+int safeputchar __P((int));
/*
* Return a name for the IP address pointed to by ap. This address
@@ -2095,6 +2097,19 @@
}
#endif /* INET6 */
+int
+safeputchar(c)
+ int c;
+{
+ unsigned char ch;
+
+ ch = (unsigned char)(c & 0xff);
+ if (c < 0x80 && isprint(c))
+ return printf("%c", c & 0xff);
+ else
+ return printf("\\%03o", c & 0xff);
+}
+
void
isakmp_printpacket(msg, from, my, decoded)
vchar_t *msg;
Home |
Main Index |
Thread Index |
Old Index