On Fri, Nov 13, 2009 at 12:01:18PM +0100, Daniel Cordey wrote:
> C'est aussi ce que j'ai constate en regardant le code source. ifconfig est un 
> programme fonctionnant en user-mode. il n'a donc pas acces au structure du 
> kernel et il ne semble pas y avoir de systems calls, autre que ioctl() sur un 
> socket, permettant d'acceder directement a l'adresse IP d'un interface.

man 7 rtnetlink ?

DESCRIPTION

        Rtnetlink allows the kernel’s routing tables to be read and altered.  
It is
        used within the kernel to communicate between various subsystems, 
though this
        usage is not documented here, and for communication with user-space 
programs.
        Network routes, ip addresses, link parameters, neighbor setups,  
queueing
        disciplines,  traffic  classes  and packet classifiers may all be 
controlled
        through NETLINK_ROUTE sockets.  It is based on netlink messages, see 
netlink(7)
        for more information.

ou python-netifaces dans Debian sid?

        Package: python-netifaces
        Priority: optional
        Section: python
        Installed-Size: 112
        Maintainer: Mario Izquierdo (mariodebian) <[email protected]>
        Architecture: i386
        Source: netifaces
        Version: 0.5-1
        Provides: python2.4-netifaces, python2.5-netifaces
        Depends: libc6 (>= 2.3.6-6~)
        Filename: pool/main/n/netifaces/python-netifaces_0.5-1_i386.deb
        Size: 11930
        MD5sum: 144ef7916dbc50f1a5a632b321253d4a
        SHA1: 2c43babdda393560c3f7a7613f0d872a359051a3
        SHA256: 9c2bfcbe75f5344a09887c46fe87fb6042e04153c79e134103e47190206a3e74
        Description: portable network iface information for Python
         netifaces provides a (hopefully portable-ish) way for Python 
programmers to
         get access to a list of the network interfaces on the local machine, 
and to
         obtain the addresses of those network interfaces.
        Homepage: http://alastairs-place.net/netifaces/


-- 
Erik Rossen                               OpenPGP key: 2935D0B9
[email protected]                          On fonce la tête dans
http://www.rtfm-sarl.ch                   le guidon et on RTFM.
_______________________________________________
gull mailing list
[email protected]
http://forum.linux-gull.ch/mailman/listinfo/gull

Répondre à