RFC 864 INTERNET STANDARD TESTING · APPLICATION

Chargen: Character Generator Protocol

Defines a test service that sends a stream or datagram of generated characters.

On rfc-editor.org ↗
PUBLISHED
May 1983
AUTHORS
J. Postel
STREAM
Legacy
TCP AND UDP PORT
19
UDP REPLY LENGTH
Random number between 0 and 512 characters
SUGGESTED LINE LENGTH
72 characters
DOI
10.17487/RFC0864
ERRATA
Reported errata

RFC text

Original text · RFC Editor View on rfc-editor.org ↗
Network Working Group                                          J. Postel
Request for Comments: 864                                            ISI
                                                                May 1983



                      Character Generator Protocol




This RFC specifies a standard for the ARPA Internet community.  Hosts on
the ARPA Internet that choose to implement a Character Generator
Protocol are expected to adopt and implement this standard.

A useful debugging and measurement tool is a character generator
service.  A character generator service simply sends data without regard
to the input.

TCP Based Character Generator Service

   One character generator service is defined as a connection based
   application on TCP.  A server listens for TCP connections on TCP port
   19.  Once a connection is established a stream of data is sent out
   the connection (and any data received is thrown away).  This
   continues until the calling user terminates the connection.

   It is fairly likely that users of this service will abruptly decide
   that they have had enough and abort the TCP connection, instead of
   carefully closing it.  The service should be prepared for either the
   carfull close or the rude abort.

   The data flow over the connection is limited by the normal TCP flow
   control mechanisms, so there is no concern about the service sending
   data faster than the user can process it.

UDP Based Character Generator Service

   Another character generator service is defined as a datagram based
   application on UDP.  A server listens for UDP datagrams on UDP port
   19.  When a datagram is received, an answering datagram is sent
   containing a random number (between 0 and 512) of characters (the
   data in the received datagram is ignored).

   There is no history or state information associated with the UDP
   version of this service, so there is no continuity of data from one
   answering datagram to another.

   The service only send one datagram in response to each received
   datagram, so there is no concern about the service sending data
   faster than the user can process it.

Character Generator Protocol


Data Syntax

   The data may be anything.  It is recommended that a recognizable
   pattern be used in tha data.

      One popular pattern is 72 chraracter lines of the ASCII printing
      characters.  There are 95 printing characters in the ASCII
      character set.  Sort the characters into an ordered sequence and
      number the characters from 0 through 94.  Think of the sequence as
      a ring so that character number 0 follows character number 94.  On
      the first line (line 0) put the characters numbered 0 through 71.
      On the next line (line 1) put the characters numbered 1 through
      72.  And so on.  On line N, put characters (0+N mod 95) through
      (71+N mod 95).  End each line with carriage return and line feed.

Character Generator Protocol


Example

!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgh
"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi
#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij
$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijk
%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl
&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklm
'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmn
()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmno
)*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnop
*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopq
+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqr
,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrs
-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrst
./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstu
/0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuv
0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvw
123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwx
23456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxy
3456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz
456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{
56789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|
6789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}
789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
89:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
9:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !
:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"
;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#
<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$
=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%
>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&
?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&'
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&'(
ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&'()
BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&'()*
CDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&'()*+
DEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&'()*+,
EFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&'()*+,-
FGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&'()*+,-.
GHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&'()*+,-./
HIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&'()*+,-./0
IJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&'()*+,-./01
JKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&'()*+,-./012
KLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&'()*+,-./0123
LMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&'()*+,-./01234
MNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&'()*+,-./012345
NOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&'()*+,-./0123456

ISO Plain Language

On this page
PROBLEMA simple character-generating service can help people debug and measure network connections.
MECHANISMA server on port 19 sends a continuing character stream over TCP or, for each UDP request, one reply containing a random number of characters.
WHAT IT DOESThe RFC recommends recognizable output, including a rotating pattern of ASCII printing characters that can make missing or altered data noticeable.

§1A Service for Testing Connections

A character generator sends data without regard to its input. The RFC describes it as a useful debugging and measurement tool for hosts that choose to implement it.

The data can be anything, though the memo recommends using a recognizable pattern.

The service sends generated data to help test a connection. The pattern can make errors easier to see.

§2TCP and UDP Services

For TCP, a server listens on TCP port 19. After a connection opens, it sends a stream of data and discards received data until the user closes or aborts the connection. TCP flow control limits how quickly data is sent to the user.

For UDP, a server listens on UDP port 19. Each received datagram gets one reply containing a random number between 0 and 512 characters, and the request contents are ignored. The service keeps no state between replies.

TCP provides a stream that continues until the user ends the connection. UDP returns one independently sized response for each datagram and keeps no record between responses.

§3A Rotating Character Pattern

One suggested pattern uses lines of 72 ASCII printing characters. The 95 printing characters are placed in order and treated as a ring, so character 0 follows character 94.

Each new line begins one character later than the previous line, wrapping around at the end of the sequence. Lines end with carriage return and line feed.

Each line starts one character later than the line before it and wraps around at the end. If data is missing or changed, the repeated pattern can look different.