In comp.os.linux.networking mcharon <(E-Mail Removed)> wrote:
> we are writing socket application to send UDP packets out from eth1
> and loop it back to the same interface using loopback stub to verify
> the hardware without using external devices/ports. The sending and
> receiving port are the same.
> our target machine has eth0 configured as 15.6.xx.xx and eth1
> configured as 16.6.6.6.
> the listening socket is listing on all ip.
> .
> When we looked at the packet in the tx code of the driver, we have
> observed that the packet passed down from the ip stack has the same
> MAC address for both source and destination. Also when packet is
> returning, its ip source and destination are the same as the
> transmitting packet, which is to be expected.
> The outgoing packet on eth1 has ip address of 16.6.10.10.
Is that what your application is using for the destination IP address?
Have you also tried to setup permanent ARP entries for that?
> 1. Is this type of loopback possible under linux?
> 2 Is it better to send raw packet, or should UDP work as well?
> 3. is there a similar code that we can leverage?
> 4. the returning (incoming) packet is lost after the driver passes it
> to the ip stack. The receving socket is not able to retrieve packets
> the driver receives.
> What could be some of the issues?
I was under the impression that if one targetted one's own IP address,
"the stack" would intercept that before it even got to the driver. On
inbound, if the destination IP address does not match a locally
assigned IP, the datagram is dropped, or the stack will attempt to
forward it if ip_foward(ing?) is set.
You may have to do things at the link-level.
rick jones
--
No need to believe in either side, or any side. There is no cause.
There's only yourself. The belief is in your own precision. - Joubert
these opinions are mine, all mine; HP might not want them anyway...

feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...