Gregory S Topmiller <(E-Mail Removed)> writes:
>I've written a network driver that is eventually going to work with an
>FPGA to send and
>receive IP frames. I open it using "ifconfig ethfpga0 192.80.160.240".
>I've written a test
>program that opens a socket and binds the above address then I use ioctl
>calls to send
>and receive buffers which works appropriately. My problem is that when
>I try
>"ping -I192.80.160.240 10.10.52.154" it doesn't go through my driver.
>The ping
>does work though. I guess it's using the routing tables to find a path
>to 10.10.52.154.
Of course. ALL network stuff uses the routing table. That is what the
routing table is for. So, change the routing table to tell all network
stuff to send stuff through your ethfpga0 All -I does, as I read it, is to
set the source address on the packet. It does not tell the network software
o
which interface to send the packet out on.
route add -host 10.10.52.154 ethfpga0
if ethfpga0 is directly connected to your computer by that port.
By the way, 10.10.52.154 is unroutable, so it will get dropped by the first
router along the way.
>I'm using kernel 2.6.3 and have based my driver on the snull driver
>example. I've
>also tried pinging 192.80.160.240 and it works.
>Is there a way to run ping to ensure the packets originate from a
>certain IP address
>and therefore go through my driver?
route them through the proper port.
|