Networking Forums

Networking Forums > Computer Networking > Linux Networking > How to query Kernel how it would route packets?

Reply
Thread Tools Display Modes

How to query Kernel how it would route packets?

 
 
Thomas Herzog
Guest
Posts: n/a

 
      10-14-2005, 04:43 PM
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
 
Reply With Quote
 
 
 
 
buck
Guest
Posts: n/a

 
      10-14-2005, 06:16 PM
On Fri, 14 Oct 2005 18:43:46 +0200, Thomas Herzog
<(E-Mail Removed)> wrote:

>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


I haven't looked at it, but perhaps this will help?
http://www.coverfire.com/lql/

--
buck

 
Reply With Quote
 
David Goodenough
Guest
Posts: n/a

 
      10-14-2005, 06:54 PM
Thomas Herzog wrote:

> 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

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
 
Reply With Quote
 
thomas.herzog@gmx.li
Guest
Posts: n/a

 
      10-19-2005, 11:21 AM

David Goodenough wrote:

> Use the Source Luke. The source of ip that is.
>
> David


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 :-)

 
Reply With Quote
 
David Goodenough
Guest
Posts: n/a

 
      10-19-2005, 05:40 PM
(E-Mail Removed) wrote:

>
> David Goodenough wrote:
>
>> Use the Source Luke. The source of ip that is.
>>
>> David

>
> 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 :-)

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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fundamentals: what packets are dropped by the kernel? Doug Laidlaw Linux Networking 9 11-27-2007 07:48 PM
Re: Sending UDP Packets from a kernel thread/module Tim Roberts Linux Networking 10 12-19-2005 01:32 PM
# packets for first query with personal DNS server jab3 Linux Networking 0 09-22-2004 06:22 PM
no route added by ifconfig on 3com w/ 2.6.6 kernel Cameron Kerr Linux Networking 2 06-03-2004 03:27 PM
Can't seem to get packets to route Anonymous Linux Networking 2 08-23-2003 02:14 AM



1 2 3 4 5 6 7 8 9 10 11