summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2011-05-05 14:14:34 +1000
committerDamien Miller <djm@mindrot.org>2011-05-05 14:14:34 +1000
commit91475865997f16a728ae1dc3a98dda957c997a5d (patch)
tree696fda1bb4daa024fa0176dc998c2a67beecc160 /misc.c
parent044f4a6cc39d1c3d109c143c162c4c00fc4df0aa (diff)
- stevesk@cvs.openbsd.org 2011/03/29 18:54:17
[misc.c misc.h servconf.c] print ipqos friendly string for sshd -T; ok markus # sshd -Tf sshd_config|grep ipqos ipqos lowdelay throughput
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/misc.c b/misc.c
index 919b04e6b..5f63090d9 100644
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: misc.c,v 1.84 2010/11/21 01:01:13 djm Exp $ */ 1/* $OpenBSD: misc.c,v 1.85 2011/03/29 18:54:17 stevesk Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2005,2006 Damien Miller. All rights reserved. 4 * Copyright (c) 2005,2006 Damien Miller. All rights reserved.
@@ -985,6 +985,19 @@ parse_ipqos(const char *cp)
985 return val; 985 return val;
986} 986}
987 987
988const char *
989iptos2str(int iptos)
990{
991 int i;
992 static char iptos_str[sizeof "0xff"];
993
994 for (i = 0; ipqos[i].name != NULL; i++) {
995 if (ipqos[i].value == iptos)
996 return ipqos[i].name;
997 }
998 snprintf(iptos_str, sizeof iptos_str, "0x%02x", iptos);
999 return iptos_str;
1000}
988void 1001void
989sock_set_v6only(int s) 1002sock_set_v6only(int s)
990{ 1003{