diff options
author | Damien Miller <djm@mindrot.org> | 2011-05-05 14:14:34 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2011-05-05 14:14:34 +1000 |
commit | 91475865997f16a728ae1dc3a98dda957c997a5d (patch) | |
tree | 696fda1bb4daa024fa0176dc998c2a67beecc160 /misc.c | |
parent | 044f4a6cc39d1c3d109c143c162c4c00fc4df0aa (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.c | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -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 | ||
988 | const char * | ||
989 | iptos2str(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 | } | ||
988 | void | 1001 | void |
989 | sock_set_v6only(int s) | 1002 | sock_set_v6only(int s) |
990 | { | 1003 | { |