How to query Kernel how it would route packets?

Discussion in 'Linux Networking' started by Thomas Herzog, Oct 14, 2005.

  1. Hi, together,

    I am currently developing a Signaling Protocol instance, which will
    signal along a IP "Flow".

    Thus I have addressing information the like

    "Flow Source IP"/"Flow Destination IP"

    Now I want to query the Linux kernel, how it woul route Pakets with that
    source and destination. (This is essential to me, as I must not use
    other interfaces than these, which are used for the flow, and a router
    would have many of them *ggg*)

    I found that the program "ip" is able to do such queries
    ("ip route get 10.10.0.1 from 10.10.0.6"),
    but I found still no way to query the kernel programmatically from a C++
    program.

    Has anyone some hints to as where to look for information or even a
    solution?

    "man 7 ip" and referenced manpages did not help thus far...

    Many thanks,
    Thomas
     
    Thomas Herzog, Oct 14, 2005
    #1
    1. Advertisements

  2. Thomas Herzog

    buck Guest

    I haven't looked at it, but perhaps this will help?
    http://www.coverfire.com/lql/
     
    buck, Oct 14, 2005
    #2
    1. Advertisements

  3. Use the Source Luke. The source of ip that is.

    David
    _________________________________________
    Usenet Zone Free Binaries Usenet Server
    More than 140,000 groups
    Unlimited download
    http://www.usenetzone.com to open account
     
    David Goodenough, Oct 14, 2005
    #3
  4. Thanks for the hint ;-)

    I hoped not to have to do it, as core utilities in Linux tend to be
    developed by the ultimate hackers and the chance for "normal people" to
    understand these is somewhat limited *ggg*

    But I will have a look at it, as it seems there is no other way :)
     
    thomas.herzog, Oct 19, 2005
    #4
  5. Well you can always look in the source and find the author, or at least
    the last person who messed with it, and try asking them.

    David
    _________________________________________
    Usenet Zone Free Binaries Usenet Server
    More than 140,000 groups
    Unlimited download
    http://www.usenetzone.com to open account
     
    David Goodenough, Oct 19, 2005
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.