[Tutor] Source PC MAC address

Pierre Barbier de Reuille pierre.barbier at cirad.fr
Wed Aug 24 17:00:46 CEST 2005


Socket is built up on IP, not on Ethernet: you have no way of finding a
MAC address using sockets simply because it may not exist one ! (if
you're not on an Ethernet network) You need to access lower levels of
network and probably access directly the network packet as your network
card is sending it to your OS !

Pierre

Johan Geldenhuys a écrit :
> Hi List,
> I am doing some networking programming and would like to limit access to
> my socket server on the the source devices' MAC address.
> I know the IP from where the connection is coming, but how could I find
> out what the MAC of the source device is?
> Any quick answers / ideas?
> Is there a build-in function in socket that can do this?
> 
> Thanks,
> 
> Johan 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor

-- 
Pierre Barbier de Reuille

INRA - UMR Cirad/Inra/Cnrs/Univ.MontpellierII AMAP
Botanique et Bio-informatique de l'Architecture des Plantes
TA40/PSII, Boulevard de la Lironde
34398 MONTPELLIER CEDEX 5, France

tel   : (33) 4 67 61 65 77    fax   : (33) 4 67 61 56 68


More information about the Tutor mailing list