Results 1 to 2 of 2

Thread: How to fiind pci-bus of netwrok interface using ioctl

Hybrid View

  1. #1
    pradeepkumar NNTP User

    Default How to fiind pci-bus of netwrok interface using ioctl

    Hi,

    I want to find which network adpter(pci-bus) is associated with which network interface. I tried using IRQ numaber. I can find IRQ number of netwrok adapter usig lspci command. I found the IRQ number of network interface using ioctl and ifrq struct. Since multiple network adapter can share IRQ, it didn't worked properly.

    I found that using pci-bus device id i can find association network adapter and network interface. I want to know which struct will provide this value for the network interface. I am using ioctl.

    Regards,
    Pradeep

  2. #2
    Join Date
    Jun 2008
    Location
    Frisco, TX
    Posts
    1,235

    Default Re: How to fiind pci-bus of netwrok interface using ioctl

    pradeepkumar wrote:
    > Hi,
    >
    > I want to find which network adpter(pci-bus) is associated with which
    > network interface. I tried using IRQ numaber. I can find IRQ number of
    > netwrok adapter usig lspci command. I found the IRQ number of network
    > interface using ioctl and ifrq struct. Since multiple network adapter
    > can share IRQ, it didn't worked properly.
    >
    > I found that using pci-bus device id i can find association network
    > adapter and network interface. I want to know which struct will provide
    > this value for the network interface. I am using ioctl.



    find /sys/devices -name eth0

    libsysfs has routines you can use to walk the /sys tree.

    Not sure if there is any other good way to get at this...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •