LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux not accepting udp and tcp ethernet packets (https://www.linuxquestions.org/questions/linux-newbie-8/linux-not-accepting-udp-and-tcp-ethernet-packets-4175541579/)

Praju26 05-04-2015 08:55 AM

Linux not accepting udp and tcp ethernet packets
 
I am trying to build a socket to retrieve the ethernet packets from ecu. When i run my code on windows there is no problem and the code runs correctly. But when i run my code on Linux it gets stuck at s.recv(65565). I have already set static ip in /etc/network/interfaces as follows: iface eth0 inet static address 160.48.199.91 netmask 255.255.255.0 gateway 160.48.199.254

I tried a simple code of socket on raspberry pi. but it still gets stuck at s.recv(65565). I also tried to implement the program using multicast. but the problem is that when i create a socket for icmp protocols then I could see the data from the ECU after using command "ping -I echo 239.192.255.251" in another terminal. (where 239.192.255.251 is the multicast address) But when I change the socket protocol type to udp, tcp or raw then it again gets stuck at s.recv().

Imp: When i run the "netstat -s" command in terminal then i could see that there are 0 messages received for udp and tcp. But in Wireshark i could see the udp messages from ECU. Is linux killing all the udp and tcp packets ? How should i solve this ?
(complete setup is connected as: ECU ---> Media converter ---> Raspberry Pi. There is no LAN, no firewall, no internet)

Could anyone please help me with this problem ?

rtmistler 05-04-2015 11:47 AM

The Linux Networking forum is a better place for this, where you've cross-posted already http://www.linuxquestions.org/questi...ts-4175541582/


All times are GMT -5. The time now is 02:51 AM.