]> granicus.if.org Git - strace/commitdiff
2004-08-30 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Tue, 31 Aug 2004 07:01:26 +0000 (07:01 +0000)
committerRoland McGrath <roland@redhat.com>
Tue, 31 Aug 2004 07:01:26 +0000 (07:01 +0000)
* net.c (sockipoptions): Add some options.
[SOL_IPV6] (sockipv6options): New variable.
(sys_getsockopt, printsockopt): Use it for SOL_IPV6 level.
From Ulrich Drepper <drepper@redhat.com>.
Fixes RH#128391.

net.c

diff --git a/net.c b/net.c
index dd6fb644f757ea3553f9448407e15f71ff2a3f77..43bc3cdd8a280f7a3ad2ea8e8d806a79750dcbad 100644 (file)
--- a/net.c
+++ b/net.c
@@ -672,11 +672,80 @@ static struct xlat sockipoptions[] = {
 #endif
 #ifdef IP_RECVIFINDEX
        { IP_RECVIFINDEX,       "IP_RECVIFINDEX"        },
+#endif
+#ifdef IP_MSFILTER
+       { IP_MSFILTER,          "IP_MSFILTER"           },
+#endif
+#ifdef MCAST_MSFILTER
+       { MCAST_MSFILTER,       "MCAST_MSFILTER"        },
+#endif
+#ifdef IP_FREEBIND
+       { IP_FREEBIND,          "IP_FREEBIND"           },
 #endif
        { 0,                    NULL                    },
 };
 #endif /* SOL_IP */
 
+#ifdef SOL_IPV6
+static struct xlat sockipv6options[] = {
+#ifdef IPV6_ADDRFORM
+       { IPV6_ADDRFORM,        "IPV6_ADDRFORM"         },
+#endif
+#ifdef MCAST_FILTER
+       { MCAST_FILTER,         "MCAST_FILTER"          },
+#endif
+#ifdef IPV6_PKTOPTIONS
+       { IPV6_PKTOPTIONS,      "IPV6_PKTOPTIONS"       },
+#endif
+#ifdef IPV6_MTU
+       { IPV6_MTU,             "IPV6_MTU"              },
+#endif
+#ifdef IPV6_V6ONLY
+       { IPV6_V6ONLY,          "IPV6_V6ONLY"           },
+#endif
+#ifdef IPV6_PKTINFO
+       { IPV6_PKTINFO,         "IPV6_PKTINFO"          },
+#endif
+#ifdef IPV6_HOPLIMIT
+       { IPV6_HOPLIMIT,        "IPV6_HOPLIMIT"         },
+#endif
+#ifdef IPV6_RTHDR
+       { IPV6_RTHDR,           "IPV6_RTHDR"            },
+#endif
+#ifdef IPV6_HOPOPTS
+       { IPV6_HOPOPTS,         "IPV6_HOPOPTS"          },
+#endif
+#ifdef IPV6_DSTOPTS
+       { IPV6_DSTOPTS,         "IPV6_DSTOPTS"          },
+#endif
+#ifdef IPV6_FLOWINFO
+       { IPV6_FLOWINFO,        "IPV6_FLOWINFO"         },
+#endif
+#ifdef IPV6_UNICAST_HOPS
+       { IPV6_UNICAST_HOPS,    "IPV6_UNICAST_HOPS"     },
+#endif
+#ifdef IPV6_MULTICAST_HOPS
+       { IPV6_MULTICAST_HOPS,  "IPV6_MULTICAST_HOPS"   },
+#endif
+#ifdef IPV6_MULTICAST_LOOP
+       { IPV6_MULTICAST_LOOP,  "IPV6_MULTICAST_LOOP"   },
+#endif
+#ifdef IPV6_MULTICAST_IF
+       { IPV6_MULTICAST_IF,    "IPV6_MULTICAST_IF"     },
+#endif
+#ifdef IPV6_MTU_DISCOVER
+       { IPV6_MTU_DISCOVER,    "IPV6_MTU_DISCOVER"     },
+#endif
+#ifdef IPV6_RECVERR
+       { IPV6_RECVERR,         "IPV6_RECVERR"          },
+#endif
+#ifdef IPV6_FLOWINFO_SEND
+       { IPV6_FLOWINFO_SEND,   "IPV6_FLOWINFO_SEND"    },
+#endif
+       { 0,                    NULL                    },
+};
+#endif /* SOL_IPV6 */
+
 #ifdef SOL_IPX
 static struct xlat sockipxoptions[] = {
        { IPX_TYPE,     "IPX_TYPE"      },
@@ -1378,6 +1447,11 @@ struct tcb *tcp;
                        printxval(sockipoptions, tcp->u_arg[2], "IP_???");
                        break;
 #endif
+#ifdef SOL_IPV6
+               case SOL_IPV6:
+                       printxval(sockipv6options, tcp->u_arg[2], "IPV6_???");
+                       break;
+#endif
 #ifdef SOL_IPX
                case SOL_IPX:
                        printxval(sockipxoptions, tcp->u_arg[2], "IPX_???");
@@ -1505,6 +1579,11 @@ int len;
                printxval(sockipoptions, name, "IP_???");
                break;
 #endif
+#ifdef SOL_IPV6
+           case SOL_IPV6:
+               printxval(sockipv6options, name, "IPV6_???");
+               break;
+#endif
 #ifdef SOL_IPX
            case SOL_IPX:
                printxval(sockipxoptions, name, "IPX_???");