cdcc(8)
๐ cdcc(8) โ Control Distributed Checksum Clearinghouse ๐
manual name: System Manager's Manual โ okay bestie, let's get into it ๐
โจ NAME โจ
cdcc โ Control Distributed Checksum Clearinghouse
๐ SYNOPSIS ๐
cdcc [-VBdq] [-h homedir] [-c ids] [op1 op2 ... [-]]
๐ฆ DESCRIPTION ๐ฆ
Okay so cdcc is the main-character tool for clearing, controlling, and querying the control file used by Distributed Checksum Clearinghouse clients like dccm(8). The map file is where all the info lives: host names, UDP port numbers, IDs, and passwords local clients use to talk to servers, plus IP addresses, round trip times, and other information. ๐
While cdcc is set-UID, it uses the real UID only when accessing the map file. It refuses to display sensitive information such as passwords unless the real UID is the same as the effective UID. Note that cdcc needs to be set to a UID that can read and write the map file, but that UID need not be 0. ๐ซถ
cdcc is also used to send commands to DCC servers to tell them to stop, reload their lists of DCC IDs, turn on tracing, and so forth. โจ
Many commands sent to DCC servers require a numeric DCC ID and a password recognized by the server. A DCC password is a 1-32 character string that does not contain blank, tab, newline or carriage return characters. The ID is specified with the id operation. If cdcc is run with a real UID that can read the ids file and a password is not specified (see the password operation), then the current password for the specified ID in the ids file will be used. If no ids file is available and a password and DCC ID are not specified, cdcc uses the anonymous DCC client-ID. DCC servers do not expect a password from clients using the anonymous client-ID, but they also won't honor control requests. ๐ญ
Operations that modify the map file can only be performed when the real UID is sufficient to modify the file directly. Trying to perform an operation that requires a password without specifying a server-ID or without using a UID that can access the ids file produces an error message complaining about a "privileged operation." ๐
Commands and operations are read from the command line or from stdin. A series of op1 op2 ... operations followed by a - (a dash) causes operations to be read from stdin after the command line operations are processed. Semi-colons or newlines separate commands in UNIX command-line "words," as well as when commands are read from stdin. Since each command line operation must be a shell "word," quotes are often required as in
% cdcc "load map.txt"
or
% cdcc "host localhost;info" stats
๐ OPTIONS ๐
The following options are available, bestie:
-Vโ displays the version of the DCC controller. Two or more-Voptions show the options with which it was built.-Bโ sends error messages from the DCC server to bothstderrandstdoutinstead of onlystderr.-dโ enables debugging output from the DCC client software. Additional-doptions increase the number of messages. See thedebugcommand.-qโ quiets initial complaints about the map file and some messages about successful commands. See thequietcommand.-h homedirโ overrides the default DCC home directory,/var/dcc. See thehomediroperation.-c idsโ specifies the file containing DCC IDs and passwords known by local DCC servers. An ids file that can be read by others cannot be used. The format of the ids file is described indccd(8).op1 op2 ...โ are operations or commands such as"id 100; stop". Commands or operations specified on the command line are performed before the first interactive request. The last command can be-to specify that additional commands should be read fromstdin.
๐ OPERATIONS ๐
Local operations include the following:
help [command]โ lists information about one or all available commands and operations.exitโ stopscdcc.grey [on | off]โ switches between DCC and greylist servers.homedir [path]โ displays or specifies the DCC home directory,/var/dcc.file [map]โ displays or specifies the name or path of the map file. The string"-"specifies the default file/var/dcc/map.new map [map]โ creates a new, empty file for DCC server host names, port numbers, passwords, and so forth. There must not already be a file of the same name. The default ismapin the DCC home directory.delete host[,port]โ deletes the entry in the map file forhostand UDP port. If greylist mode has been set with thegrey oncommand, the entry for the grelist server athostis deleted.add host[,port] [RTT+adj|RTT-adj] [Greylist] [client-ID [password]]โ adds an entry to the map file. The port can be"-"to specify the default DCC server port number.- An adjustment to the round trip time is between
-2000and+2000and follows the stringRTT. The adjustment is added to the average measured round trip time when the DCC client software picks the "nearest" DCC server, or the server with the smallest RTT. If an IP address is mentioned more than once in the list of servers, for example because it is among the addresses for more than one server name, conflicts among RTT adjustments are resolved by picking the adjustment with the largest absolute value. Greylistmarks an entry for a greylist servers.Greylistis assumed if greylist mode has been set with thegrey oncommand, Seedccd(8).- If both the
client-IDand thepasswordare absent, the anonymous client-ID,1, is used. The stringanonis equivalent to the anonymous client-ID. A null password string is assumed if the password is missing and the client-ID is1or also missing.
- An adjustment to the round trip time is between
load info-fileโ loads the current parameter file with the host names, port numbers, IDs, and passwords ininfo-file. Standard input is understood ifinfo-fileis"-".- A suitable file can be created with the
infooperation. It consists of ignored blank or comment lines starting with#and other lines in the same format as the arguments to theaddoperation. Note that output of theinfocommand will lack passwords unless it is run by a privileged user.
- A suitable file can be created with the
host [hostname]โ specifies the host name of the DCC server to which commands should be sent. Ifhostnameis"-", the current default DCC server is chosen.port [port]โ specifies the UDP port number of the DCC server to which commands should be sent. The default is6277or6276depending on the setting of the greylist mode controlled with thegreycommand.password secretโ specifies the password with which to sign commands sent to the DCC server specified with theserverandportoperations.id [ID]โ specifies or displays the numeric DCC ID for commands sent to the DCC server specified with theserverandportoperations. If no password is specified with thepasswordcommand, the password is sought in the local ids.info [-N]โ displays information about the connections to DCC servers. It starts with the current date and name of the current map file or says thatcdccis using the implicit file created with theserverandportoperations. It then says when host names will next be resolved into IP addresses, the smallest round trip time to the IP addresses of known DCC servers. The host name, UDP port number (or dash if it is the default), DCC client-ID, and password (ifcdccis used by a privileged user) are shown in one line per configured DCC server.- The currently preferred IP address is indicated by an asterisk. The "brand" of the server, its DCC ID, and its IP address are displayed in one line per IP address. The performance of the server at each IP address in the most recent
32operations is displayed in a second line. The second line ends with the measured delay imposed by the server on requests with this client's ID. -Ndisplays the reverse DNS name of each server.
- The currently preferred IP address is indicated by an asterisk. The "brand" of the server, its DCC ID, and its IP address are displayed in one line per IP address. The performance of the server at each IP address in the most recent
RTT [-N]โ measures the round trip time to the DCC servers. It does this by discarding accumulated information and forcing a probe of all listed server IP addresses.
Beware that when run with sufficient privilege, theRTToperation is like theinfoandloadoperations and displays cleartext passwords.
-Ndisplays the reverse DNS name of each server.
debug Op Ar on | off | TTL=xโ increases or decreases debugging information from the DCC client software or sets the IP TTL on queries to the server. See-d.- Some operating systems do not include the functions required to change the IP TTL. Others include the required functions but have no apparent effect.
quiet [on | off]โ makes commands more quiet or more verbose.IPv6 [on | off | only]โ clients to try to use IPv6 and IPv4, IPv4 only, or IPv6 only.SOCKS [on | off]โ tell DCC to use the SOCKS5 protocol if they have been built with a SOCKS library. The socks library linked with the DCC client must be configured appropriately, often including knowing which DCC servers must be connected via the SOCKS proxy and which can be reached directly. DCC clients use SOCKS functions such asRsendto()with all or no servers depending on the setting of this switch.src [- |] IPaddress[,IPv6address]โ displays or configures the source address of DCC client requests.-removes the explicit configuration of the source, whileIPaddressorIPaddress,IPv6addresssets it. This makes sense only on multi-homed hosts. It can be useful for passing firewalls.
๐ DCC SERVER COMMANDS ๐
Commands that can be sent to a DCC server include the following. Most of the commands must be used with the server's ID specified with the id command. The specified ID is included in the commands sent to the server. The command itself is digitally signed with the first password associated with the ID in the ids file. The server requires that the signature match one of the passwords associated with the ID in its ids file. ๐ฅ
delck type hex1 hex2 hex3 hex4โ asks the server to delete thetypechecksum with valuehex1 hex2 hex3 hex4. The type and checksum values can be found indccproc(8)anddccm(8)log files or computed withdccproc -QC.
Ok so before we get into the actual commands, a lil note about deleting checksums โ and honestly? It's giving "why bother" energy. There are very few situations where it even makes sense to bother to delete checksums. Like, for example: mail that was accidentally reported with a target count of "MANY" is either private, and so will not be seen by other people, and so will not be affected โ or it's bulk, and its source so must have already been whitelisted by recipients. So yeah. Barely worth it. ๐
๐งฎ stats [all | clear]
Displays the current status and statistics from the current DCC server, or for all known DCC servers. And here's the kicker: the server's counters get cleared after they're displayed โ but only when the server's ID has been specified with the id ID operation. So like, clear doesn't just happen on its own, iykyk. โจ
๐ฅ clients [-nsiaVAK] [-I id] [max [thold]] [addr[/prefix]]
Shows you some of the clients the server has seen recently. Obsessed with the flag buffet here, bestie:
-nโ display only the IP addresses, not the names of clients.-sโ sort the clients by the number of requests they've made.-iโ count clients with the same client-ID as single entities.-Iid โ display information only about clients using client-ID id.-aโ produce 24 hour average numbers of requests.-Aโ display only anonymous clients.-Kโ display only clients using client-IDs other than the anonymous ID of1.-Vโ include the DCC protocol versions used by clients.- max โ display only the max most recent clients.
- max thold โ display the most recent max clients that have made at least thold requests.
- addr
[/prefix]โ restricts the results to the DCC client with that IP address, or clients with addresses in that block of addresses. Individual clients in a blacklisted block of addresses in the server's/var/dcc/blacklistfile are not displayed unless explicitly requested by address or address block. ๐ซถ
Oh and a lil detail: clients with IDs marked with an asterisk (*) used the wrong password for that client-ID. Sussy. ๐
Heads up on how this actually works under the hood: the mechanism that implements this command involves asking the DCC server for the first approximately100clients, then the second about100, and so on. If entries change position in the complete list maintained by the server between requests, the displayed list will have duplicate or missing entries. Not a vibe, but it is what it is. Also โ only clients since the last use ofstats clearare displayed. ๐
๐ stop
Tells the DCC server to exit. That's it, that's the whole thing. Periodt.
๐ฅ๏ธ system stop
Tells the DCC server to exit so that the operating system can be shut down. This tells the DCC server on some systems to delete the dcc_db.hash file to speed system shut down โ and the file will be rebuilt automatically by dbclean when the DCC server is restarted. So like, don't panic about the deletion, it's a โจplannedโจ deletion. ๐ธ
๐งผ clean stop
Tells the DCC server to exit after applying fsync() to the database. Very "let me save my progress first" of it. Responsible queen behavior. ๐
๐ reload IDs
Tells the local DCC server to reload its DCC ids file immediately. And ngl, this command is not strictly needed โ every several minutes, the DCC server notices if the file has been changed and automatically reads it. So it's like, purely for the impatient besties. ๐
๐ flood check
Tells the DCC server to check for changes in the flod file and try to restart any of the streams to peers that are broken. (Yes, flod โ that's exactly how it's spelled here, girlies, I'm not touching it. Copying it character for character like a good little archivist. ๐)
๐ flood shutdown
Tells the DCC server to cleanly stop flooding checksums to and from peers. The server will wait for sending and receiving peers to agree to stop โ so polite, so consent-forward. Each flood shutdown or flood halt request increases a count of reasons why the server should not flood checksums. ๐ฅ
๐ flood halt
Tells the DCC server to abruptly stop flooding checksums to and from peers. No negotiation, no waiting, just yeet. ๐
โช flood rewind server-ID
Tells the DCC server to ask its peer with server-ID to rewind and resend its stream of checksums. "Run it back," basically. ๐ฆ
โฉ flood ffwd in server-ID
Tells the DCC server to ask its peer to "fast forward" or skip to the end of the incoming flood.
โฉ flood ffwd out server-ID
Tells the DCC server to "fast forward" or skip to the current end of the flood to its peer.
โถ๏ธ flood resume
Tells the DCC server to reduce the number of reasons to not flood checksums that were increased by flood shutdown and flood halt. When the number of reasons reaches zero, the server tries to resume flooding. Slay, we're so back. โจ
๐ flood list
Displays the list of current incoming and outgoing floods. Each line contains the server-ID of the peer, the IP address and port used for the outgoing flood, the address for the incoming flood if different, and the host name. And a privacy moment: only the server-IDs of flooding peers are disclosed with the server's ID. ๐
๐ flood stats [clear] { server-ID | all }
Displays counts of checksum reports sent and received by the current flooding connections to and from server-ID, or all flooding connections โ and then optionally clears the counts. Receipts and then receipts-clearing, iconic. ๐งพ
๐๏ธ DB clean
Used by dbclean to tell the server that the database expiration has begun.
๐๏ธ DB new
Used by dbclean to tell the server that the database cleaning is complete. Bestie, the DB is fresh out the salon. ๐
๐งน flush cache
Tells the server to flush its cache and to keep it clean. Sparkling. โจ
โ
cache ok
Tells the server to resume normal operations after flush cache. We're so back to business. ๐ซถ
โฐ clock check
Asks the DCC server to say how much its clock differs from the local clock. Clock drama, detected. ๐
โฐ clock kludge +/- seconds
Adjusts the timestamps in server commands to make it possible to control servers with inaccurate clocks. Fixing the clock's whole attitude, one offset at a time. ๐ญ
๐ trace default
Turns on ANON and CLNT tracing and turns off all others.
๐ trace mode {on|off}
Turns the server's tracing mode on or off. Mode must be one of:
ADMNโ administrative requests fromcdccANONโ errors by anonymous clientsCLNTโ errors by authenticated clientsRLIMโ rate-limited messagesQUERYโ all queries and reportsRIDCโ messages concerning the report-ID cache that is used to detect duplicate reports from clientsFLOOD1โ messages about inter-server flooding connectionsFLOOD2โ messages about flooded reportsIDSโ unknown server-IDs in flooded reportsBLโ blacklisted clientsDBโ odd database eventsWLISTโ reports of whitelisted checksums from authenticated, not anonymous DCC clients
Look at all those little tracing besties. Obsessed with the range. ๐
And for exit status: cdcc exits with 0 on success, and >0 if an error occurs in operations specified on the command line. Zero is the slay number, anything else is a cry for help. ๐ญ
๐ FILES โจ
/var/dccโ default DCC home directory unless changed by thehomediroperation.mapโ memory mapped file in the home DCC home directory of server host names, port numbers, passwords, measured round trip times (RTT), and so forth.idsโ list of IDs and passwords, as described indccd(8). It is only required by systems running the DCC server, but is used bycdccif available.
๐ SEE ALSO ๐ธ
dbclean(8), dcc(8), dccd(8), dblist(8), dccifd(8), dccm(8), dccproc(8), dccsight(8).
Go read the whole friend group, fr fr. ๐ซถ
๐ HISTORY ๐
Implementation of cdcc was started at Rhyolite Software in 2000. This document describes version RHYOLITE_VERSION.
<div align="center">๐ and that's the page, bestie ๐</div>
<np>This was cdcc(8) โ version RHYOLITE_VERSION, dated March 22, 2024, and yes I'm putting the whole footer energy in the sign-off because that's just how we do it. Mwah. ๐โจ</np>
๐ฆ where this page comes from
- alpine 3.24: dcc-doc 2.3.169-r3 ยท custom
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms