DCC use of connect() and sendto() on FreeBSD

Vernon Schryver vjs@calcite.rhyolite.com
Wed Sep 22 19:41:02 UTC 2004


> From: Jamie Clark 

> I've been attempting to use the FreeBSD port of the DCC package on
> FreeBSD 4.10-STABLE and I have noticed a few issues. I'm using
> dccm and the public servers.

What "FreeBSD port" is that?  There is at least one FreeBSD "port"
or "package" floating around.   I've not looked at (or for) a version
of it for several months, but when I did, it contained changes that
seemed undesirable to me.  Since then other people have reported
problems with one or perhaps another such package.


> I see the same problem as Andy Hilker did a few months back; with
> only one server (the first server) responding.
>
> The (snipped) truss output of a 'cddc "load map.txt"' gives:
>
> sendto(0x4,0xbfbfc2a8,0x28,0x0,0x0,0x0)          = 40 (0x28)
> sendto(0x4,0xbfbfc2a8,0x28,0x0,0xbfbfb114,0x10)  ERR#56 'Socket is


> At a hunch I changed these to #if, instead of #ifdef, and rebuilt.
> Alternatively the #define could be undone.
>
> Seems to be working fine now. cdcc and dccm no longer report
> unresponsive servers.
>
> My question is: is this the precompiler behaviour that was originally
> intended, or have I broken something?

It's good that to question local changes, but I think preliminary
questions are also wise, including:

  - Is my configuration novel or unusual?  Do other people have my
      trouble with configurations similar to mine?  If not, then is
      my proposed change a good idea?

     FreeBSD was the second target of the DCC source.  It remains
     among the most popular.  I always install versions on systems
     currently running 4.9-RELEASE and 5.2.1-RELEASE before publishing
     the tarball.

  - Do I really understand the effects of my propsed change?

      Your change basically inverts the meaning of that switch.  If
      you read the code, I think you'll see that you've simply told
      the DCC client library to not use connected UDP sockets.  That
      breaks the quick detection of some sick or unreachable DCC
      servers.  They will still be detected, but within seconds instead
      of milliseconds.

While your change may or may not be a good idea in some unsanctioned
versions of the DCC source, it is neither necessary nor desirable in
what I consider the official version.  See 
http://www.rhyolite.com/anti-spam/dcc/source/dcc-dccd.tar.Z
adn http://www.dcc-servers.net/dcc/source/dcc-dccd.tar.Z
for the current versions of that official source.


Vernon Schryver    vjs@rhyolite.com



More information about the DCC mailing list

Contact vjs@rhyolite.com by mail or use the form.