Re: Sendto(2) Never Reaches Wire

From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 02/19/05


Date: Sat, 19 Feb 2005 11:41:31 -0500

In article <pan.2005.02.19.00.16.59.510514.19230@ioplex.com>,
 Michael B Allen <mba2000@ioplex.com> wrote:

> I'm writing some async dns client code. I've noticed that if I send a
> quick succession of 5 requests sometimes [1] the first two never reach
> the wire even though sendto(2) correctly reports the number of bytes written
> and select(2) claims the socket is writeable for each call. This isn't
> a problem because the retry code can compensate but it happends pretty
> consistently on my Linux 2.4.28 x86 laptop so I'm wondering if there's a
> way to avoid it. Is this normal for a sendto implementation? Can someone
> recommend a technique to maybe ensure a little higher success rate?
>
> Thanks,
> Mike
>
> [1] If I run tests back to back within a few seconds all requests are
> sent successfully but if I wait a few minutes the first two packets
> never reach the wire.

My guess is the destination address isn't in the ARP cache when you send
the first request. And that the OS will only buffer one packet while
waiting for the ARP response, so if you send additional packets in quick
succession they replace each other.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


Relevant Pages

  • Re: Good sniffer software
    ... dsniff is the Swiss army knife of privacy invasion. ... the wire and stores it for later examination. ... could be used against your Windows-based networks. ... easily sniff clear text from packets to glean sensitive data. ...
    (alt.computer.security)
  • Re: Help with identifying scan/attack
    ... MRTG is measuring the load on the OTHER end of the wire... ... This smells like a hardware problem, especially given the last 2 lines quoted. ... resulting signal quality loss caused lots of stray/spurious packets. ... thinwire/thickwire cable, and every network tap or other break sends back ...
    (Incidents)
  • Re: How can I stop spying on my conversations?
    ... I installed ZoneAlarm Security ... Suite, can it help? ... The packets are being read from the wire. ...
    (microsoft.public.windowsxp.messenger)
  • Incorrect Mailmerge Output for Envelopes
    ... I am trying to print out size B4 envelopes at work to send out packets of ... information to my customers. ... repeately to change the envelope and feed options but with no success. ... problems printing documents with the printer. ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Home Network Speed (ftp vs scp)
    ... the bytes read from the wire must be decrypted ... > and returned to their original state before writing them to disk. ... it seems from my observations of tcpdump that SSH requires more ... packets to send the encrypted info as opposed to plain text. ...
    (comp.os.linux.networking)