Connected: An Internet Encyclopedia
3.2. Packet Format

Up: Connected: An Internet Encyclopedia
Up: Requests For Comments
Up: RFC 1334
Up: 3. Challenge-Handshake Authentication Protocol
Prev: 3.1. Configuration Option Format
Next: 3.2.1. Challenge and Response

3.2. Packet Format

3.2. Packet Format

Exactly one Challenge-Handshake Authentication Protocol packet is encapsulated in the Information field of a PPP Data Link Layer frame where the protocol field indicates type hex c223 (Challenge-Handshake Authentication Protocol). A summary of the CHAP packet format is shown below. The fields are transmitted from left to right.

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Code      |  Identifier   |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Data ...
   +-+-+-+-+

Code

The Code field is one octet and identifies the type of CHAP packet. CHAP Codes are assigned as follows:

         1       Challenge
         2       Response
         3       Success
         4       Failure

Identifier

The Identifier field is one octet and aids in matching challenges, responses and replies.

Length

The Length field is two octets and indicates the length of the CHAP packet including the Code, Identifier, Length and Data fields. Octets outside the range of the Length field should be treated as Data Link Layer padding and should be ignored on reception.

Data

The Data field is zero or more octets. The format of the Data field is determined by the Code field.


Next: 3.2.1. Challenge and Response

Connected: An Internet Encyclopedia
3.2. Packet Format