]> git.pld-linux.org Git - packages/strace.git/blob - strace-ipv6.patch
- updated to 4.5.3 (better support for NPTL threads)
[packages/strace.git] / strace-ipv6.patch
1 diff -urN strace-4.0.orig/config.h.in strace-4.0/config.h.in
2 --- strace-4.0.orig/config.h.in Mon Aug 16 14:53:44 1999
3 +++ strace-4.0/config.h.in      Mon Aug 16 15:37:36 1999
4 @@ -108,6 +108,9 @@
5  /* Define if you have the getdents function.  */
6  #undef HAVE_GETDENTS
7  
8 +/* Define if you have the inet_ntop function.  */
9 +#undef HAVE_INET_NTOP
10 +
11  /* Define if you have the mctl function.  */
12  #undef HAVE_MCTL
13  
14 diff -urN strace-4.0.orig/configure.in strace-4.0/configure.in
15 --- strace-4.0.orig/configure.in        Mon Aug 16 14:53:44 1999
16 +++ strace-4.0/configure.in     Mon Aug 16 15:37:28 1999
17 @@ -125,7 +125,7 @@
18  AC_HEADER_MAJOR
19  AC_SIG_ATOMIC_T
20  AC_CHECK_LIB(nsl, main)
21 -AC_CHECK_FUNCS(sigaction strerror strsignal pread sys_siglist _sys_siglist getdents mctl putpmsg prctl sendmsg)
22 +AC_CHECK_FUNCS(sigaction strerror strsignal pread sys_siglist _sys_siglist getdents mctl putpmsg prctl sendmsg inet_ntop)
23  AC_CHECK_HEADERS(sys/filio.h sys/acl.h sys/asynch.h sys/door.h sys/stream.h sys/tiuser.h sys/sysconfig.h asm/sigcontext.h ioctls.h sys/ioctl.h sys/ptrace.h termio.h)
24  AC_DECL_SYS_ERRLIST
25  AC_DECL_SYS_SIGLIST
26 diff -urN strace-4.0.orig/net.c strace-4.0/net.c
27 --- strace-4.0.orig/net.c       Mon Aug 16 14:53:44 1999
28 +++ strace-4.0/net.c    Mon Aug 16 15:40:02 1999
29 @@ -311,6 +311,10 @@
30         struct sockaddr sa;
31         struct sockaddr_in *sin = (struct sockaddr_in *) &sa;
32         struct sockaddr_un sau;
33 +#ifdef HAVE_INET_NTOP
34 +       struct sockaddr_in6 sa6;
35 +       char string_addr[100];
36 +#endif
37  #ifdef LINUX
38         struct sockaddr_ipx sipx;
39  #endif
40 @@ -340,6 +344,19 @@
41                 tprintf("sin_port=htons(%u), sin_addr=inet_addr(\"%s\")}",
42                         ntohs(sin->sin_port), inet_ntoa(sin->sin_addr));
43                 break;
44 +#ifdef HAVE_INET_NTOP
45 +       case AF_INET6:
46 +               if (umove(tcp, addr, &sa6) < 0)
47 +                       tprintf("{sin6_family=AF_INET6, ...}");
48 +               else
49 +               {
50 +                       tprintf("{sin6_family=AF_INET6, ");
51 +                       inet_ntop(AF_INET6, &sa6.sin6_addr, string_addr, sizeof(string_addr));
52 +                       tprintf("sin6_port=htons(%u), inet_pton(AF_INET6, \"%s\", &sin6_addr), sin6_flowinfo=htonl(%u)}",
53 +                               ntohs(sa6.sin6_port), string_addr, ntohl(sa6.sin6_flowinfo));
54 +               }
55 +               break;  
56 +#endif
57  #if defined(AF_IPX) && defined(linux)
58         case AF_IPX:
59                 if (umove(tcp, addr, &sipx)<0)
This page took 0.091988 seconds and 3 git commands to generate.