Find the answer to your Linux question:
Results 1 to 3 of 3
Hi guys, I`m trying to achieve the following: To create a small program called ifindex that will translate the name of an interface bij it`s index. So let`s say after ...
  1. #1
    Just Joined!
    Join Date
    Oct 2008
    Posts
    2

    How to create an ifindex ?

    Hi guys,

    I`m trying to achieve the following:
    To create a small program called ifindex that will translate the name of an interface bij it`s index.

    So let`s say after running the program i could enter : eth0
    And in return i`d get something like : Index : 2

    I`ve learned a lot and by now realized that certain libraries must be included; well, i`ve included a lot of them.

    I`m also quite new at C.
    Could someone help me along, please ?

    Grtz,
    Dennis

  2. #2
    Linux Newbie
    Join Date
    Jan 2008
    Location
    UK
    Posts
    211
    Hi,
    A question what are you trying to read exactly, to then compare and output.
    What is index that it means something in relation to the input.

    wowbag1

  3. #3
    Just Joined!
    Join Date
    Oct 2008
    Posts
    2
    Hi wowbag,

    i want to be able to assign an interface to a socket. ( eventually )
    Just experimenting, you know

    I know that i can do this with the Bind() function-systemcall.

    However, i need the index of that interface (e.g. eth0 )
    - says the tutorial i`m reading!

    so, i need a way to find that index of the interface...

    ( i allmost got it myself )

Posting Permissions

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