Direct Client-to-Client
   HOME

TheInfoList



OR:

Direct Client-to-Client (DCC) (originally Direct Client Connection) is an
IRC Internet Relay Chat (IRC) is a text-based chat system for instant messaging. IRC is designed for group communication in discussion forums, called '' channels'', but also allows one-on-one communication via private messages as well as chat an ...
-related sub-protocol enabling
peers Peers may refer to: People * Donald Peers * Edgar Allison Peers, English academician * Gavin Peers * John Peers, Australian tennis player * Kerry Peers * Mark Peers * Michael Peers * Steve Peers * Teddy Peers (1886–1935), Welsh international ...
to interconnect using an IRC server for
handshaking A handshake is a globally widespread, brief greeting or parting tradition in which two people grasp one of each other's like hands, in most cases accompanied by a brief up-and-down movement of the grasped hands. Customs surrounding handshakes a ...
in order to exchange files or perform non-relayed chats. Once established, a typical DCC session runs independently from the IRC server. Originally designed to be used with
ircII ircII (pronounced ''i-r-c-two'' or ''irk-two'', and sometimes referred to as ''IRC client, second edition'') is a free, open-source Unix IRC and ICB client written in C. Initially released in the late 1980s, it is the oldest IRC client still m ...
it is now supported by many IRC clients. Some peer-to-peer clients on napster-protocol servers also have DCC send/get capability, including TekNap, SunshineUN and Lopster. A variation of the DCC protocol called SDCC (Secure Direct Client-to-Client), also known as DCC SCHAT supports
encrypted In cryptography, encryption is the process of encoding information. This process converts the original representation of the information, known as plaintext, into an alternative form known as ciphertext. Ideally, only authorized parties can decip ...
connections. An RFC specification on the use of DCC does not exist. DCC connections can be initiated in two different ways: * The most common way is to use CTCP to initiate a DCC session. The CTCP is sent from one user, over the IRC network, to another user. * Another way to initiate a DCC session is for the client to connect directly to the DCC server. Using this method, no traffic will go across the IRC network (the parties involved do not need to be connected to an IRC network in order to initiate the DCC connection).


History

ircII ircII (pronounced ''i-r-c-two'' or ''irk-two'', and sometimes referred to as ''IRC client, second edition'') is a free, open-source Unix IRC and ICB client written in C. Initially released in the late 1980s, it is the oldest IRC client still m ...
was the first IRC client to implement the CTCP and DCC protocols. The CTCP protocol was implemented by Michael Sandrof in 1990 for ircII version 2.1. The DCC protocol was implemented by Troy Rollo in 1991 for version 2.1.2, but was never intended to be portable to other IRC clients.


Common DCC applications


DCC CHAT

The CHAT service enables users to chat with each other over a DCC connection. The traffic will go directly between the users, and not over the IRC network. When compared to sending messages normally, this reduces IRC network load, allows sending of larger amounts of text at once, due to the lack of flood control, and makes the communication more secure by not exposing the message to the IRC servers (however, the message is still in
plaintext In cryptography, plaintext usually means unencrypted information pending input into cryptographic algorithms, usually encryption algorithms. This usually refers to data that is transmitted or stored unencrypted. Overview With the advent of comp ...
). DCC CHAT is normally initiated using a CTCP handshake. The user wishing to establish the connection sends the following CTCP to the target, DCC CHAT , where and are the IP address and port number of the sender, and are expressed as integers. is for standard DCC CHAT. The receiving party can then connect to the given port and IP address. Once a connection is established, the protocol used for DCC CHAT is very simple: users exchange
CRLF Newline (frequently called line ending, end of line (EOL), next line (NEL) or line break) is a control character or sequence of control characters in character encoding specifications such as ASCII, EBCDIC, Unicode, etc. This character, or a ...
-terminated messages. Messages that begin with an
ASCII ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because of ...
001 (control-A, represented below by ) and the word , and are terminated by another ASCII , are interpreted as emotes: ACTION waves goodbye A/code>.


DCC Whiteboard

This is an extension to DCC CHAT, allowing simple drawing commands to be sent as well as lines of text. DCC Whiteboard is initiated with a handshake similar to DCC CHAT, with the protocol replaced by : DCC CHAT wboard . Once the connection is established, the two clients exchange
CRLF Newline (frequently called line ending, end of line (EOL), next line (NEL) or line break) is a control character or sequence of control characters in character encoding specifications such as ASCII, EBCDIC, Unicode, etc. This character, or a ...
-terminated messages. Messages that begin (and optionally end) with ASCII are interpreted as special commands; the command represents an emote, while others cause lines to be drawn on the user's whiteboard surface, or allow the two clients to negotiate a set of features.


DCC SEND

The SEND service allows users to send files to one another. The original specification for the handshake did not allow the receiver to know the total file size nor to resume a transfer. This has made clients introduce their own extensions to the handshake, many of which have become widely supported. The original handshake consisted of the sender sending the following CTCP to the receiver: DCC SEND . As with DCC CHAT, and are the IP address and port where the sending machine will be listening for an incoming connection. Some clients enclose filenames with spaces in double quotes. It is common practice to add the file size as a last argument: DCC SEND . At this point, the original specification had the receiver either connect to the given address and port and wait for data, or ignore the request, but for clients supporting the DCC RESUME extension, a third alternative is to ask the sender to skip part of the file by sending the CTCP reply: DCC RESUME . If the sending client supports DCC RESUME, it will reply with, DCC ACCEPT , and the receiver can connect to the given address and port and listen for data to append to an already existing file. Data is sent to the client in blocks, each of which the client must acknowledge by sending the total number of bytes received in the form of a
32-bit In computer architecture, 32-bit computing refers to computer systems with a processor, memory, and other major system components that operate on data in 32-bit units. Compared to smaller bit widths, 32-bit computers can perform large calculation ...
network byte order In computing, endianness, also known as byte sex, is the order or sequence of bytes of a word of digital data in computer memory. Endianness is primarily expressed as big-endian (BE) or little-endian (LE). A big-endian system stores the most sig ...
integer. This slows down connections and is redundant because of TCP. The send-ahead extension relieves this problem somewhat by not waiting for the acknowledgements, but since the receiver still has to send them for every block it receives, in case the sender expects them, it is not solved completely. Another extension, TDCC, or turbo DCC, removes the acknowledgements, but requires a slightly modified handshake and is not widely supported. Older versions of TDCC replaced the word SEND in the handshake with TSEND; later versions use the word SEND but append a after the handshake, making this version of TSEND compatible with other clients (as long as they can parse the modified handshake).


DCC SEND exploit

The DCC send exploit can refer to two bugs, a variant
buffer overflow In information security and programming, a buffer overflow, or buffer overrun, is an anomaly whereby a program, while writing data to a buffer, overruns the buffer's boundary and overwrites adjacent memory locations. Buffers are areas of memory ...
error in
mIRC mIRC is an Internet Relay Chat (IRC) client for Windows, created in 1995. It is a fully functional chat utility and its integrated scripting language makes it extensible and versatile. mIRC has been described as "one of the most popular IRC cl ...
triggered by filenames longer than 14 characters and an
input validation error Input may refer to: Computing * Input (computer science), the act of entering data into a computer or data processing system * Information, any data entered into a computer or data processing system * Input device * Input method * Input port (disa ...
in some routers manufactured by Netgear,
D-Link D-Link Corporation is a Taiwanese multinational networking equipment manufacturing corporation headquartered in Taipei, Taiwan. It was founded in March 1986 in Taipei as ''Datex Systems Inc.'' History D-Link Corporation changed its name fr ...
and
Linksys Linksys is an American brand of data networking hardware products mainly sold to home users and small businesses. It was founded in 1988 by the couple Victor and Janie Tsao, both Taiwanese immigrants to the United States. Linksys products incl ...
, triggered by the use of port . The router exploit, in particular, may be triggered when the phrase '' followed by at least 6 characters without spaces or newlines appears anywhere in a TCP stream on port 6667, not just when an actual DCC SEND request has been made.


DCC XMIT

The XMIT service is a modified version of DCC SEND that allows for resuming files and cuts down on wasteful traffic from the ACK longs. XMIT is not widely supported. The XMIT handshake differs somewhat from the SEND handshake. The sender sends a CTCP offering a file to the receiver: DCC XMIT [_[_.html"_;"title="[_.html"_;"title="[_[_">[_[_">[_.html"_;"title="[_[_">[_[_/code> Square_brackets_here_enclose_optional_parts.__is_the_protocol_(computing).html" "title=".html"_;"title="[_[_">[_[_.html" ;"title="[_.html" ;"title="[ [ ">[ [ ">[_.html" ;"title="[ [ ">[ [ /code> Square brackets here enclose optional parts. is the protocol (computing)">protocol Protocol may refer to: Sociology and politics * Protocol (politics), a formal agreement between nation states * Protocol (diplomacy), the etiquette of diplomacy and affairs of state * Etiquette, a code of personal behavior Science and technolog ...
to use for the transfer; only is defined presently. Unlike standard DCC SEND, can be in the additional forms of standard dotted notation for IPv4, or either hexadecimal or mixed notation for IPv6. To leave an early parameter empty, but still supply a later one, the earlier one can be specified as . If the receiver does not implement the protocol used, it will send back a CTCP reply of the format: ERRMSG DCC CHAT unavailable. CHAT is used here to maintain compatibility with the error messages sent by the extended DCC CHAT. If the receiver declines the transfer, it sends the following CTCP reply: ERRMSG DCC CHAT declined. Other errors are reported in the same fashion. If the receiver is willing and capable of receiving the file, it will connect to the given address and port. What happens then depends on the protocol used. In the case of the protocol, the XMIT server will, upon receiving a connection, send a 32-bit time t in
network byte order In computing, endianness, also known as byte sex, is the order or sequence of bytes of a word of digital data in computer memory. Endianness is primarily expressed as big-endian (BE) or little-endian (LE). A big-endian system stores the most sig ...
, representing the file's modification time. Presumably based on the modification time of the local file, the client will then send another network byte order
long Long may refer to: Measurement * Long, characteristic of something of great duration * Long, characteristic of something of great length * Longitude (abbreviation: long.), a geographic coordinate * Longa (music), note value in early music mens ...
, an offset which the server should seek to when sending the file. This should be set to zero if the whole file is wanted, or the size of the local file if the client wishes to resume a previous download. While faster than SEND, XMIT carries one of the same limitations in that it is impossible to tell how big the file is, unless its size is specified in the CTCP negotiation or known beforehand. Furthermore, it is not possible to resume a file past the two gigabyte mark due to the 32-bit offset.


Passive DCC

In a normal DCC connection the initiator acts as the
server Server may refer to: Computing *Server (computing), a computer program or a device that provides functionality for other programs or devices, called clients Role * Waiting staff, those who work at a restaurant or a bar attending customers and su ...
, and the target is the
client Client(s) or The Client may refer to: * Client (business) * Client (computing), hardware or software that accesses a remote service on another computer * Customer or client, a recipient of goods or services in return for monetary or other valuabl ...
. Because of widespread firewalling and reduction of end-to-end transparency because of
NAT Nat or NAT may refer to: Computing * Network address translation (NAT), in computer networking Organizations * National Actors Theatre, New York City, U.S. * National AIDS trust, a British charity * National Archives of Thailand * National As ...
, the initiator might not be able to act as a server. Various ways of asking the target to act as the server have been devised:


DCC Server

This extension to normal DCC SEND and CHAT was introduced by the IRC client
mIRC mIRC is an Internet Relay Chat (IRC) client for Windows, created in 1995. It is a fully functional chat utility and its integrated scripting language makes it extensible and versatile. mIRC has been described as "one of the most popular IRC cl ...
. DCC Server has moderate support, but is not standard on all clients (see
Comparison of Internet Relay Chat clients The following tables compare general and technical information between a number of notable IRC client programs which have been discussed in independent, reliable prior published sources. General Basic general information about the notablecl ...
). It allows the initiation of a DCC connection by IP address, without the need of an IRC server. This is accomplished by the receiving client acting as a server (hence the name) listening (usually on port 59) for a handshake from the sender. For a CHAT, the initiator sends 1000 . The target then replies with, 1000 , and the rest proceeds according to standard DCC CHAT protocol. For a SEND, the initiator sends 1200 . The target replies with, 1210 , where is the offset in the file from which to start. From here the transfer proceeds as a normal DCC SEND. DCC Server also supports mIRC-style file servers and DCC GET.


RDCC

DCC Server provides no way specifying the port to use, so this has to be negotiated manually, which is not always possible, as one of the sides may not be a human. RDCC is a handshake mechanism for DCC Server, which in addition to the port also provides the IP address of the server, which the client might not be able to find otherwise because of host masking. It is not widely supported. The initiator requests the port the target is listening on by sending the CTCP query, RDCC , where is for chat, for send, or for file server. The target may then CTCP reply with, RDCC 0 , where and have the same meanings as for normal DCC SEND and CHAT. After this the initiator connects to the and , and a DCC Server handshake follows.


DCC REVERSE

Unlike DCC Server, where the handshake is handled over a direct IP connection, DCC REVERSE has a normal CTCP handshake, similar to the one used by DCC SEND. This is not widely implemented. The sender offers a file to the receiver by sending the CTCP message: DCC REVERSE . is a 1–50 characters-long string of
ASCII ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because of ...
characters in the range 33–126, and acts as an identifier for the transfer. If the receiver accepts, it sends the CTCP reply, DCC REVERSE Here, is the position in the file from which to start sending, is the IP address of the receiver in standard dotted notation for
IPv4 Internet Protocol version 4 (IPv4) is the fourth version of the Internet Protocol (IP). It is one of the core protocols of standards-based internetworking methods in the Internet and other packet-switched networks. IPv4 was the first version de ...
, or
hexadecimal In mathematics and computing, the hexadecimal (also base-16 or simply hex) numeral system is a positional numeral system that represents numbers using a radix (base) of 16. Unlike the decimal system representing numbers using 10 symbols, hexa ...
notation for
IPv6 Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol (IP), the communication protocol, communications protocol that provides an identification and location system for computers on networks and routes traffic ...
. The sender then connects to the ip address and port indicated by the receiver, and a normal DCC SEND follows. Both the sender and receiver can cancel the handshake by sending the CTCP reply, DCC REJECT REVERSE .


DCC RSEND

This is the KVIrc client's alternative to DCC REVERSE. The sender offers a file by sending the CTCP: DCC RSEND . The receiver can then accept by CTCP replying with, DCC RECV , and the sender connects to the receiver and sends as during a normal DCC SEND.


Reverse / Firewall DCC

This passive DCC mechanism is supported by at least
mIRC mIRC is an Internet Relay Chat (IRC) client for Windows, created in 1995. It is a fully functional chat utility and its integrated scripting language makes it extensible and versatile. mIRC has been described as "one of the most popular IRC cl ...
, Visual IRC, HexChat, KVIrc,
DMDirc The following tables compare general and technical information between a number of notable IRC client programs which have been discussed in independent, reliable prior published sources. General Basic general information about the notablecl ...
, Klient,
Konversation Konversation is an Internet Relay Chat (IRC) client built on the KDE Platform and is free software released under the terms of the GNU GPL-2.0-or-later. Konversation is currently maintained in the KDE Extragear Network module, which means that it ...
, and PhibianIRC. The sender offers a file by sending the CTCP message, DCC SEND 0 . is the
IP address An Internet Protocol address (IP address) is a numerical label such as that is connected to a computer network that uses the Internet Protocol for communication.. Updated by . An IP address serves two main functions: network interface ident ...
of the sender in network byte order, expressed as a single integer (as in standard DCC). The number 0 is sent instead of a valid port, signaling that this is a Reverse DCC request. is a unique integer; if TSEND is being used (by a client that supports it), the letter is appended to the token, letting the receiver know it doesn't need to send acknowledgements. The receiver can accept the file by opening a listening socket and responding with the CTCP message, DCC SEND . This is identical to the original Reverse DCC message, except the and identify the socket where the receiver is listening. is the same as in the original request, letting the sender know which request is being accepted. (Because this message follows the same format as a regular DCC send request, some servers which filter DCC requests may require the sender to add the receiver to their "DCC allow" list.) The sender then connects to the receiver's socket, sends the content of the file, and waits for the receiver to close the socket when the file is finished. When the RESUME extension to the SEND protocol is used, the sequence of commands becomes (with indicating an outgoing message on the initiating side, and response by its peer): >> DCC SEND 0
<< DCC RESUME 0
>> DCC ACCEPT 0
<< DCC SEND
After which the protocol proceeds as normal (i.e. the sender connects to the receiver's socket).


File servers (FSERVs)

A DCC ''fserve'', or file server, lets a user browse, read and download files located on a DCC server. Typically, this is implemented with a DCC CHAT session (which presents the user with a command prompt) or special CTCP commands to request a file. The files are sent over DCC SEND or DCC XMIT. There are many implementations of DCC file servers, among them is the FSERV command in the popular
mIRC mIRC is an Internet Relay Chat (IRC) client for Windows, created in 1995. It is a fully functional chat utility and its integrated scripting language makes it extensible and versatile. mIRC has been described as "one of the most popular IRC cl ...
client.


See also

* CTCP (Client-to-client protocol) *
XDCC XDCC (Xabi DCC or eXtended DCC) is a computer file sharing method which uses the Internet Relay Chat (IRC) network as a host service. History Limitations in the original DCC protocol prevented the transfers of very large files, or groups of ...
(eXtended DCC)


References


External links


A description of the DCC protocol
''(note: Most IRC-clients and networks have implemented extensions to the DCC protocol. The DCC commonly used today has evolved quite a bit from what this document describes.)''


A description of the Turbo DCC protocol

A description of the DCC Whiteboard protocol
{{DEFAULTSORT:Direct Client-To-Client Internet Relay Chat Internet terminology Network protocols Protocols related to Internet Relay Chat