From efdecacc5d7f91c17adb7cdb1dd7306ea6d22c9f Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Sun, 26 Nov 2000 03:59:21 +0000 Subject: [PATCH] fix formating error in sys_setsockopt add list of socketlayers and use that for [gs]etsockopt --- ChangeLog | 21 ++++++++++++-------- net.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 69 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index c5c3c715..4f85046c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-11-26 Wichert Akkerman + + * net.c: fix formating error in sys_setsockopt + * net.c: add list of socketlayers and use that for [gs]etsockopt + 2000-10-12 Wichert Akkerman * time.c: use sys/timex.h so things compile with 2.2 kernels @@ -5,17 +10,17 @@ 2000-09-03 Wichert Akkerman - * process.c: perform bpt trick for clone as well so we can get the - pid of the child before it starts doing something - * file.c: rename dirent64 struct to kernel_dirent64 so things compile - again with newer libcs - * test/clone.c: improve our testcase a bit - * Merge another patch from Gäel Roualland with FreeBSD updates + * process.c: perform bpt trick for clone as well so we can get the + pid of the child before it starts doing something + * file.c: rename dirent64 struct to kernel_dirent64 so things compile + again with newer libcs + * test/clone.c: improve our testcase a bit + * Merge another patch from Gäel Roualland with FreeBSD updates 2000-09-01 Wichert Akkerman - * lots of files: merge patch from Gaël Roualland to add - support for FreeBSD. + * lots of files: merge patch from Gaël Roualland to add + support for FreeBSD. 2000-08-09 Wichert Akkerman diff --git a/net.c b/net.c index daea7825..17ace699 100644 --- a/net.c +++ b/net.c @@ -191,6 +191,59 @@ static struct xlat socktypes[] = { #endif { 0, NULL }, }; +static struct xlat socketlayers[] = { + { SOL_IP, "SOL_IP" }, +#if defined(SOL_ICMP) + { SOL_ICMP, "SOL_ICMP" }, +#endif + { SOL_TCP, "SOL_TCP" }, + { SOL_UDP, "SOL_UDP" }, +#if defined(SOL_IPV6) + { SOL_IPV6, "SOL_IPV6" }, +#endif +#if defined(SOL_ICMPV6) + { SOL_ICMPV6, "SOL_ICMPV6" }, +#endif +#if defined(SOL_RAW) + { SOL_RAW, "SOL_RAW" }, +#endif +#if defined(SOL_IPX) + { SOL_IPX, "SOL_IPX" }, +#endif +#if defined(SOL_IPX) + { SOL_IPX, "SOL_IPX" }, +#endif +#if defined(SOL_AX25) + { SOL_AX25, "SOL_AX25" }, +#endif +#if defined(SOL_ATALK) + { SOL_ATALK, "SOL_ATALK" }, +#endif +#if defined(SOL_NETROM) + { SOL_NETROM, "SOL_NETROM" }, +#endif +#if defined(SOL_ROSE) + { SOL_ROSE, "SOL_ROSE" }, +#endif +#if defined(SOL_DECNET) + { SOL_DECNET, "SOL_DECNET" }, +#endif +#if defined(SOL_X25) + { SOL_X25, "SOL_X25" }, +#endif +#if defined(SOL_PACKET) + { SOL_PACKET, "SOL_PACKET" }, +#endif +#if defined(SOL_ATM) + { SOL_ATM, "SOL_ATM" }, +#endif +#if defined(SOL_AAL) + { SOL_AAL, "SOL_AAL" }, +#endif +#if defined(SOL_IRDA) + { SOL_IRDA, "SOL_IRDA" }, +#endif +}; static struct xlat protocols[] = { { IPPROTO_IP, "IPPROTO_IP" }, { IPPROTO_ICMP, "IPPROTO_ICMP" }, @@ -1042,7 +1095,7 @@ struct tcb *tcp; * etc. still need work */ default: /* XXX - should know socket family here */ - printxval(protocols, tcp->u_arg[1], "IPPROTO_???"); + printxval(socketlayers, tcp->u_arg[1], "SOL_???"); tprintf(", %lu, ", tcp->u_arg[2]); break; } @@ -1160,8 +1213,8 @@ struct tcb *tcp; * etc. still need work */ default: /* XXX - should know socket family here */ - printxval(protocols, tcp->u_arg[1], "IPPROTO_???"); - tprintf("%lu, ", tcp->u_arg[2]); + printxval(socketlayers, tcp->u_arg[1], "IPPROTO_???"); + tprintf(", %lu, ", tcp->u_arg[2]); printnum(tcp, tcp->u_arg[3], "%ld"); tprintf(", %lu", tcp->u_arg[4]); break; -- 2.40.0