sock.c |   33 ++++++++++++++++++++++++++++-----
 1 files changed, 28 insertions(+), 5 deletions(-)

--- sock.c
+++ sock.c
@@ -134,26 +134,38 @@ sock_ioctl(struct tcb *tcp, long code, long arg)
                return 1;
 #ifdef LINUX
        case SIOCGIFNAME:
+       case SIOCSIFNAME:
        case SIOCGIFINDEX:
        case SIOCGIFADDR:
+       case SIOCSIFADDR:
        case SIOCGIFDSTADDR:
+       case SIOCSIFDSTADDR:
        case SIOCGIFBRDADDR:
+       case SIOCSIFBRDADDR:
        case SIOCGIFNETMASK:
+       case SIOCSIFNETMASK:
        case SIOCGIFFLAGS:
+       case SIOCSIFFLAGS:
        case SIOCGIFMETRIC:
+       case SIOCSIFMETRIC:
        case SIOCGIFMTU:
+       case SIOCSIFMTU:
        case SIOCGIFSLAVE:
+       case SIOCSIFSLAVE:
        case SIOCGIFHWADDR:
+       case SIOCSIFHWADDR:
        case SIOCGIFTXQLEN:
+       case SIOCSIFTXQLEN:
        case SIOCGIFMAP:
+       case SIOCSIFMAP:
                if (umove(tcp, tcp->u_arg[2], &ifr) < 0)
                        tprintf(", %#lx", tcp->u_arg[2]);
                else if (syserror(tcp)) {
-                       if (code == SIOCGIFNAME)
+                       if (code == SIOCGIFNAME || code == SIOCSIFNAME)
                                tprintf(", {ifr_index=%d, ifr_name=???}", 
ifr.ifr_ifindex);
                        else
                                tprintf(", {ifr_name=\"%s\", ???}", 
ifr.ifr_name);
-               } else if (code == SIOCGIFNAME)
+               } else if (code == SIOCGIFNAME || code == SIOCSIFNAME)
                        tprintf(", {ifr_index=%d, ifr_name=\"%s\"}",
                                ifr.ifr_ifindex, ifr.ifr_name);
                else {
@@ -163,15 +175,19 @@ sock_ioctl(struct tcb *tcp, long code, long arg)
                                tprintf("ifr_index=%d", ifr.ifr_ifindex);
                                break;
                        case SIOCGIFADDR:
+                       case SIOCSIFADDR:
                                str = "ifr_addr";
                        case SIOCGIFDSTADDR:
-                               if (str == NULL)
+                       case SIOCSIFDSTADDR:
+                               if (!str)
                                        str = "ifr_dstaddr";
                        case SIOCGIFBRDADDR:
-                               if (str == NULL)
+                       case SIOCSIFBRDADDR:
+                               if (!str)
                                        str = "ifr_broadaddr";
                        case SIOCGIFNETMASK:
-                               if (str == NULL)
+                       case SIOCSIFNETMASK:
+                               if (!str)
                                        str = "ifr_netmask";
                                tprintf("%s={", str);
                                printxval(addrfams,
@@ -185,6 +201,7 @@ sock_ioctl(struct tcb *tcp, long code, long arg)
                                tprintf("}");
                                break;
                        case SIOCGIFHWADDR:
+                       case SIOCSIFHWADDR:
                                /* XXX Are there other hardware addresses
                                   than 6-byte MACs?  */
                                bytes = (unsigned char *) 
&ifr.ifr_hwaddr.sa_data;
@@ -193,22 +210,28 @@ sock_ioctl(struct tcb *tcp, long code, long arg)
                                        bytes[3], bytes[4], bytes[5]);
                                break;
                        case SIOCGIFFLAGS:
+                       case SIOCSIFFLAGS:
                                tprintf("ifr_flags=");
                                printflags(iffflags, ifr.ifr_flags, "IFF_???");
                                break;
                        case SIOCGIFMETRIC:
+                       case SIOCSIFMETRIC:
                                tprintf("ifr_metric=%d", ifr.ifr_metric);
                                break;
                        case SIOCGIFMTU:
+                       case SIOCSIFMTU:
                                tprintf("ifr_mtu=%d", ifr.ifr_mtu);
                                break;
                        case SIOCGIFSLAVE:
+                       case SIOCSIFSLAVE:
                                tprintf("ifr_slave=\"%s\"", ifr.ifr_slave);
                                break;
                        case SIOCGIFTXQLEN:
+                       case SIOCSIFTXQLEN:
                                tprintf("ifr_qlen=%d", ifr.ifr_qlen);
                                break;
                        case SIOCGIFMAP:
+                       case SIOCSIFMAP:
                                tprintf("ifr_map={mem_start=%#lx, "
                                        "mem_end=%#lx, base_addr=%#x, "
                                        "irq=%u, dma=%u, port=%u}",


-- 
ldv

Attachment: pgpdcrxqo6u5p.pgp
Description: PGP signature

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to