Skip to content

Commit

Permalink
Reformatted /** */ style comments to /// and // comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimi1010 committed Jan 9, 2025
1 parent d98f4d7 commit c3040c4
Show file tree
Hide file tree
Showing 57 changed files with 2,355 additions and 2,376 deletions.
22 changes: 11 additions & 11 deletions Packet++/header/ArpLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@ namespace pcpp
#pragma pack(push, 1)
struct arphdr
{
/** Hardware type (HTYPE) */
/// Hardware type (HTYPE)
uint16_t hardwareType;
/** Protocol type (PTYPE). The permitted PTYPE values share a numbering space with those for EtherType */
/// Protocol type (PTYPE). The permitted PTYPE values share a numbering space with those for EtherType
uint16_t protocolType;
/** Hardware address length (HLEN). For IPv4, this has the value 0x0800 */
/// Hardware address length (HLEN). For IPv4, this has the value 0x0800
uint8_t hardwareSize;
/** Protocol length (PLEN). Length (in octets) of addresses used in the upper layer protocol. (The upper layer
* protocol specified in PTYPE.) IPv4 address size is 4 */
/// Protocol length (PLEN). Length (in octets) of addresses used in the upper layer protocol. (The upper layer
/// protocol specified in PTYPE.) IPv4 address size is 4
uint8_t protocolSize;
/** Specifies the operation that the sender is performing: 1 (::ARP_REQUEST) for request, 2 (::ARP_REPLY) for
* reply */
/// Specifies the operation that the sender is performing: 1 (::ARP_REQUEST) for request, 2 (::ARP_REPLY) for
/// reply
uint16_t opcode;
/** Sender hardware address (SHA) */
/// Sender hardware address (SHA)
uint8_t senderMacAddr[6];
/** Sender protocol address (SPA) */
/// Sender protocol address (SPA)
uint32_t senderIpAddr;
/** Target hardware address (THA) */
/// Target hardware address (THA)
uint8_t targetMacAddr[6];
/** Target protocol address (TPA) */
/// Target protocol address (TPA)
uint32_t targetIpAddr;
};
#pragma pack(pop)
Expand Down
84 changes: 42 additions & 42 deletions Packet++/header/Asn1Codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,94 +15,94 @@ namespace pcpp
/// An enum for representing ASN.1 tag class
enum class Asn1TagClass : uint8_t
{
/** The Universal tag class */
/// The Universal tag class
Universal = 0,
/** The Application tag class */
/// The Application tag class
Application = 1,
/** The Context-Specific tag class */
/// The Context-Specific tag class
ContextSpecific = 2,
/** The Private tag class */
/// The Private tag class
Private = 3,
};

/// An enum for representing ASN.1 Universal tag types
enum class Asn1UniversalTagType : uint8_t
{
/** The reserved identifier for the End-of-Contents marker in an indefinite length encoding */
/// The reserved identifier for the End-of-Contents marker in an indefinite length encoding
EndOfContent = 0,
/** The universal tag type for Boolean */
/// The universal tag type for Boolean
Boolean = 1,
/** The universal tag type for Integer */
/// The universal tag type for Integer
Integer = 2,
/** The universal tag type for Bit String */
/// The universal tag type for Bit String
BitString = 3,
/** The universal tag type for Octet String */
/// The universal tag type for Octet String
OctetString = 4,
/** The universal tag type for Null */
/// The universal tag type for Null
Null = 5,
/** The universal tag type for Object Identifier */
/// The universal tag type for Object Identifier
ObjectIdentifier = 6,
/** The universal tag type for Object Descriptor */
/// The universal tag type for Object Descriptor
ObjectDescriptor = 7,
/** The universal tag type for External */
/// The universal tag type for External
External = 8,
/** The universal tag type for Real */
/// The universal tag type for Real
Real = 9,
/** The universal tag type for Enumerated */
/// The universal tag type for Enumerated
Enumerated = 10,
/** The universal tag type for Embedded-PDV */
/// The universal tag type for Embedded-PDV
EmbeddedPDV = 11,
/** The universal tag type for UTF8 String */
/// The universal tag type for UTF8 String
UTF8String = 12,
/** The universal tag type for Relative Object Identifier */
/// The universal tag type for Relative Object Identifier
RelativeObjectIdentifier = 13,
/** The universal tag type for Time */
/// The universal tag type for Time
Time = 14,
/** A reserved value */
/// A reserved value
Reserved = 15,
/** The universal tag type Sequence */
/// The universal tag type Sequence
Sequence = 16,
/** The universal tag type for Set */
/// The universal tag type for Set
Set = 17,
/** The universal tag type for Numeric String */
/// The universal tag type for Numeric String
NumericString = 18,
/** The universal tag type for Printable String */
/// The universal tag type for Printable String
PrintableString = 19,
/** The universal tag type for T61String */
/// The universal tag type for T61String
T61String = 20,
/** The universal tag type for Videotex String */
/// The universal tag type for Videotex String
VideotexString = 21,
/** The universal tag type for IA5String */
/// The universal tag type for IA5String
IA5String = 22,
/** The universal tag type for UTC time */
/// The universal tag type for UTC time
UTCTime = 23,
/** The universal tag type for Generalized time */
/// The universal tag type for Generalized time
GeneralizedTime = 24,
/** The universal tag type for GraphicString */
/// The universal tag type for GraphicString
GraphicString = 25,
/** The universal tag type for VisibleString */
/// The universal tag type for VisibleString
VisibleString = 26,
/** The universal tag type for GeneralString */
/// The universal tag type for GeneralString
GeneralString = 27,
/** The universal tag type for UniversalString */
/// The universal tag type for UniversalString
UniversalString = 28,
/** The universal tag type for CharacterString */
/// The universal tag type for CharacterString
CharacterString = 29,
/** The universal tag type for BMPString */
/// The universal tag type for BMPString
BMPString = 30,
/** The universal tag type for Date */
/// The universal tag type for Date
Date = 31,
/** The universal tag type for Time of Day */
/// The universal tag type for Time of Day
TimeOfDay = 32,
/** The universal tag type for Date-Time */
/// The universal tag type for Date-Time
DateTime = 33,
/** The universal tag type for Duration */
/// The universal tag type for Duration
Duration = 34,
/** The universal tag type for Object Identifier Internationalized Resource Identifier (IRI) */
/// The universal tag type for Object Identifier Internationalized Resource Identifier (IRI)
ObjectIdentifierIRI = 35,
/** The universal tag type for Relative Object Identifier Internationalized Resource Identifier (IRI) */
/// The universal tag type for Relative Object Identifier Internationalized Resource Identifier (IRI)
RelativeObjectIdentifierIRI = 36,
/** A non-applicable value */
/// A non-applicable value
NotApplicable = 255
};

Expand Down
54 changes: 27 additions & 27 deletions Packet++/header/BgpLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ namespace pcpp
/// An enum representing BGP message types
enum BgpMessageType
{
/** BGP OPEN message */
/// BGP OPEN message
Open = 1,
/** BGP UPDATE message */
/// BGP UPDATE message
Update = 2,
/** BGP NOTIFICATION message */
/// BGP NOTIFICATION message
Notification = 3,
/** BGP KEEPALIVE message */
/// BGP KEEPALIVE message
Keepalive = 4,
/** BGP ROUTE-REFRESH message */
/// BGP ROUTE-REFRESH message
RouteRefresh = 5,
};

Expand All @@ -41,11 +41,11 @@ namespace pcpp
/// Represents the common fields of a BGP 4 message
struct bgp_common_header
{
/** 16-octet marker */
/// 16-octet marker
uint8_t marker[16];
/** Total length of the message, including the header */
/// Total length of the message, including the header
uint16_t length;
/** BGP message type */
/// BGP message type
uint8_t messageType;
};
#pragma pack(pop)
Expand Down Expand Up @@ -124,15 +124,15 @@ namespace pcpp
/// BGP OPEN message structure
typedef struct bgp_open_message : bgp_common_header
{
/** BGP version number */
/// BGP version number
uint8_t version;
/** Autonomous System number of the sender */
/// Autonomous System number of the sender
uint16_t myAutonomousSystem;
/** The number of seconds the sender proposes for the value of the Hold Timer */
/// The number of seconds the sender proposes for the value of the Hold Timer
uint16_t holdTime;
/** BGP Identifier of the sender */
/// BGP Identifier of the sender
uint32_t bgpId;
/** The total length of the Optional Parameters field */
/// The total length of the Optional Parameters field
uint8_t optionalParameterLength;
} bgp_open_message;
#pragma pack(pop)
Expand All @@ -141,11 +141,11 @@ namespace pcpp
/// A structure that represents BGP OPEN message optional parameters
struct optional_parameter
{
/** Parameter type */
/// Parameter type
uint8_t type;
/** Parameter length */
/// Parameter length
uint8_t length;
/** Parameter data */
/// Parameter data
uint8_t value[32];

// FIXME: This does not actually zero the data.
Expand Down Expand Up @@ -241,9 +241,9 @@ namespace pcpp
/// It's used to represent BGP Withdrawn Routes and Network Layer Reachability Information (NLRI)
struct prefix_and_ip
{
/** IPv4 address mask, must contain one of the values: 8, 16, 24, 32 */
/// IPv4 address mask, must contain one of the values: 8, 16, 24, 32
uint8_t prefix;
/** IPv4 address */
/// IPv4 address
IPv4Address ipAddr;

/// A default c'tor that zeroes all data
Expand All @@ -261,13 +261,13 @@ namespace pcpp
/// A structure that represents BGP OPEN message Path Attributes information
struct path_attribute
{
/** Path attribute flags */
/// Path attribute flags
uint8_t flags;
/** Path attribute type */
/// Path attribute type
uint8_t type;
/** Path attribute length */
/// Path attribute length
uint8_t length;
/** Path attribute data. Max supported data length is 32 bytes */
/// Path attribute data. Max supported data length is 32 bytes
uint8_t data[32];

// FIXME: This does not actually zero the data.
Expand Down Expand Up @@ -409,9 +409,9 @@ namespace pcpp
/// BGP NOTIFICATION message structure
typedef struct bgp_notification_message : bgp_common_header
{
/** BGP notification error code */
/// BGP notification error code
uint8_t errorCode;
/** BGP notification error sub-code */
/// BGP notification error sub-code
uint8_t errorSubCode;
} bgp_notification_message;
#pragma pack(pop)
Expand Down Expand Up @@ -543,11 +543,11 @@ namespace pcpp
/// BGP ROUTE-REFRESH message structure
typedef struct bgp_route_refresh_message : bgp_common_header
{
/** Address Family Identifier */
/// Address Family Identifier
uint16_t afi;
/** Reserved field */
/// Reserved field
uint8_t reserved;
/** Subsequent Address Family Identifier */
/// Subsequent Address Family Identifier
uint8_t safi;
} bgp_route_refresh_message;
#pragma pack(pop)
Expand Down
6 changes: 3 additions & 3 deletions Packet++/header/CotpLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ namespace pcpp
#pragma pack(push, 1)
typedef struct
{
/** length */
/// length
uint8_t length;
/** PDU type identifier */
/// PDU type identifier
uint8_t pduType;
/** TPDU number sequence*/
/// TPDU number sequence
uint8_t tpduNumber;
} cotphdr;
#pragma pack(pop)
Expand Down
Loading

0 comments on commit c3040c4

Please sign in to comment.