Skip to content

Commit

Permalink
Wrapped diagrams in ASCII borders to avoid the multi-line comment com…
Browse files Browse the repository at this point in the history
…piler errors.
  • Loading branch information
Dimi1010 committed Jan 9, 2025
1 parent d940c6a commit 62cd151
Showing 1 changed file with 30 additions and 27 deletions.
57 changes: 30 additions & 27 deletions Packet++/header/SSLLayer.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once
#pragma once

#include "PointerVector.h"
#include "Layer.h"
Expand Down Expand Up @@ -275,39 +275,42 @@ namespace pcpp
/// Usually this layer will contain just one message (as the first example below
/// demonstrates). But there are cases a layer may contain more than 1 message. To better explain this layer
/// structure. We'll use 2 examples. The first will be client-hello message. The layer structure will look like this:
/// @verbatim
///
/// |------------------- SSLHandshakeLayer ----------------------|
/// +----------------------+-------------------------------------+
/// | ssl_tls_record_layer | SSLClientHelloMessage |
/// | struct | |
/// +----------------------+-------------------------------------+
/// / | \ | \ \ \
/// / version \ | handshake \ \ \
/// / TLS1_0 \ type \ \ rest of
/// type \ | SSL_CLIENT_HELLO \ \ message fields...
/// SSL_HANDSHAKE length handshake \
/// (22) xxx | version message
/// TLS1_2 length
/// | yyy
/// @verbatim
/// ╔══════════════════════════════════════════════════════════════════════════════════════════╗
/// ║ |------------------- SSLHandshakeLayer ----------------------| ║
/// ║ +----------------------+-------------------------------------+ ║
/// ║ | ssl_tls_record_layer | SSLClientHelloMessage | ║
/// ║ | struct | | ║
/// ║ +----------------------+-------------------------------------+ ║
/// ║ / | \ | \ \ \ ║
/// ║ / version \ | handshake \ \ \ ║
/// ║ / TLS1_0 \ type \ \ rest of ║
/// ║ type \ | SSL_CLIENT_HELLO \ \ message fields... ║
/// ║ SSL_HANDSHAKE length handshake \ ║
/// ║ (22) xxx | version message ║
/// ║ TLS1_2 length ║
/// ║ | yyy ║
/// ╚══════════════════════════════════════════════════════════════════════════════════════════╝
/// @endverbatim
///
/// Second example is a multiple-message handshake layer comprises of server-hello, certificate and
/// server-key-exchange messages:
///
/// @verbatim
///
/// |---------------------------------------------- SSLHandshakeLayer -----------------------------------------------------|
/// +----------------------+-------------------------------------+---------------------------+-----------------------------+
/// | ssl_tls_record_layer | SSLServerHelloMessage | SSLCertificateMessage | SSLServerKeyExchangeMessage |
/// | struct | | | |
/// +----------------------+-------------------------------------+---------------------------+-----------------------------+
/// / | \ | \ \ | \ | \
/// / version \ | handshake \ rest of | | rest | | rest
/// / TLS1_0 \ type \ message handshake of fields... handshake of fields...
/// type \ | SSL_SERVER_HELLO \ fields...| type | type
/// SSL_HANDSHAKE length handshake SSL_CERTIFICATE SSL_SERVER_KEY_EXCHANGE
/// (22) xxx | version,length | |
/// ╔═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
/// ║ |---------------------------------------------- SSLHandshakeLayer -----------------------------------------------------| ║
/// ║ +----------------------+-------------------------------------+---------------------------+-----------------------------+ ║
/// ║ | ssl_tls_record_layer | SSLServerHelloMessage | SSLCertificateMessage | SSLServerKeyExchangeMessage | ║
/// ║ | struct | | | | ║
/// ║ +----------------------+-------------------------------------+---------------------------+-----------------------------+ ║
/// ║ / | \ | \ \ | \ | \ ║
/// ║ / version \ | handshake \ rest of | | rest | | rest ║
/// ║ / TLS1_0 \ type \ message handshake of fields... handshake of fields... ║
/// ║ type \ | SSL_SERVER_HELLO \ fields...| type | type ║
/// ║ SSL_HANDSHAKE length handshake SSL_CERTIFICATE SSL_SERVER_KEY_EXCHANGE ║
/// ║ (22) xxx | version,length | | ║
/// ╚═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
/// @endverbatim
// clang-format on
#ifdef __GNUC__
Expand Down

0 comments on commit 62cd151

Please sign in to comment.