how to receive UDP packet at interface from interface's IP

From: Brian Ristuccia (brian@ristuccia.com)
Date: Tue Dec 11 2001 - 00:12:14 EST


Hi folks,

I'm currently working on getting status reporting going on my merlin CDPD
modem. The merlin is a PCMCIA type II card that works as a standard serial
device and can be made to talk SLIP or PPP by issuing certain Hayes-style AT
commands. Combined with a handheld PC like the Compaq IPAQ, it makes a great
tool for remote system administration, email, text web browsing, etc.

One nifty thing about the modem is that while in SLIP or PPP mode, one can
send a UDP packet to 10.0.0.1:4950. Using a protocol called MSCI, the modem
will let you query things like signal strength, link quality, etc. But my
problem is that the modem sends the response UDP packets with the source and
destination IP address both matching that of the PPP interface to which the
modem is attached and I never see the data on my listening socket. For
example, if the PPP interface's IP address was 192.168.0.100, the packets
would come from 192.168.0.100 to 192.168.0.100. Even when I disable
rp_filter, I can not receive the packets on my listening socket. I can see
the packets with tcpdump, but they never make it to the socket.

Is there any reason why the kernel is not sending the contents of these
packets to the socket? If so, is there an easy way to change the behavior?
I've looked in net/ipv4/ at files ip_input.c fib_frontend.c and udp.c, but I
can't see where the packet might be getting discarded. Is there any way to
receive this type of packet through a normal UDP socket, or should I just
hack up a userspace workaround with libpcap?

Any hints will be very much appreciated. Thanks.

(Please respect my Mail-Followup-To header when replying).

-- 
Brian Ristuccia
brian@ristuccia.com
bristucc@cs.uml.edu
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Dec 15 2001 - 21:00:19 EST