Visit Jeremy's Blog.
Go Back > Forums > Other *NIX Forums > *BSD
User Name
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.


  Search this Thread
Old 08-06-2010, 01:33 PM   #1
Registered: May 2008
Posts: 89

Rep: Reputation: 15
sendto doesn't send right away?

I'm using sendto to send data on a raw socket. I have a series of packets that I send out, but it doesn't look like they are going out in the order that I called sendto in. For example if I do:

sendto(packet 1)
sendto(packet 2)
sendto(packet 3)
sendto(packet 4)
sendto(packet 5)
If I do a tcpdump on the outbound interface then run the program, the packets don't come out in the order packet 1, packet 2, packet 3, packet 4, packet 5. It'll be some other random order. Since it's a raw socket, I can't set TCP_NODELAY, since I never connect to anything.

Is this even nagle's algorithm causing this? Is there some way I can force the packets out in order?
Old 08-07-2010, 05:38 PM   #2
Registered: May 2008
Posts: 89

Original Poster
Rep: Reputation: 15
It looks like it may be something else involving libpcap and evSelectFD.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Networking, sendto() dmiller Programming 1 04-01-2010 08:50 PM
Use send() instead of sendto() for UDP fjkum Programming 2 01-20-2010 11:16 PM
sendto hangs digvijay.gahlot Linux - Networking 0 04-24-2009 09:22 AM
sendto error (socket) payal_shah Linux - Networking 0 02-23-2005 01:18 PM
int to string+sendto pantera Programming 3 08-19-2004 08:19 PM > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 11:25 AM.

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