2.2.2 SSTP Control Packet

This packet is a type of SSTP packet that is used by both the client and the server to send control messages to each other. The following diagram specifies the format that MUST be used for the SSTP control messages. Because this message is a type of SSTP packet, it follows the format of an SSTP packet (section 2.2.1).

The fields of the structure MUST be transmitted in network byte order from left to right.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Version

Reserved

C

LengthPacket

Message Type

Num Attributes

Attributes (variable)

...

Version (1 byte): An 8-bit (1-byte) field that is used to communicate and negotiate the version of SSTP that is used. The upper 4 bits are the MAJOR version, which MUST be 0x1, and the lower 4 bits are the MINOR version, which MUST be set to 0x0. This means that the 8-bit value of the Version field MUST be 0x10 and corresponds to Version 1.0.

Reserved (7 bits): This 7-bit field is reserved for future use. MUST be set to zero when sent and MUST be ignored on receipt.

C (1 bit): A 1-bit field that is used to indicate whether the packet is an SSTP control packet or an SSTP data packet. The value MUST be set to 1 for control packets.

LengthPacket (2 bytes): A 16-bit unsigned integer in network byte order that packs data for two fields, configured in the following format.

0

1

2

3

4

5

6

7

8

9

1

0

1

2

3

4

5

R

Length

R (4 bits): This 4-bit field is reserved for future use. It MUST be set to zero and ignored on receipt.

Length (12 bits): A 12-bit unsigned integer in network byte order that MUST specify the length, in bytes, of the entire SSTP packet, including the 4-byte SSTP header (that is, Version, 7-bit Reserved field, 1-bit C field, 4-bit R field, and 12-bit Length field).

Message Type (2 bytes): A 16-bit field in network byte order that specifies the type of message. It MUST be one of the following values.

Name

Value

SSTP_MSG_CALL_CONNECT_REQUEST

0x0001

SSTP_MSG_CALL_CONNECT_ACK

0x0002

SSTP_MSG_CALL_CONNECT_NAK

0x0003

SSTP_MSG_CALL_CONNECTED

0x0004

SSTP_MSG_CALL_ABORT

0x0005

SSTP_MSG_CALL_DISCONNECT

0x0006

SSTP_MSG_CALL_DISCONNECT_ACK

0x0007

SSTP_MSG_ECHO_REQUEST

0x0008

SSTP_MSG_ECHO_RESPONSE

0x0009

Num Attributes (2 bytes):  A 16-bit field in network byte order that specifies the number of attributes in the message.

Attributes (variable): An ordered list of variable-sized attributes that compose an SSTP control message. Each attribute MUST follow the format as specified in section 2.2.4.