LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-11-2012, 10:09 PM   #1
bmahjoor
LQ Newbie
 
Registered: Sep 2011
Posts: 6

Rep: Reputation: Disabled
Problem receiving UDP packets on port 63 (linux 2.6)


I have attached a packet generator to my platform and am trying to receive UDP packets sent to port 63 and send them back immediately to have a rough idea of my setup's performance. However, my MAC receives the packets fine (as shown in MIB counters). But my recvfrom(..) call never returns. My socket is opened fine and is binded properly to port 63. I see my socket's status in netstat and no error is reported. Is port 63 a special case ? This particular packet generator does not allow me to specify the port to send the packets to and I am stuck with port 63. I appreciate any suggestions you might have here. If you need, I can post my program as well as it is very simple.
 
Old 03-12-2012, 12:01 AM   #2
elfenlied
Member
 
Registered: Dec 2004
Posts: 83

Rep: Reputation: 8
Are they sent and recieved from the same host? Are you trying to determine an applications performance or your network performance?
 
Old 03-12-2012, 12:50 AM   #3
bmahjoor
LQ Newbie
 
Registered: Sep 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
Yes, they are generated by Axia packet generator. The cable is connected to my a port on a switch.
This particular port passes all traffic to another port on the same switch which is connected to my
my MAC inside an FPGA. The generator for my test generates 1000 UDP packet (DA = my MAC address). When
I look at the packet printout, the UDP data says they are being sent to port 63. So my application
binds to my MAC's IP address and port 63. My MAC counters shows 1000 packets received ok. My network
layer statisctis (netdev->stats->rx_count) shows 1000 packets passed to tcp/ip stack fine. However
my recvfrom() sleeps forever...never gets anything.
 
Old 03-12-2012, 01:55 AM   #4
elfenlied
Member
 
Registered: Dec 2004
Posts: 83

Rep: Reputation: 8
Just to take a step back, I think I get what you're trying to say but I just want to be sure. Your post might make sense to you but I'm not quite sure if your reference to MAC is your MAC address or your MAC computer.

I havent used an Axia packet generator myself but do you only have the option to set the destination address as a MAC address?

The other thing I'm unclear about is you mentioned that the Axia is connected to a port on your switch and your host is connected to another port on the same switch which might be configured in some kind of monitor mode. So regardless of the destination address you will still get the traffic generated by the Axia.
 
Old 03-12-2012, 02:21 AM   #5
bmahjoor
LQ Newbie
 
Registered: Sep 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
Seems like you now understood my configuration (on Axia I can set the DA and SA addresses but NOT the UDP
port packets will be sent to). I set the DA to my MAC's DA because I don't want my MAC to drop the packets.
So ..do you have suggestions for me as to why recvfrom() does not return at all ?
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Sending/receiving UDP packets through a PF_PACKET socket mibo Programming 21 12-06-2011 03:14 AM
[SOLVED] problem receiving UDP packets with C, on openSuse Beelz Programming 9 10-07-2011 09:09 AM
[SOLVED] receiving UDP packets - where does the latency come from? mibo Programming 5 06-22-2011 10:33 AM
[SOLVED] Receiving UDP packets avishorp Linux - Networking 3 04-16-2010 05:56 AM
Only receiving UDP packets, no TCP erevlehdeux Linux - Networking 1 04-23-2004 07:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration