Hi,

Below is the implementation of the SIOCGIFHWADDR ioctl option against #1092.

PS: Tested in kernel mode only. Is it really that simple?

Paulo


Index: stack/socket.c
===================================================================
--- stack/socket.c      (revisão 1092)
+++ stack/socket.c      (cópia de trabalho)
@@ -287,6 +287,11 @@
                 ret = -EOPNOTSUPP;
             break;

+        case SIOCGIFHWADDR:
+            memcpy(ifr->ifr_hwaddr.sa_data, rtdev->dev_addr, 
rtdev->addr_len);
+            ifr->ifr_hwaddr.sa_family = rtdev->type;
+            break;
+
         default:
             ret = -EOPNOTSUPP;
             break;


     _________________________________________________________________
     AVISO
   Esta mensagem é destinada exclusivamente a(s) pessoa(s) indicada(s)
   como destinatário(s), podendo conter informações confidenciais,
   protegidas por lei.
   A transmissão incorreta da mensagem não acarreta a perda de sua
   confidencialidade.
   Caso esta mensagem tenha sido recebida por engano, solicitamos que
   seja devolvida ao remetente e apagada imediatamente de seu sistema. É
   vedado a qualquer pessoa que não seja destinatário, usar, revelar,
   distribuir ou copiar ainda que parcialmente esta mensagem.
     _________________________________________________________________
     DISCLAIMER
   This message is destined exclusively to the intended receiver. It may
   contain confidential or legally protected information.
   The incorrect transmission of this message does not mean loss of its
   confidentiality.
   If this message is received by mistake, please send it back to the
   sender and delete it from your system immediately. It is forbidden to
   any person who is not the intended receiver to use, reveal,
   distribute, or copy any part of this message.
     _________________________________________________________________

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
RTnet-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rtnet-developers

Reply via email to