diff --git a/Packet++/header/ArpLayer.h b/Packet++/header/ArpLayer.h index 57c90cb728..0b1a3278e6 100644 --- a/Packet++/header/ArpLayer.h +++ b/Packet++/header/ArpLayer.h @@ -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) diff --git a/Packet++/header/Asn1Codec.h b/Packet++/header/Asn1Codec.h index a3e61f1eec..1d0f74da26 100644 --- a/Packet++/header/Asn1Codec.h +++ b/Packet++/header/Asn1Codec.h @@ -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 }; diff --git a/Packet++/header/BgpLayer.h b/Packet++/header/BgpLayer.h index e2f93f14ec..bc30acef5a 100644 --- a/Packet++/header/BgpLayer.h +++ b/Packet++/header/BgpLayer.h @@ -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, }; @@ -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) @@ -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) @@ -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. @@ -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 @@ -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. @@ -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) @@ -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) diff --git a/Packet++/header/CotpLayer.h b/Packet++/header/CotpLayer.h index c760e14342..00a2dfdf58 100644 --- a/Packet++/header/CotpLayer.h +++ b/Packet++/header/CotpLayer.h @@ -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) diff --git a/Packet++/header/DhcpLayer.h b/Packet++/header/DhcpLayer.h index 085d099c02..a9742ec148 100644 --- a/Packet++/header/DhcpLayer.h +++ b/Packet++/header/DhcpLayer.h @@ -17,35 +17,35 @@ namespace pcpp #pragma pack(push, 1) struct dhcp_header { - /** BootP opcode */ + /// BootP opcode uint8_t opCode; - /** Hardware type, set to 1 (Ethernet) by default */ + /// Hardware type, set to 1 (Ethernet) by default uint8_t hardwareType; - /** Hardware address length, set to 6 (MAC address length) by default */ + /// Hardware address length, set to 6 (MAC address length) by default uint8_t hardwareAddressLength; - /** Hop count */ + /// Hop count uint8_t hops; - /** DHCP/BootP transaction ID */ + /// DHCP/BootP transaction ID uint32_t transactionID; - /** The elapsed time, in seconds since the client sent its first BOOTREQUEST message */ + /// The elapsed time, in seconds since the client sent its first BOOTREQUEST message uint16_t secondsElapsed; - /** BootP flags */ + /// BootP flags uint16_t flags; - /** Client IPv4 address */ + /// Client IPv4 address uint32_t clientIpAddress; - /** Your IPv4 address */ + /// Your IPv4 address uint32_t yourIpAddress; - /** Server IPv4 address */ + /// Server IPv4 address uint32_t serverIpAddress; - /** Gateway IPv4 address */ + /// Gateway IPv4 address uint32_t gatewayIpAddress; - /** Client hardware address, by default contains the MAC address (only 6 first bytes are used) */ + /// Client hardware address, by default contains the MAC address (only 6 first bytes are used) uint8_t clientHardwareAddress[16]; - /** BootP server name */ + /// BootP server name uint8_t serverName[64]; - /** BootP boot file name */ + /// BootP boot file name uint8_t bootFilename[128]; - /** DHCP magic number (set to the default value of 0x63538263) */ + /// DHCP magic number (set to the default value of 0x63538263) uint32_t magicNumber; }; #pragma pack(pop) @@ -53,329 +53,329 @@ namespace pcpp /// BootP opcodes enum BootpOpCodes { - /** BootP request */ + /// BootP request DHCP_BOOTREQUEST = 1, - /** BootP reply */ + /// BootP reply DHCP_BOOTREPLY = 2 }; /// DHCP message types enum DhcpMessageType { - /** Unknown message type */ + /// Unknown message type DHCP_UNKNOWN_MSG_TYPE = 0, - /** Discover message type */ + /// Discover message type DHCP_DISCOVER = 1, - /** Offer message type */ + /// Offer message type DHCP_OFFER = 2, - /** Request message type */ + /// Request message type DHCP_REQUEST = 3, - /** Decline message type */ + /// Decline message type DHCP_DECLINE = 4, - /** Acknowledge message type */ + /// Acknowledge message type DHCP_ACK = 5, - /** Non-acknowledge message type */ + /// Non-acknowledge message type DHCP_NAK = 6, - /** Release message type */ + /// Release message type DHCP_RELEASE = 7, - /** Inform message type */ + /// Inform message type DHCP_INFORM = 8 }; /// DHCP option types. enum DhcpOptionTypes { - /** Unknown option type */ + /// Unknown option type DHCPOPT_UNKNOWN = -1, - /** Pad */ + /// Pad DHCPOPT_PAD = 0, - /** Subnet Mask Value */ + /// Subnet Mask Value DHCPOPT_SUBNET_MASK = 1, - /** Time Offset in Seconds from UTC */ + /// Time Offset in Seconds from UTC DHCPOPT_TIME_OFFSET = 2, - /** N/4 Router addresses */ + /// N/4 Router addresses DHCPOPT_ROUTERS = 3, - /** N/4 Timeserver addresses */ + /// N/4 Timeserver addresses DHCPOPT_TIME_SERVERS = 4, - /** N/4 IEN-116 Server addresses */ + /// N/4 IEN-116 Server addresses DHCPOPT_NAME_SERVERS = 5, - /** N/4 DNS Server addresses */ + /// N/4 DNS Server addresses DHCPOPT_DOMAIN_NAME_SERVERS = 6, - /** N/4 Logging Server addresses */ + /// N/4 Logging Server addresses DHCPOPT_LOG_SERVERS = 7, - /** N/4 Quotes Server addresses */ + /// N/4 Quotes Server addresses DHCPOPT_QUOTES_SERVERS = 8, - /** N/4 Quotes Server addresses */ + /// N/4 Quotes Server addresses DHCPOPT_LPR_SERVERS = 9, - /** N/4 Quotes Server addresses */ + /// N/4 Quotes Server addresses DHCPOPT_IMPRESS_SERVERS = 10, - /** N/4 RLP Server addresses */ + /// N/4 RLP Server addresses DHCPOPT_RESOURCE_LOCATION_SERVERS = 11, - /** Hostname string */ + /// Hostname string DHCPOPT_HOST_NAME = 12, - /** Size of boot file in 512 byte chunks */ + /// Size of boot file in 512 byte chunks DHCPOPT_BOOT_SIZE = 13, - /** Client to dump and name the file to dump it to */ + /// Client to dump and name the file to dump it to DHCPOPT_MERIT_DUMP = 14, - /** The DNS domain name of the client */ + /// The DNS domain name of the client DHCPOPT_DOMAIN_NAME = 15, - /** Swap Server address */ + /// Swap Server address DHCPOPT_SWAP_SERVER = 16, - /** Path name for root disk */ + /// Path name for root disk DHCPOPT_ROOT_PATH = 17, - /** Path name for more BOOTP info */ + /// Path name for more BOOTP info DHCPOPT_EXTENSIONS_PATH = 18, - /** Enable/Disable IP Forwarding */ + /// Enable/Disable IP Forwarding DHCPOPT_IP_FORWARDING = 19, - /** Enable/Disable Source Routing */ + /// Enable/Disable Source Routing DHCPOPT_NON_LOCAL_SOURCE_ROUTING = 20, - /** Routing Policy Filters */ + /// Routing Policy Filters DHCPOPT_POLICY_FILTER = 21, - /** Max Datagram Reassembly Size */ + /// Max Datagram Reassembly Size DHCPOPT_MAX_DGRAM_REASSEMBLY = 22, - /** Default IP Time to Live */ + /// Default IP Time to Live DEFAULT_IP_TTL = 23, - /** Path MTU Aging Timeout */ + /// Path MTU Aging Timeout DHCPOPT_PATH_MTU_AGING_TIMEOUT = 24, - /** Path MTU Plateau Table */ + /// Path MTU Plateau Table PATH_MTU_PLATEAU_TABLE = 25, - /** Interface MTU Size */ + /// Interface MTU Size DHCPOPT_INTERFACE_MTU = 26, - /** All Subnets are Local */ + /// All Subnets are Local DHCPOPT_ALL_SUBNETS_LOCAL = 27, - /** Broadcast Address */ + /// Broadcast Address DHCPOPT_BROADCAST_ADDRESS = 28, - /** Perform Mask Discovery */ + /// Perform Mask Discovery DHCPOPT_PERFORM_MASK_DISCOVERY = 29, - /** Provide Mask to Others */ + /// Provide Mask to Others DHCPOPT_MASK_SUPPLIER = 30, - /** Perform Router Discovery */ + /// Perform Router Discovery DHCPOPT_ROUTER_DISCOVERY = 31, - /** Router Solicitation Address */ + /// Router Solicitation Address DHCPOPT_ROUTER_SOLICITATION_ADDRESS = 32, - /** Static Routing Table */ + /// Static Routing Table DHCPOPT_STATIC_ROUTES = 33, - /** Trailer Encapsulation */ + /// Trailer Encapsulation DHCPOPT_TRAILER_ENCAPSULATION = 34, - /** ARP Cache Timeout */ + /// ARP Cache Timeout DHCPOPT_ARP_CACHE_TIMEOUT = 35, - /** IEEE802.3 Encapsulation */ + /// IEEE802.3 Encapsulation DHCPOPT_IEEE802_3_ENCAPSULATION = 36, - /** Default TCP Time to Live */ + /// Default TCP Time to Live DHCPOPT_DEFAULT_TCP_TTL = 37, - /** TCP Keepalive Interval */ + /// TCP Keepalive Interval DHCPOPT_TCP_KEEPALIVE_INTERVAL = 38, - /** TCP Keepalive Garbage */ + /// TCP Keepalive Garbage DHCPOPT_TCP_KEEPALIVE_GARBAGE = 39, - /** NIS Domain Name */ + /// NIS Domain Name DHCPOPT_NIS_DOMAIN = 40, - /** NIS Server Addresses */ + /// NIS Server Addresses DHCPOPT_NIS_SERVERS = 41, - /** NTP Server Addresses */ + /// NTP Server Addresses DHCPOPT_NTP_SERVERS = 42, - /** Vendor Specific Information */ + /// Vendor Specific Information DHCPOPT_VENDOR_ENCAPSULATED_OPTIONS = 43, - /** NETBIOS Name Servers */ + /// NETBIOS Name Servers DHCPOPT_NETBIOS_NAME_SERVERS = 44, - /** NETBIOS Datagram Distribution */ + /// NETBIOS Datagram Distribution DHCPOPT_NETBIOS_DD_SERVER = 45, - /** NETBIOS Node Type */ + /// NETBIOS Node Type DHCPOPT_NETBIOS_NODE_TYPE = 46, - /** NETBIOS Scope */ + /// NETBIOS Scope DHCPOPT_NETBIOS_SCOPE = 47, - /** X Window Font Server */ + /// X Window Font Server DHCPOPT_FONT_SERVERS = 48, - /** X Window Display Manager */ + /// X Window Display Manager DHCPOPT_X_DISPLAY_MANAGER = 49, - /** Requested IP Address */ + /// Requested IP Address DHCPOPT_DHCP_REQUESTED_ADDRESS = 50, - /** IP Address Lease Time */ + /// IP Address Lease Time DHCPOPT_DHCP_LEASE_TIME = 51, - /** Overload "sname" or "file" */ + /// Overload "sname" or "file" DHCPOPT_DHCP_OPTION_OVERLOAD = 52, - /** DHCP Message Type */ + /// DHCP Message Type DHCPOPT_DHCP_MESSAGE_TYPE = 53, - /** DHCP Server Identification */ + /// DHCP Server Identification DHCPOPT_DHCP_SERVER_IDENTIFIER = 54, - /** Parameter Request List */ + /// Parameter Request List DHCPOPT_DHCP_PARAMETER_REQUEST_LIST = 55, - /** DHCP Error Message */ + /// DHCP Error Message DHCPOPT_DHCP_MESSAGE = 56, - /** DHCP Maximum Message Size */ + /// DHCP Maximum Message Size DHCPOPT_DHCP_MAX_MESSAGE_SIZE = 57, - /** DHCP Renewal (T1) Time */ + /// DHCP Renewal (T1) Time DHCPOPT_DHCP_RENEWAL_TIME = 58, - /** DHCP Rebinding (T2) Time */ + /// DHCP Rebinding (T2) Time DHCPOPT_DHCP_REBINDING_TIME = 59, - /** Class Identifier */ + /// Class Identifier DHCPOPT_VENDOR_CLASS_IDENTIFIER = 60, - /** Class Identifier */ + /// Class Identifier DHCPOPT_DHCP_CLIENT_IDENTIFIER = 61, - /** NetWare/IP Domain Name */ + /// NetWare/IP Domain Name DHCPOPT_NWIP_DOMAIN_NAME = 62, - /** NetWare/IP sub Options */ + /// NetWare/IP sub Options DHCPOPT_NWIP_SUBOPTIONS = 63, - /** NIS+ v3 Client Domain Name */ + /// NIS+ v3 Client Domain Name DHCPOPT_NIS_DOMAIN_NAME = 64, - /** NIS+ v3 Server Addresses */ + /// NIS+ v3 Server Addresses DHCPOPT_NIS_SERVER_ADDRESS = 65, - /** TFTP Server Name */ + /// TFTP Server Name DHCPOPT_TFTP_SERVER_NAME = 66, - /** Boot File Name */ + /// Boot File Name DHCPOPT_BOOTFILE_NAME = 67, - /** Home Agent Addresses */ + /// Home Agent Addresses DHCPOPT_HOME_AGENT_ADDRESS = 68, - /** Simple Mail Server (SMTP) Addresses */ + /// Simple Mail Server (SMTP) Addresses DHCPOPT_SMTP_SERVER = 69, - /** Post Office (POP3) Server Addresses */ + /// Post Office (POP3) Server Addresses DHCPOPT_POP3_SERVER = 70, - /** Network News (NNTP) Server Addresses */ + /// Network News (NNTP) Server Addresses DHCPOPT_NNTP_SERVER = 71, - /** WWW Server Addresses */ + /// WWW Server Addresses DHCPOPT_WWW_SERVER = 72, - /** Finger Server Addresses */ + /// Finger Server Addresses DHCPOPT_FINGER_SERVER = 73, - /** Chat (IRC) Server Addresses */ + /// Chat (IRC) Server Addresses DHCPOPT_IRC_SERVER = 74, - /** StreetTalk Server Addresses */ + /// StreetTalk Server Addresses DHCPOPT_STREETTALK_SERVER = 75, - /** ST Directory Assist. Addresses */ + /// ST Directory Assist. Addresses DHCPOPT_STDA_SERVER = 76, - /** User Class Information */ + /// User Class Information DHCPOPT_USER_CLASS = 77, - /** Directory Agent Information */ + /// Directory Agent Information DHCPOPT_DIRECTORY_AGENT = 78, - /** Service Location Agent Scope */ + /// Service Location Agent Scope DHCPOPT_SERVICE_SCOPE = 79, - /** Rapid Commit */ + /// Rapid Commit DHCPOPT_RAPID_COMMIT = 80, - /** Fully Qualified Domain Name */ + /// Fully Qualified Domain Name DHCPOPT_FQDN = 81, - /** Relay Agent Information */ + /// Relay Agent Information DHCPOPT_DHCP_AGENT_OPTIONS = 82, - /** Internet Storage Name Service */ + /// Internet Storage Name Service DHCPOPT_ISNS = 83, - /** Novell Directory Services */ + /// Novell Directory Services DHCPOPT_NDS_SERVERS = 85, - /** Novell Directory Services */ + /// Novell Directory Services DHCPOPT_NDS_TREE_NAME = 86, - /** Novell Directory Services */ + /// Novell Directory Services DHCPOPT_NDS_CONTEXT = 87, - /** BCMCS Controller Domain Name list */ + /// BCMCS Controller Domain Name list DHCPOPT_BCMCS_CONTROLLER_DOMAIN_NAME_LIST = 88, - /** BCMCS Controller IPv4 address option */ + /// BCMCS Controller IPv4 address option DHCPOPT_BCMCS_CONTROLLER_IPV4_ADDRESS = 89, - /** Authentication */ + /// Authentication DHCPOPT_AUTHENTICATION = 90, - /** Client Last Transaction Time */ + /// Client Last Transaction Time DHCPOPT_CLIENT_LAST_TXN_TIME = 91, - /** Associated IP */ + /// Associated IP DHCPOPT_ASSOCIATED_IP = 92, - /** Client System Architecture */ + /// Client System Architecture DHCPOPT_CLIENT_SYSTEM = 93, - /** Client Network Device Interface */ + /// Client Network Device Interface DHCPOPT_CLIENT_NDI = 94, - /** Lightweight Directory Access Protocol [ */ + /// Lightweight Directory Access Protocol [ DHCPOPT_LDAP = 95, - /** UUID/GUID-based Client Identifier */ + /// UUID/GUID-based Client Identifier DHCPOPT_UUID_GUID = 97, - /** Open Group's User Authentication */ + /// Open Group's User Authentication DHCPOPT_USER_AUTH = 98, - /** GEOCONF_CIVIC */ + /// GEOCONF_CIVIC DHCPOPT_GEOCONF_CIVIC = 99, - /** IEEE 1003.1 TZ String */ + /// IEEE 1003.1 TZ String DHCPOPT_PCODE = 100, - /** Reference to the TZ Database */ + /// Reference to the TZ Database DHCPOPT_TCODE = 101, - /** NetInfo Parent Server Address */ + /// NetInfo Parent Server Address DHCPOPT_NETINFO_ADDRESS = 112, - /** NetInfo Parent Server Tag */ + /// NetInfo Parent Server Tag DHCPOPT_NETINFO_TAG = 113, - /** URL */ + /// URL DHCPOPT_URL = 114, - /** DHCP Auto-Configuration */ + /// DHCP Auto-Configuration DHCPOPT_AUTO_CONFIG = 116, - /** Name Service Search */ + /// Name Service Search DHCPOPT_NAME_SERVICE_SEARCH = 117, - /** Subnet Selection Option */ + /// Subnet Selection Option DHCPOPT_SUBNET_SELECTION = 118, - /** DNS Domain Search List */ + /// DNS Domain Search List DHCPOPT_DOMAIN_SEARCH = 119, - /** SIP Servers DHCP Option */ + /// SIP Servers DHCP Option DHCPOPT_SIP_SERVERS = 120, - /** Classless Static Route Option */ + /// Classless Static Route Option DHCPOPT_CLASSLESS_STATIC_ROUTE = 121, - /** CableLabs Client Configuration */ + /// CableLabs Client Configuration DHCPOPT_CCC = 122, - /** GeoConf Option */ + /// GeoConf Option DHCPOPT_GEOCONF = 123, - /** Vendor-Identifying Vendor Class */ + /// Vendor-Identifying Vendor Class DHCPOPT_V_I_VENDOR_CLASS = 124, - /** Vendor-Identifying Vendor-Specific Information */ + /// Vendor-Identifying Vendor-Specific Information DHCPOPT_V_I_VENDOR_OPTS = 125, - /** OPTION_PANA_AGENT */ + /// OPTION_PANA_AGENT DHCPOPT_OPTION_PANA_AGENT = 136, - /** OPTION_V4_LOST */ + /// OPTION_V4_LOST DHCPOPT_OPTION_V4_LOST = 137, - /** CAPWAP Access Controller addresses */ + /// CAPWAP Access Controller addresses DHCPOPT_OPTION_CAPWAP_AC_V4 = 138, - /** A Series Of Suboptions */ + /// A Series Of Suboptions DHCPOPT_OPTION_IPV4_ADDRESS_MOS = 139, - /** A Series Of Suboptions */ + /// A Series Of Suboptions DHCPOPT_OPTION_IPV4_FQDN_MOS = 140, - /** List of domain names to search for SIP User Agent Configuration */ + /// List of domain names to search for SIP User Agent Configuration DHCPOPT_SIP_UA_CONFIG = 141, - /** ANDSF IPv4 Address Option for DHCPv4 */ + /// ANDSF IPv4 Address Option for DHCPv4 DHCPOPT_OPTION_IPV4_ADDRESS_ANDSF = 142, - /** Geospatial Location with Uncertainty [RF */ + /// Geospatial Location with Uncertainty [RF DHCPOPT_GEOLOC = 144, - /** Forcerenew Nonce Capable */ + /// Forcerenew Nonce Capable DHCPOPT_FORCERENEW_NONCE_CAPABLE = 145, - /** Information for selecting RDNSS */ + /// Information for selecting RDNSS DHCPOPT_RDNSS_SELECTION = 146, - /** Status code and optional N byte text message describing status */ + /// Status code and optional N byte text message describing status DHCPOPT_STATUS_CODE = 151, - /** Absolute time (seconds since Jan 1, 1970) message was sent */ + /// Absolute time (seconds since Jan 1, 1970) message was sent DHCPOPT_BASE_TIME = 152, - /** Number of seconds in the past when client entered current state */ + /// Number of seconds in the past when client entered current state DHCPOPT_START_TIME_OF_STATE = 153, - /** Absolute time (seconds since Jan 1, 1970) for beginning of query */ + /// Absolute time (seconds since Jan 1, 1970) for beginning of query DHCPOPT_QUERY_START_TIME = 154, - /** Absolute time (seconds since Jan 1, 1970) for end of query */ + /// Absolute time (seconds since Jan 1, 1970) for end of query DHCPOPT_QUERY_END_TIME = 155, - /** State of IP address */ + /// State of IP address DHCPOPT_DHCP_STATE = 156, - /** Indicates information came from local or remote server */ + /// Indicates information came from local or remote server DHCPOPT_DATA_SOURCE = 157, - /** Includes one or multiple lists of PCP server IP addresses; each list is treated as a separate PCP server */ + /// Includes one or multiple lists of PCP server IP addresses; each list is treated as a separate PCP server DHCPOPT_OPTION_V4_PCP_SERVER = 158, - /** This option is used to configure a set of ports bound to a shared IPv4 address */ + /// This option is used to configure a set of ports bound to a shared IPv4 address DHCPOPT_OPTION_V4_PORTPARAMS = 159, - /** DHCP Captive-Portal */ + /// DHCP Captive-Portal DHCPOPT_CAPTIVE_PORTAL = 160, - /** Manufacturer Usage Descriptions */ + /// Manufacturer Usage Descriptions DHCPOPT_OPTION_MUD_URL_V4 = 161, - /** Etherboot */ + /// Etherboot DHCPOPT_ETHERBOOT = 175, - /** IP Telephone */ + /// IP Telephone DHCPOPT_IP_TELEPHONE = 176, - /** Magic string = F1:00:74:7E */ + /// Magic string = F1:00:74:7E DHCPOPT_PXELINUX_MAGIC = 208, - /** Configuration file */ + /// Configuration file DHCPOPT_CONFIGURATION_FILE = 209, - /** Path Prefix Option */ + /// Path Prefix Option DHCPOPT_PATH_PREFIX = 210, - /** Reboot Time */ + /// Reboot Time DHCPOPT_REBOOT_TIME = 211, - /** OPTION_6RD with N/4 6rd BR addresses */ + /// OPTION_6RD with N/4 6rd BR addresses DHCPOPT_OPTION_6RD = 212, - /** Access Network Domain Name */ + /// Access Network Domain Name DHCPOPT_OPTION_V4_ACCESS_DOMAIN = 213, - /** Subnet Allocation Option */ + /// Subnet Allocation Option DHCPOPT_SUBNET_ALLOCATION = 220, - /** Virtual Subnet Selection (VSS) Option */ + /// Virtual Subnet Selection (VSS) Option DHCPOPT_VIRTUAL_SUBNET_SELECTION = 221, - /** End (last option) */ + /// End (last option) DHCPOPT_END = 255 }; diff --git a/Packet++/header/DhcpV6Layer.h b/Packet++/header/DhcpV6Layer.h index 97c3f422d7..6d18aabd69 100644 --- a/Packet++/header/DhcpV6Layer.h +++ b/Packet++/header/DhcpV6Layer.h @@ -12,33 +12,33 @@ namespace pcpp /// DHCPv6 message types enum DhcpV6MessageType { - /** Unknown message type */ + /// Unknown message type DHCPV6_UNKNOWN_MSG_TYPE = 0, - /** Solicit message type (Client to Server) */ + /// Solicit message type (Client to Server) DHCPV6_SOLICIT = 1, - /** Advertise message type (Server to Client) */ + /// Advertise message type (Server to Client) DHCPV6_ADVERTISE = 2, - /** Request message type (Client to Server) */ + /// Request message type (Client to Server) DHCPV6_REQUEST = 3, - /** Confirm message type (Client to Server) */ + /// Confirm message type (Client to Server) DHCPV6_CONFIRM = 4, - /** Renew message type (Client to Server) */ + /// Renew message type (Client to Server) DHCPV6_RENEW = 5, - /** Rebind message type (Client to Server) */ + /// Rebind message type (Client to Server) DHCPV6_REBIND = 6, - /** Reply message type (Server to Client) */ + /// Reply message type (Server to Client) DHCPV6_REPLY = 7, - /** Release message type (Client to Server) */ + /// Release message type (Client to Server) DHCPV6_RELEASE = 8, - /** Decline message type (Client to Server) */ + /// Decline message type (Client to Server) DHCPV6_DECLINE = 9, - /** Reconfigure message type (Server to Client) */ + /// Reconfigure message type (Server to Client) DHCPV6_RECONFIGURE = 10, - /** Information-Request message type (Client to Server) */ + /// Information-Request message type (Client to Server) DHCPV6_INFORMATION_REQUEST = 11, - /** Relay-Forward message type (Relay agent to Server) */ + /// Relay-Forward message type (Relay agent to Server) DHCPV6_RELAY_FORWARD = 12, - /** Relay-Reply message type (Server to Relay agent) */ + /// Relay-Reply message type (Server to Relay agent) DHCPV6_RELAY_REPLY = 13 }; @@ -50,134 +50,134 @@ namespace pcpp /// - https://datatracker.ietf.org/doc/html/rfc8520 enum DhcpV6OptionType { - /** Unknown option type */ + /// Unknown option type DHCPV6_OPT_UNKNOWN = 0, - /** Client Identifier (DUID of client) */ + /// Client Identifier (DUID of client) DHCPV6_OPT_CLIENTID = 1, - /** Server Identifier (DUID of server) */ + /// Server Identifier (DUID of server) DHCPV6_OPT_SERVERID = 2, - /** Identity Association for Non-temporary addresses */ + /// Identity Association for Non-temporary addresses DHCPV6_OPT_IA_NA = 3, - /** Identity Association for Temporary addresses */ + /// Identity Association for Temporary addresses DHCPV6_OPT_IA_TA = 4, - /** IA Address option */ + /// IA Address option DHCPV6_OPT_IAADDR = 5, - /** Option Request Option */ + /// Option Request Option DHCPV6_OPT_ORO = 6, - /** Preference setting */ + /// Preference setting DHCPV6_OPT_PREFERENCE = 7, - /** The amount of time since the client began the current DHCP transaction */ + /// The amount of time since the client began the current DHCP transaction DHCPV6_OPT_ELAPSED_TIME = 8, - /** The DHCP message being relayed by a relay agent */ + /// The DHCP message being relayed by a relay agent DHCPV6_OPT_RELAY_MSG = 9, - /** Authentication information */ + /// Authentication information DHCPV6_OPT_AUTH = 11, - /** Server unicast */ + /// Server unicast DHCPV6_OPT_UNICAST = 12, - /** Status code */ + /// Status code DHCPV6_OPT_STATUS_CODE = 13, - /** Rapid commit */ + /// Rapid commit DHCPV6_OPT_RAPID_COMMIT = 14, - /** User class */ + /// User class DHCPV6_OPT_USER_CLASS = 15, - /** Vendor class */ + /// Vendor class DHCPV6_OPT_VENDOR_CLASS = 16, - /** Vendor specific information */ + /// Vendor specific information DHCPV6_OPT_VENDOR_OPTS = 17, - /** Interface ID */ + /// Interface ID DHCPV6_OPT_INTERFACE_ID = 18, - /** Reconfigure Message */ + /// Reconfigure Message DHCPV6_OPT_RECONF_MSG = 19, - /** Reconfigure Accept */ + /// Reconfigure Accept DHCPV6_OPT_RECONF_ACCEPT = 20, - /** SIP Servers Domain Name */ + /// SIP Servers Domain Name DHCPV6_OPT_SIP_SERVERS_D = 21, - /** SIP Servers IPv6 Address List */ + /// SIP Servers IPv6 Address List DHCPV6_OPT_SIP_SERVERS_A = 22, - /** DNS Recursive Name Server */ + /// DNS Recursive Name Server DHCPV6_OPT_DNS_SERVERS = 23, - /** Domain Search List */ + /// Domain Search List DHCPV6_OPT_DOMAIN_LIST = 24, - /** Identity Association for Prefix Delegation */ + /// Identity Association for Prefix Delegation DHCPV6_OPT_IA_PD = 25, - /** IA_PD Prefix */ + /// IA_PD Prefix DHCPV6_OPT_IAPREFIX = 26, - /** Network Information Service (NIS) Servers */ + /// Network Information Service (NIS) Servers DHCPV6_OPT_NIS_SERVERS = 27, - /** Network Information Service v2 (NIS+) Servers */ + /// Network Information Service v2 (NIS+) Servers DHCPV6_OPT_NISP_SERVERS = 28, - /** Network Information Service (NIS) domain name */ + /// Network Information Service (NIS) domain name DHCPV6_OPT_NIS_DOMAIN_NAME = 29, - /** Network Information Service v2 (NIS+) domain name */ + /// Network Information Service v2 (NIS+) domain name DHCPV6_OPT_NISP_DOMAIN_NAME = 30, - /** Simple Network Time Protocol (SNTP) servers */ + /// Simple Network Time Protocol (SNTP) servers DHCPV6_OPT_SNTP_SERVERS = 31, - /** Information Refresh */ + /// Information Refresh DHCPV6_OPT_INFORMATION_REFRESH_TIME = 32, - /** Broadcast and Multicast Service (BCMCS) Domain Name List */ + /// Broadcast and Multicast Service (BCMCS) Domain Name List DHCPV6_OPT_BCMCS_SERVER_D = 33, - /** Broadcast and Multicast Service (BCMCS) IPv6 Address List */ + /// Broadcast and Multicast Service (BCMCS) IPv6 Address List DHCPV6_OPT_BCMCS_SERVER_A = 34, - /** Geographical location in civic (e.g., postal) format */ + /// Geographical location in civic (e.g., postal) format DHCPV6_OPT_GEOCONF_CIVIC = 36, - /** Relay Agent Remote ID */ + /// Relay Agent Remote ID DHCPV6_OPT_REMOTE_ID = 37, - /** Relay Agent Subscriber ID */ + /// Relay Agent Subscriber ID DHCPV6_OPT_SUBSCRIBER_ID = 38, - /** FQDN */ + /// FQDN DHCPV6_OPT_CLIENT_FQDN = 39, - /** One or more IPv6 addresses associated with PANA (Protocol for carrying Authentication for Network Access) - * Authentication Agents */ + /// One or more IPv6 addresses associated with PANA (Protocol for carrying Authentication for Network Access) + /// Authentication Agents DHCPV6_OPT_PANA_AGENT = 40, - /** Time zone to be used by the client in IEEE 1003.1 format */ + /// Time zone to be used by the client in IEEE 1003.1 format DHCPV6_OPT_NEW_POSIX_TIMEZONE = 41, - /** Time zone (TZ) database entry referred to by entry name */ + /// Time zone (TZ) database entry referred to by entry name DHCPV6_OPT_NEW_TZDB_TIMEZONE = 42, - /** Relay Agent Echo Request */ + /// Relay Agent Echo Request DHCPV6_OPT_ERO = 43, - /** Query option */ + /// Query option DHCPV6_OPT_LQ_QUERY = 44, - /** Client Data */ + /// Client Data DHCPV6_OPT_CLIENT_DATA = 45, - /** Client Last Transaction Time */ + /// Client Last Transaction Time DHCPV6_OPT_CLT_TIME = 46, - /** Relay data */ + /// Relay data DHCPV6_OPT_LQ_RELAY_DATA = 47, - /** Client link */ + /// Client link DHCPV6_OPT_LQ_CLIENT_LINK = 48, - /** Mobile IPv6 Home Network Information */ + /// Mobile IPv6 Home Network Information DHCPV6_OPT_MIP6_HNINF = 49, - /** Mobile IPv6 Relay Agent */ + /// Mobile IPv6 Relay Agent DHCPV6_OPT_MIP6_RELAY = 50, - /** Location to Service Translation (LoST) server domain name */ + /// Location to Service Translation (LoST) server domain name DHCPV6_OPT_V6_LOST = 51, - /** Access Points (CAPWAP) Access Controller IPv6 addresses */ + /// Access Points (CAPWAP) Access Controller IPv6 addresses DHCPV6_OPT_CAPWAP_AC_V6 = 52, - /** DHCPv6 Bulk LeaseQuery */ + /// DHCPv6 Bulk LeaseQuery DHCPV6_OPT_RELAY_ID = 53, - /** List of IPv6 addresses for servers providing particular types of IEEE 802.21 Mobility Service (MoS) */ + /// List of IPv6 addresses for servers providing particular types of IEEE 802.21 Mobility Service (MoS) DHCPV6_OPT_IPH6_ADDRESS_MOS = 54, - /** List of FQDNs for servers providing particular types of IEEE 802.21 Mobility Service (MoS) */ + /// List of FQDNs for servers providing particular types of IEEE 802.21 Mobility Service (MoS) DHCPV6_OPT_IPV6_FQDN_MOS = 55, - /** Network Time Protocol (NTP) or Simple NTP (SNTP) Server Location */ + /// Network Time Protocol (NTP) or Simple NTP (SNTP) Server Location DHCPV6_OPT_NTP_SERVER = 56, - /** Boot File Uniform Resource Locator (URL) */ + /// Boot File Uniform Resource Locator (URL) DHCPV6_OPT_BOOTFILE_URL = 59, - /** Boot File Parameters */ + /// Boot File Parameters DHCPV6_OPT_BOOTFILE_PARAM = 60, - /** Client System Architecture Type */ + /// Client System Architecture Type DHCPV6_OPT_CLIENT_ARCH_TYPE = 61, - /** Client Network Interface Identifier */ + /// Client Network Interface Identifier DHCPV6_OPT_NII = 62, - /** ERP Local Domain Name */ + /// ERP Local Domain Name DHCPV6_OPT_ERP_LOCAL_DOMAIN_NAME = 65, - /** Relay supplied options */ + /// Relay supplied options DHCPV6_OPT_RELAY_SUPPLIED_OPTIONS = 66, - /** Virtual Subnet Selection */ + /// Virtual Subnet Selection DHCPV6_OPT_VSS = 68, - /** Client link layer */ + /// Client link layer DHCPV6_OPT_CLIENT_LINKLAYER_ADDR = 79, - /** Manufacturer Usage Description */ + /// Manufacturer Usage Description DHCPV6_OPT_MUD_URL = 112 }; @@ -240,13 +240,13 @@ namespace pcpp /// Represents the basic DHCPv6 protocol header struct dhcpv6_header { - /** DHCPv6 message type */ + /// DHCPv6 message type uint8_t messageType; - /** DHCPv6 transaction ID (first byte) */ + /// DHCPv6 transaction ID (first byte) uint8_t transactionId1; - /** DHCPv6 transaction ID (second byte) */ + /// DHCPv6 transaction ID (second byte) uint8_t transactionId2; - /** DHCPv6 transaction ID (last byte) */ + /// DHCPv6 transaction ID (last byte) uint8_t transactionId3; }; diff --git a/Packet++/header/DnsLayer.h b/Packet++/header/DnsLayer.h index 086e1469ae..e7a58bf9d4 100644 --- a/Packet++/header/DnsLayer.h +++ b/Packet++/header/DnsLayer.h @@ -17,60 +17,60 @@ namespace pcpp #pragma pack(push, 1) struct dnshdr { - /** DNS query identification */ + /// DNS query identification uint16_t transactionID; #if (BYTE_ORDER == LITTLE_ENDIAN) uint16_t - /** Recursion desired flag */ + /// Recursion desired flag recursionDesired : 1, - /** Truncated flag */ + /// Truncated flag truncation : 1, - /** Authoritative answer flag */ + /// Authoritative answer flag authoritativeAnswer : 1, - /** Operation Code */ + /// Operation Code opcode : 4, - /** Query/Response flag */ + /// Query/Response flag queryOrResponse : 1, - /** Return Code */ + /// Return Code responseCode : 4, - /** Checking disabled flag */ + /// Checking disabled flag checkingDisabled : 1, - /** Authenticated data flag */ + /// Authenticated data flag authenticData : 1, - /** Zero flag (Reserved) */ + /// Zero flag (Reserved) zero : 1, - /** Recursion available flag */ + /// Recursion available flag recursionAvailable : 1; #elif (BYTE_ORDER == BIG_ENDIAN) uint16_t - /** Query/Response flag */ + /// Query/Response flag queryOrResponse : 1, - /** Operation Code */ + /// Operation Code opcode : 4, - /** Authoritative answer flag */ + /// Authoritative answer flag authoritativeAnswer : 1, - /** Truncated flag */ + /// Truncated flag truncation : 1, - /** Recursion desired flag */ + /// Recursion desired flag recursionDesired : 1, - /** Recursion available flag */ + /// Recursion available flag recursionAvailable : 1, - /** Zero flag (Reserved) */ + /// Zero flag (Reserved) zero : 1, - /** Authenticated data flag */ + /// Authenticated data flag authenticData : 1, - /** Checking disabled flag */ + /// Checking disabled flag checkingDisabled : 1, - /** Return Code */ + /// Return Code responseCode : 4; #endif - /** Number of DNS query records in packet */ + /// Number of DNS query records in packet uint16_t numberOfQuestions; - /** Number of DNS answer records in packet */ + /// Number of DNS answer records in packet uint16_t numberOfAnswers; - /** Number of authority records in packet */ + /// Number of authority records in packet uint16_t numberOfAuthority; - /** Number of additional records in packet */ + /// Number of additional records in packet uint16_t numberOfAdditional; }; #pragma pack(pop) diff --git a/Packet++/header/DnsLayerEnums.h b/Packet++/header/DnsLayerEnums.h index 501b6f469a..d9807993a6 100644 --- a/Packet++/header/DnsLayerEnums.h +++ b/Packet++/header/DnsLayerEnums.h @@ -9,137 +9,137 @@ namespace pcpp /// An enum for all possible DNS record types enum DnsType { - /** IPv4 address record */ + /// IPv4 address record DNS_TYPE_A = 1, - /** Name Server record */ + /// Name Server record DNS_TYPE_NS, - /** Obsolete, replaced by MX */ + /// Obsolete, replaced by MX DNS_TYPE_MD, - /** Obsolete, replaced by MX */ + /// Obsolete, replaced by MX DNS_TYPE_MF, - /** Canonical name record */ + /// Canonical name record DNS_TYPE_CNAME, - /** Start of Authority record */ + /// Start of Authority record DNS_TYPE_SOA, - /** mailbox domain name record */ + /// mailbox domain name record DNS_TYPE_MB, - /** mail group member record */ + /// mail group member record DNS_TYPE_MG, - /** mail rename domain name record */ + /// mail rename domain name record DNS_TYPE_MR, - /** Null record */ + /// Null record DNS_TYPE_NULL_R, - /** well known service description record */ + /// well known service description record DNS_TYPE_WKS, - /** Pointer record */ + /// Pointer record DNS_TYPE_PTR, - /** Host information record */ + /// Host information record DNS_TYPE_HINFO, - /** mailbox or mail list information record */ + /// mailbox or mail list information record DNS_TYPE_MINFO, - /** Mail exchanger record */ + /// Mail exchanger record DNS_TYPE_MX, - /** Text record */ + /// Text record DNS_TYPE_TXT, - /** Responsible person record */ + /// Responsible person record DNS_TYPE_RP, - /** AFS database record */ + /// AFS database record DNS_TYPE_AFSDB, - /** DNS X25 resource record */ + /// DNS X25 resource record DNS_TYPE_X25, - /** Integrated Services Digital Network record */ + /// Integrated Services Digital Network record DNS_TYPE_ISDN, - /** Route Through record */ + /// Route Through record DNS_TYPE_RT, - /** network service access point address record */ + /// network service access point address record DNS_TYPE_NSAP, - /** network service access point address pointer record */ + /// network service access point address pointer record DNS_TYPE_NSAP_PTR, - /** Signature record */ + /// Signature record DNS_TYPE_SIG, - /** Key record */ + /// Key record DNS_TYPE_KEY, - /** Mail Mapping Information record */ + /// Mail Mapping Information record DNS_TYPE_PX, - /** DNS Geographical Position record */ + /// DNS Geographical Position record DNS_TYPE_GPOS, - /** IPv6 address record */ + /// IPv6 address record DNS_TYPE_AAAA, - /** Location record */ + /// Location record DNS_TYPE_LOC, - /** Obsolete record */ + /// Obsolete record DNS_TYPE_NXT, - /** DNS Endpoint Identifier record */ + /// DNS Endpoint Identifier record DNS_TYPE_EID, - /** DNS Nimrod Locator record */ + /// DNS Nimrod Locator record DNS_TYPE_NIMLOC, - /** Service locator record */ + /// Service locator record DNS_TYPE_SRV, - /** Asynchronous Transfer Mode address record */ + /// Asynchronous Transfer Mode address record DNS_TYPE_ATMA, - /** Naming Authority Pointer record */ + /// Naming Authority Pointer record DNS_TYPE_NAPTR, - /** Key eXchanger record */ + /// Key eXchanger record DNS_TYPE_KX, - /** Certificate record */ + /// Certificate record DNS_TYPE_CERT, - /** Obsolete, replaced by AAAA type */ + /// Obsolete, replaced by AAAA type DNS_TYPE_A6, - /** Delegation Name record */ + /// Delegation Name record DNS_TYPE_DNAM, - /** Kitchen sink record */ + /// Kitchen sink record DNS_TYPE_SINK, - /** Option record */ + /// Option record DNS_TYPE_OPT, - /** Address Prefix List record */ + /// Address Prefix List record DNS_TYPE_APL, - /** Delegation signer record */ + /// Delegation signer record DNS_TYPE_DS, - /** SSH Public Key Fingerprint record */ + /// SSH Public Key Fingerprint record DNS_TYPE_SSHFP, - /** IPsec Key record */ + /// IPsec Key record DNS_TYPE_IPSECKEY, - /** DNSSEC signature record */ + /// DNSSEC signature record DNS_TYPE_RRSIG, - /** Next-Secure record */ + /// Next-Secure record DNS_TYPE_NSEC, - /** DNS Key record */ + /// DNS Key record DNS_TYPE_DNSKEY, - /** DHCP identifier record */ + /// DHCP identifier record DNS_TYPE_DHCID, - /** NSEC record version 3 */ + /// NSEC record version 3 DNS_TYPE_NSEC3, - /** NSEC3 parameters */ + /// NSEC3 parameters DNS_TYPE_NSEC3PARAM, - /** All cached records */ + /// All cached records DNS_TYPE_ALL = 255 }; /// An enum for all possible DNS classes enum DnsClass { - /** Internet class */ + /// Internet class DNS_CLASS_IN = 1, - /** Internet class with QU flag set to True */ + /// Internet class with QU flag set to True DNS_CLASS_IN_QU = 32769, - /** Chaos class */ + /// Chaos class DNS_CLASS_CH = 3, - /** Hesiod class */ + /// Hesiod class DNS_CLASS_HS = 4, - /** ANY class */ + /// ANY class DNS_CLASS_ANY = 255 }; /// An enum for representing the 4 types of possible DNS records enum DnsResourceType { - /** DNS query record */ + /// DNS query record DnsQueryType = 0, - /** DNS answer record */ + /// DNS answer record DnsAnswerType = 1, - /** DNS authority record */ + /// DNS authority record DnsAuthorityType = 2, - /** DNS additional record */ + /// DNS additional record DnsAdditionalType = 3 }; diff --git a/Packet++/header/DnsResourceData.h b/Packet++/header/DnsResourceData.h index 7c29cf2790..fc68c26bb7 100644 --- a/Packet++/header/DnsResourceData.h +++ b/Packet++/header/DnsResourceData.h @@ -234,9 +234,9 @@ namespace pcpp /// A struct that represents mail exchange (MX) data struct MxData { - /** Preference value */ + /// Preference value uint16_t preference; - /** Mail exchange hostname */ + /// Mail exchange hostname std::string mailExchange; }; diff --git a/Packet++/header/EthDot3Layer.h b/Packet++/header/EthDot3Layer.h index f6c2efedd1..5f6a884675 100644 --- a/Packet++/header/EthDot3Layer.h +++ b/Packet++/header/EthDot3Layer.h @@ -15,11 +15,11 @@ namespace pcpp #pragma pack(push, 1) struct ether_dot3_header { - /** Destination MAC */ + /// Destination MAC uint8_t dstMac[6]; - /** Source MAC */ + /// Source MAC uint8_t srcMac[6]; - /** EtherType */ + /// EtherType uint16_t length; }; #pragma pack(pop) diff --git a/Packet++/header/EthLayer.h b/Packet++/header/EthLayer.h index fbaf26d719..f704a9bf57 100644 --- a/Packet++/header/EthLayer.h +++ b/Packet++/header/EthLayer.h @@ -15,50 +15,50 @@ namespace pcpp #pragma pack(push, 1) struct ether_header { - /** Destination MAC */ + /// Destination MAC uint8_t dstMac[6]; - /** Source MAC */ + /// Source MAC uint8_t srcMac[6]; - /** EtherType */ + /// EtherType uint16_t etherType; }; #pragma pack(pop) - /* Ethernet protocol ID's */ + // Ethernet protocol ID's - /** IP */ + /// IP #define PCPP_ETHERTYPE_IP 0x0800 - /** Address resolution */ + /// Address resolution #define PCPP_ETHERTYPE_ARP 0x0806 - /** Transparent Ethernet Bridging */ + /// Transparent Ethernet Bridging #define PCPP_ETHERTYPE_ETHBRIDGE 0x6558 - /** Reverse ARP */ + /// Reverse ARP #define PCPP_ETHERTYPE_REVARP 0x8035 - /** AppleTalk protocol */ + /// AppleTalk protocol #define PCPP_ETHERTYPE_AT 0x809B - /** AppleTalk ARP */ + /// AppleTalk ARP #define PCPP_ETHERTYPE_AARP 0x80F3 - /** IEEE 802.1Q VLAN tagging */ + /// IEEE 802.1Q VLAN tagging #define PCPP_ETHERTYPE_VLAN 0x8100 - /** IPX */ + /// IPX #define PCPP_ETHERTYPE_IPX 0x8137 - /** IP protocol version 6 */ + /// IP protocol version 6 #define PCPP_ETHERTYPE_IPV6 0x86dd - /** used to test interfaces */ + /// used to test interfaces #define PCPP_ETHERTYPE_LOOPBACK 0x9000 - /** PPPoE discovery */ + /// PPPoE discovery #define PCPP_ETHERTYPE_PPPOED 0x8863 - /** PPPoE session */ + /// PPPoE session #define PCPP_ETHERTYPE_PPPOES 0x8864 - /** MPLS */ + /// MPLS #define PCPP_ETHERTYPE_MPLS 0x8847 - /** Point-to-point protocol (PPP) */ + /// Point-to-point protocol (PPP) #define PCPP_ETHERTYPE_PPP 0x880B - /** RDMA over Converged Ethernet (RoCEv1) */ + /// RDMA over Converged Ethernet (RoCEv1) #define PCPP_ETHERTYPE_ROCEV1 0x8915 - /** IEEE 802.1ad Provider Bridge, Q-in-Q */ + /// IEEE 802.1ad Provider Bridge, Q-in-Q #define PCPP_ETHERTYPE_IEEE_802_1AD 0x88A8 - /** Wake on LAN */ + /// Wake on LAN #define PCPP_ETHERTYPE_WAKE_ON_LAN 0x0842 /// @class EthLayer diff --git a/Packet++/header/GreLayer.h b/Packet++/header/GreLayer.h index ccb40d5e61..7c3ae97e2f 100644 --- a/Packet++/header/GreLayer.h +++ b/Packet++/header/GreLayer.h @@ -14,49 +14,49 @@ namespace pcpp struct gre_basic_header { #if (BYTE_ORDER == LITTLE_ENDIAN) - /** Number of additional encapsulations which are permitted. 0 is the default value */ + /// Number of additional encapsulations which are permitted. 0 is the default value uint8_t recursionControl : 3, - /** Strict source routing bit (GRE v0 only) */ + /// Strict source routing bit (GRE v0 only) strictSourceRouteBit : 1, - /** Set if sequence number exists */ + /// Set if sequence number exists sequenceNumBit : 1, - /** Set if key exists */ + /// Set if key exists keyBit : 1, - /** Set if routing exists (GRE v0 only) */ + /// Set if routing exists (GRE v0 only) routingBit : 1, - /** Set if checksum exists (GRE v0 only) */ + /// Set if checksum exists (GRE v0 only) checksumBit : 1; #else - /** Set if checksum exists (GRE v0 only) */ + /// Set if checksum exists (GRE v0 only) uint8_t checksumBit : 1, - /** Set if routing exists (GRE v0 only) */ + /// Set if routing exists (GRE v0 only) routingBit : 1, - /** Set if key exists */ + /// Set if key exists keyBit : 1, - /** Set if sequence number exists */ + /// Set if sequence number exists sequenceNumBit : 1, - /** Strict source routing bit (GRE v0 only) */ + /// Strict source routing bit (GRE v0 only) strictSourceRouteBit : 1, - /** Number of additional encapsulations which are permitted. 0 is the default value */ + /// Number of additional encapsulations which are permitted. 0 is the default value recursionControl : 3; #endif #if (BYTE_ORDER == LITTLE_ENDIAN) - /** GRE version - can be 0 or 1 */ + /// GRE version - can be 0 or 1 uint8_t version : 3, - /** Reserved */ + /// Reserved flags : 4, - /** Set if acknowledgment number is set (GRE v1 only) */ + /// Set if acknowledgment number is set (GRE v1 only) ackSequenceNumBit : 1; #else - /** Set if acknowledgment number is set (GRE v1 only) */ + /// Set if acknowledgment number is set (GRE v1 only) uint8_t ackSequenceNumBit : 1, - /** Reserved */ + /// Reserved flags : 4, - /** GRE version - can be 0 or 1 */ + /// GRE version - can be 0 or 1 version : 3; #endif - /** Protocol type of the next layer */ + /// Protocol type of the next layer uint16_t protocol; }; #pragma pack(pop) @@ -66,9 +66,9 @@ namespace pcpp #pragma pack(push, 1) struct gre1_header : gre_basic_header { - /** Size of the payload not including the GRE header */ + /// Size of the payload not including the GRE header uint16_t payloadLength; - /** Contains the Peer's Call ID for the session to which this packet belongs */ + /// Contains the Peer's Call ID for the session to which this packet belongs uint16_t callID; }; #pragma pack(pop) @@ -78,11 +78,11 @@ namespace pcpp #pragma pack(push, 1) struct ppp_pptp_header { - /** Broadcast address */ + /// Broadcast address uint8_t address; - /** Control byte */ + /// Control byte uint8_t control; - /** Protocol type of the next layer (see PPP_* macros at PPPoELayer.h) */ + /// Protocol type of the next layer (see PPP_* macros at PPPoELayer.h) uint16_t protocol; }; #pragma pack(pop) diff --git a/Packet++/header/GtpLayer.h b/Packet++/header/GtpLayer.h index ef458350eb..fdd8e87971 100644 --- a/Packet++/header/GtpLayer.h +++ b/Packet++/header/GtpLayer.h @@ -18,41 +18,41 @@ namespace pcpp struct gtpv1_header { #if (BYTE_ORDER == LITTLE_ENDIAN) - /** A 1-bit value that states whether there is a N-PDU number optional field */ + /// A 1-bit value that states whether there is a N-PDU number optional field uint8_t npduNumberFlag : 1, - /** A 1-bit value that states whether there is a Sequence Number optional field */ + /// A 1-bit value that states whether there is a Sequence Number optional field sequenceNumberFlag : 1, - /** A 1-bit value that states whether there is an extension header optional field */ + /// A 1-bit value that states whether there is an extension header optional field extensionHeaderFlag : 1, - /** Reserved bit */ + /// Reserved bit reserved : 1, - /** A 1-bit value that differentiates GTP (value 1) from GTP' (value 0) */ + /// A 1-bit value that differentiates GTP (value 1) from GTP' (value 0) protocolType : 1, - /** GTP version */ + /// GTP version version : 3; #else - /** GTP version */ + /// GTP version uint8_t version : 3, - /** A 1-bit value that differentiates GTP (value 1) from GTP' (value 0) */ + /// A 1-bit value that differentiates GTP (value 1) from GTP' (value 0) protocolType : 1, - /** Reserved bit */ + /// Reserved bit reserved : 1, - /** A 1-bit value that states whether there is an extension header optional field */ + /// A 1-bit value that states whether there is an extension header optional field extensionHeaderFlag : 1, - /** A 1-bit value that states whether there is a Sequence Number optional field */ + /// A 1-bit value that states whether there is a Sequence Number optional field sequenceNumberFlag : 1, - /** A 1-bit value that states whether there is a N-PDU number optional field */ + /// A 1-bit value that states whether there is a N-PDU number optional field npduNumberFlag : 1; #endif - /** An 8-bit field that indicates the type of GTP message */ + /// An 8-bit field that indicates the type of GTP message uint8_t messageType; - /** A 16-bit field that indicates the length of the payload in bytes (rest of the packet following the mandatory - * 8-byte GTP header). Includes the optional fields */ + /// A 16-bit field that indicates the length of the payload in bytes (rest of the packet following the mandatory + /// 8-byte GTP header). Includes the optional fields uint16_t messageLength; - /** Tunnel endpoint identifier - A 32-bit(4-octet) field used to multiplex different connections in the same GTP - * tunnel */ + /// Tunnel endpoint identifier - A 32-bit(4-octet) field used to multiplex different connections in the same GTP + /// tunnel uint32_t teid; }; @@ -63,143 +63,143 @@ namespace pcpp /// message enum GtpV1MessageType { - /** GTPv1 Message Type Unknown */ + /// GTPv1 Message Type Unknown GtpV1_MessageTypeUnknown = 0, - /** Echo Request */ + /// Echo Request GtpV1_EchoRequest = 1, - /** Echo Response */ + /// Echo Response GtpV1_EchoResponse = 2, - /** Version Not Supported */ + /// Version Not Supported GtpV1_VersionNotSupported = 3, - /** Node Alive Request */ + /// Node Alive Request GtpV1_NodeAliveRequest = 4, - /** Node Alive Response */ + /// Node Alive Response GtpV1_NodeAliveResponse = 5, - /** Redirection Request */ + /// Redirection Request GtpV1_RedirectionRequest = 6, - /** Create PDP Context Request */ + /// Create PDP Context Request GtpV1_CreatePDPContextRequest = 7, - /** Create PDP Context Response */ + /// Create PDP Context Response GtpV1_CreatePDPContextResponse = 16, - /** Update PDP Context Request */ + /// Update PDP Context Request GtpV1_UpdatePDPContextRequest = 17, - /** Update PDP Context Response */ + /// Update PDP Context Response GtpV1_UpdatePDPContextResponse = 18, - /** Delete PDP Context Request */ + /// Delete PDP Context Request GtpV1_DeletePDPContextRequest = 19, - /** Delete PDP Context Response */ + /// Delete PDP Context Response GtpV1_DeletePDPContextResponse = 20, - /** Initiate PDP Context Activation Request */ + /// Initiate PDP Context Activation Request GtpV1_InitiatePDPContextActivationRequest = 22, - /** Initiate PDP Context Activation Response */ + /// Initiate PDP Context Activation Response GtpV1_InitiatePDPContextActivationResponse = 23, - /** Error Indication */ + /// Error Indication GtpV1_ErrorIndication = 26, - /** PDU Notification Request */ + /// PDU Notification Request GtpV1_PDUNotificationRequest = 27, - /** PDU Notification Response */ + /// PDU Notification Response GtpV1_PDUNotificationResponse = 28, - /** PDU Notification Reject Request */ + /// PDU Notification Reject Request GtpV1_PDUNotificationRejectRequest = 29, - /** PDU Notification Reject Response */ + /// PDU Notification Reject Response GtpV1_PDUNotificationRejectResponse = 30, - /** Supported Extensions Header Notification */ + /// Supported Extensions Header Notification GtpV1_SupportedExtensionsHeaderNotification = 31, - /** Send Routing for GPRS Request */ + /// Send Routing for GPRS Request GtpV1_SendRoutingforGPRSRequest = 32, - /** Send Routing for GPRS Response */ + /// Send Routing for GPRS Response GtpV1_SendRoutingforGPRSResponse = 33, - /** Failure Report Request */ + /// Failure Report Request GtpV1_FailureReportRequest = 34, - /** Failure Report Response */ + /// Failure Report Response GtpV1_FailureReportResponse = 35, - /** Note MS Present Request */ + /// Note MS Present Request GtpV1_NoteMSPresentRequest = 36, - /** Note MS Present Response */ + /// Note MS Present Response GtpV1_NoteMSPresentResponse = 37, - /** Identification Request */ + /// Identification Request GtpV1_IdentificationRequest = 38, - /** Identification Response */ + /// Identification Response GtpV1_IdentificationResponse = 39, - /** SGSN Context Request */ + /// SGSN Context Request GtpV1_SGSNContextRequest = 50, - /** SGSN Context Response */ + /// SGSN Context Response GtpV1_SGSNContextResponse = 51, - /** SGSN Context Acknowledge */ + /// SGSN Context Acknowledge GtpV1_SGSNContextAcknowledge = 52, - /** Forward Relocation Request */ + /// Forward Relocation Request GtpV1_ForwardRelocationRequest = 53, - /** Forward Relocation Response */ + /// Forward Relocation Response GtpV1_ForwardRelocationResponse = 54, - /** Forward Relocation Complete */ + /// Forward Relocation Complete GtpV1_ForwardRelocationComplete = 55, - /** Relocation Cancel Request */ + /// Relocation Cancel Request GtpV1_RelocationCancelRequest = 56, - /** Relocation Cancel Response */ + /// Relocation Cancel Response GtpV1_RelocationCancelResponse = 57, - /** Forward SRNS Context */ + /// Forward SRNS Context GtpV1_ForwardSRNSContext = 58, - /** Forward Relocation Complete Acknowledge */ + /// Forward Relocation Complete Acknowledge GtpV1_ForwardRelocationCompleteAcknowledge = 59, - /** Forward SRNS Context Acknowledge */ + /// Forward SRNS Context Acknowledge GtpV1_ForwardSRNSContextAcknowledge = 60, - /** UE Registration Request */ + /// UE Registration Request GtpV1_UERegistrationRequest = 61, - /** UE Registration Response */ + /// UE Registration Response GtpV1_UERegistrationResponse = 62, - /** RAN Information Relay */ + /// RAN Information Relay GtpV1_RANInformationRelay = 70, - /** MBMS Notification Request */ + /// MBMS Notification Request GtpV1_MBMSNotificationRequest = 96, - /** MBMS Notification Response */ + /// MBMS Notification Response GtpV1_MBMSNotificationResponse = 97, - /** MBMS Notification Reject Request */ + /// MBMS Notification Reject Request GtpV1_MBMSNotificationRejectRequest = 98, - /** MBMS Notification Reject Response */ + /// MBMS Notification Reject Response GtpV1_MBMSNotificationRejectResponse = 99, - /** Create MBMS Notification Request */ + /// Create MBMS Notification Request GtpV1_CreateMBMSNotificationRequest = 100, - /** Create MBMS Notification Response */ + /// Create MBMS Notification Response GtpV1_CreateMBMSNotificationResponse = 101, - /** Update MBMS Notification Request */ + /// Update MBMS Notification Request GtpV1_UpdateMBMSNotificationRequest = 102, - /** Update MBMS Notification Response */ + /// Update MBMS Notification Response GtpV1_UpdateMBMSNotificationResponse = 103, - /** Delete MBMS Notification Request */ + /// Delete MBMS Notification Request GtpV1_DeleteMBMSNotificationRequest = 104, - /** Delete MBMS Notification Response */ + /// Delete MBMS Notification Response GtpV1_DeleteMBMSNotificationResponse = 105, - /** MBMS Registration Request */ + /// MBMS Registration Request GtpV1_MBMSRegistrationRequest = 112, - /** MBMS Registration Response */ + /// MBMS Registration Response GtpV1_MBMSRegistrationResponse = 113, - /** MBMS De-Registration Request */ + /// MBMS De-Registration Request GtpV1_MBMSDeRegistrationRequest = 114, - /** MBMS De-Registration Response */ + /// MBMS De-Registration Response GtpV1_MBMSDeRegistrationResponse = 115, - /** MBMS Session Start Request */ + /// MBMS Session Start Request GtpV1_MBMSSessionStartRequest = 116, - /** MBMS Session Start Response */ + /// MBMS Session Start Response GtpV1_MBMSSessionStartResponse = 117, - /** MBMS Session Stop Request */ + /// MBMS Session Stop Request GtpV1_MBMSSessionStopRequest = 118, - /** MBMS Session Stop Response */ + /// MBMS Session Stop Response GtpV1_MBMSSessionStopResponse = 119, - /** MBMS Session Update Request */ + /// MBMS Session Update Request GtpV1_MBMSSessionUpdateRequest = 120, - /** MBMS Session Update Response */ + /// MBMS Session Update Response GtpV1_MBMSSessionUpdateResponse = 121, - /** MS Info Change Request */ + /// MS Info Change Request GtpV1_MSInfoChangeRequest = 128, - /** MS Info Change Response */ + /// MS Info Change Response GtpV1_MSInfoChangeResponse = 129, - /** Data Record Transfer Request */ + /// Data Record Transfer Request GtpV1_DataRecordTransferRequest = 240, - /** Data Record Transfer Response */ + /// Data Record Transfer Response GtpV1_DataRecordTransferResponse = 241, - /** End Marker */ + /// End Marker GtpV1_EndMarker = 254, - /** G-PDU */ + /// G-PDU GtpV1_GPDU = 255 }; @@ -419,171 +419,171 @@ namespace pcpp /// Define enum types and the corresponding int values enum Value : uint8_t { - /** Unknown message */ + /// Unknown message Unknown = 0, - /** Echo Request message */ + /// Echo Request message EchoRequest = 1, - /** Echo Response message */ + /// Echo Response message EchoResponse = 2, - /** Version Not Supported message */ + /// Version Not Supported message VersionNotSupported = 3, - /** Create Session Request message */ + /// Create Session Request message CreateSessionRequest = 32, - /** Create Session Response message */ + /// Create Session Response message CreateSessionResponse = 33, - /** Modify Bearer Request message */ + /// Modify Bearer Request message ModifyBearerRequest = 34, - /** Modify Bearer Response message */ + /// Modify Bearer Response message ModifyBearerResponse = 35, - /** Delete Session Request message */ + /// Delete Session Request message DeleteSessionRequest = 36, - /** Delete Session Response message */ + /// Delete Session Response message DeleteSessionResponse = 37, - /** Change Notification Request message */ + /// Change Notification Request message ChangeNotificationRequest = 38, - /** Change Notification Response message */ + /// Change Notification Response message ChangeNotificationResponse = 39, - /** Remote UE Report Notifications message */ + /// Remote UE Report Notifications message RemoteUEReportNotifications = 40, - /** Remote UE Report Acknowledge message */ + /// Remote UE Report Acknowledge message RemoteUEReportAcknowledge = 41, - /** Modify Bearer Command message */ + /// Modify Bearer Command message ModifyBearerCommand = 64, - /** Modify Bearer Failure message */ + /// Modify Bearer Failure message ModifyBearerFailure = 65, - /** Delete Bearer Command message */ + /// Delete Bearer Command message DeleteBearerCommand = 66, - /** Delete Bearer Failure message */ + /// Delete Bearer Failure message DeleteBearerFailure = 67, - /** Bearer Resource Command message */ + /// Bearer Resource Command message BearerResourceCommand = 68, - /** Bearer Resource Failure message */ + /// Bearer Resource Failure message BearerResourceFailure = 69, - /** Downlink Data Notification Failure message */ + /// Downlink Data Notification Failure message DownlinkDataNotificationFailure = 70, - /** Trace Session Activation message */ + /// Trace Session Activation message TraceSessionActivation = 71, - /** Trace Session Deactivation message */ + /// Trace Session Deactivation message TraceSessionDeactivation = 72, - /** Stop Paging Indication message */ + /// Stop Paging Indication message StopPagingIndication = 73, - /** Create Bearer Request message */ + /// Create Bearer Request message CreateBearerRequest = 95, - /** Create Bearer Response message */ + /// Create Bearer Response message CreateBearerResponse = 96, - /** Update Bearer Request message */ + /// Update Bearer Request message UpdateBearerRequest = 97, - /** Update Bearer Response message */ + /// Update Bearer Response message UpdateBearerResponse = 98, - /** Delete Bearer Request message */ + /// Delete Bearer Request message DeleteBearerRequest = 99, - /** Delete Bearer Response message */ + /// Delete Bearer Response message DeleteBearerResponse = 100, - /** Delete PDN Request message */ + /// Delete PDN Request message DeletePDNRequest = 101, - /** Delete PDN Response message */ + /// Delete PDN Response message DeletePDNResponse = 102, - /** PGW Downlink Notification message */ + /// PGW Downlink Notification message PGWDownlinkNotification = 103, - /** PGW Downlink Acknowledge message */ + /// PGW Downlink Acknowledge message PGWDownlinkAcknowledge = 104, - /** Identification Request message */ + /// Identification Request message IdentificationRequest = 128, - /** Identification Response message */ + /// Identification Response message IdentificationResponse = 129, - /** Context Request message */ + /// Context Request message ContextRequest = 130, - /** Context Response message */ + /// Context Response message ContextResponse = 131, - /** Context Acknowledge message */ + /// Context Acknowledge message ContextAcknowledge = 132, - /** Forward Relocation Request message */ + /// Forward Relocation Request message ForwardRelocationRequest = 133, - /** Forward Relocation Response message */ + /// Forward Relocation Response message ForwardRelocationResponse = 134, - /** Forward Relocation Notification message */ + /// Forward Relocation Notification message ForwardRelocationNotification = 135, - /** Forward Relocation Acknowledge message */ + /// Forward Relocation Acknowledge message ForwardRelocationAcknowledge = 136, - /** Forward Access Notification message */ + /// Forward Access Notification message ForwardAccessNotification = 137, - /** Forward Access Acknowledge message */ + /// Forward Access Acknowledge message ForwardAccessAcknowledge = 138, - /** Relocation Cancel Request message */ + /// Relocation Cancel Request message RelocationCancelRequest = 139, - /** Relocation Cancel Response message */ + /// Relocation Cancel Response message RelocationCancelResponse = 140, - /** Configuration Transfer Tunnel message */ + /// Configuration Transfer Tunnel message ConfigurationTransferTunnel = 141, - /** Detach Notification message */ + /// Detach Notification message DetachNotification = 149, - /** Detach Acknowledge message */ + /// Detach Acknowledge message DetachAcknowledge = 150, - /** CS Paging message */ + /// CS Paging message CSPaging = 151, - /** RAN Information Relay message */ + /// RAN Information Relay message RANInformationRelay = 152, - /** Alert MME Notification message */ + /// Alert MME Notification message AlertMMENotification = 153, - /** Alert MME Acknowledge message */ + /// Alert MME Acknowledge message AlertMMEAcknowledge = 154, - /** UE Activity Notification message */ + /// UE Activity Notification message UEActivityNotification = 155, - /** UE Activity Acknowledge message */ + /// UE Activity Acknowledge message UEActivityAcknowledge = 156, - /** ISR Status message */ + /// ISR Status message ISRStatus = 157, - /** Create Forwarding Request message */ + /// Create Forwarding Request message CreateForwardingRequest = 160, - /** Create Forwarding Response message */ + /// Create Forwarding Response message CreateForwardingResponse = 161, - /** Suspend Notification message */ + /// Suspend Notification message SuspendNotification = 162, - /** Suspend Acknowledge message */ + /// Suspend Acknowledge message SuspendAcknowledge = 163, - /** Resume Notification message */ + /// Resume Notification message ResumeNotification = 164, - /** Resume Acknowledge message */ + /// Resume Acknowledge message ResumeAcknowledge = 165, - /** Create Indirect Data Tunnel Request message */ + /// Create Indirect Data Tunnel Request message CreateIndirectDataTunnelRequest = 166, - /** Create Indirect Data Tunnel Response message */ + /// Create Indirect Data Tunnel Response message CreateIndirectDataTunnelResponse = 167, - /** Delete Indirect Data Tunnel Request message */ + /// Delete Indirect Data Tunnel Request message DeleteIndirectDataTunnelRequest = 168, - /** Delete Indirect Data Tunnel Response message */ + /// Delete Indirect Data Tunnel Response message DeleteIndirectDataTunnelResponse = 169, - /** Release Access Bearers Request message */ + /// Release Access Bearers Request message ReleaseAccessBearersRequest = 170, - /** Release Access Bearers Response message */ + /// Release Access Bearers Response message ReleaseAccessBearersResponse = 171, - /** Downlink Data Notification message */ + /// Downlink Data Notification message DownlinkDataNotification = 176, - /** Downlink Data Acknowledge message */ + /// Downlink Data Acknowledge message DownlinkDataAcknowledge = 177, - /** PGW Restart Notification message */ + /// PGW Restart Notification message PGWRestartNotification = 179, - /** PGW Restart Acknowledge message */ + /// PGW Restart Acknowledge message PGWRestartAcknowledge = 180, - /** Update PDN Connection Request message */ + /// Update PDN Connection Request message UpdatePDNConnectionRequest = 200, - /** Update PDN Connection Response message */ + /// Update PDN Connection Response message UpdatePDNConnectionResponse = 201, - /** Modify Access Bearers Request message */ + /// Modify Access Bearers Request message ModifyAccessBearersRequest = 211, - /** Modify Access Bearers Response message */ + /// Modify Access Bearers Response message ModifyAccessBearersResponse = 212, - /** MMBS Session Start Request message */ + /// MMBS Session Start Request message MMBSSessionStartRequest = 231, - /** MMBS Session Start Response message */ + /// MMBS Session Start Response message MMBSSessionStartResponse = 232, - /** MMBS Session Update Request message */ + /// MMBS Session Update Request message MMBSSessionUpdateRequest = 233, - /** MMBS Session Update Response message */ + /// MMBS Session Update Response message MMBSSessionUpdateResponse = 234, - /** MMBS Session Stop Request message */ + /// MMBS Session Stop Request message MMBSSessionStopRequest = 235, - /** MMBS Session Stop Response message */ + /// MMBS Session Stop Response message MMBSSessionStopResponse = 236 }; @@ -626,289 +626,289 @@ namespace pcpp /// GTPv2 Information Element (IE) types as defined in 3GPP TS 29.274 enum class Type : uint8_t { - /** Unknown or reserved value */ + /// Unknown or reserved value Unknown = 0, - /** International Mobile Subscriber Identity */ + /// International Mobile Subscriber Identity Imsi = 1, - /** Indicates the result of a procedure */ + /// Indicates the result of a procedure Cause = 2, - /** Recovery counter for GTP path management */ + /// Recovery counter for GTP path management Recovery = 3, - /** Session Transfer Number for SRVCC */ + /// Session Transfer Number for SRVCC StnSr = 51, - /** Access Point Name */ + /// Access Point Name Apn = 71, - /** Aggregate Maximum Bit Rate */ + /// Aggregate Maximum Bit Rate Ambr = 72, - /** EPS Bearer ID */ + /// EPS Bearer ID Ebi = 73, - /** IPv4/IPv6 Address */ + /// IPv4/IPv6 Address IpAddress = 74, - /** Mobile Equipment Identity (IMEI or IMEISV) */ + /// Mobile Equipment Identity (IMEI or IMEISV) Mei = 75, - /** Mobile Station International Subscriber Directory Number */ + /// Mobile Station International Subscriber Directory Number Msisdn = 76, - /** Indication flags for various features and capabilities */ + /// Indication flags for various features and capabilities Indication = 77, - /** Protocol Configuration Options */ + /// Protocol Configuration Options Pco = 78, - /** PDN Address Allocation */ + /// PDN Address Allocation Paa = 79, - /** Bearer Level Quality of Service */ + /// Bearer Level Quality of Service BearerQos = 80, - /** Flow Level Quality of Service */ + /// Flow Level Quality of Service FlowQos = 81, - /** Radio Access Technology Type */ + /// Radio Access Technology Type RatType = 82, - /** Current PLMN and MME identifier */ + /// Current PLMN and MME identifier ServingNetwork = 83, - /** Bearer Traffic Flow Template */ + /// Bearer Traffic Flow Template BearerTft = 84, - /** Traffic Aggregation Description */ + /// Traffic Aggregation Description Tad = 85, - /** User Location Information */ + /// User Location Information Uli = 86, - /** Fully Qualified TEID */ + /// Fully Qualified TEID FTeid = 87, - /** Temporary Mobile Subscriber Identity */ + /// Temporary Mobile Subscriber Identity Tmsi = 88, - /** Global Core Network ID */ + /// Global Core Network ID GlobalCnId = 89, - /** S103 PDN Data Forwarding Info */ + /// S103 PDN Data Forwarding Info S103PdnDataForwardingInfo = 90, - /** S1-U Data Forwarding Info */ + /// S1-U Data Forwarding Info S1UDataForwardingInfo = 91, - /** Delay Value in integer multiples of 50 milliseconds */ + /// Delay Value in integer multiples of 50 milliseconds DelayValue = 92, - /** Bearer Context */ + /// Bearer Context BearerContext = 93, - /** Charging ID for this PDP context */ + /// Charging ID for this PDP context ChargingId = 94, - /** Charging Characteristics */ + /// Charging Characteristics ChargingCharacteristics = 95, - /** Trace Information */ + /// Trace Information TraceInformation = 96, - /** Bearer Flags */ + /// Bearer Flags BearerFlags = 97, - /** PDN Type (IPv4, IPv6, IPv4v6) */ + /// PDN Type (IPv4, IPv6, IPv4v6) PdnType = 99, - /** Procedure Transaction ID */ + /// Procedure Transaction ID Pti = 100, - /** MM Context (GSM Key and Triplets) */ + /// MM Context (GSM Key and Triplets) MmContext1 = 103, - /** MM Context (UMTS Key, Used Cipher and Quintuplets) */ + /// MM Context (UMTS Key, Used Cipher and Quintuplets) MmContext2 = 104, - /** MM Context (GSM Key, Used Cipher and Quintuplets) */ + /// MM Context (GSM Key, Used Cipher and Quintuplets) MmContext3 = 105, - /** MM Context (UMTS Key and Quintuplets) */ + /// MM Context (UMTS Key and Quintuplets) MmContext4 = 106, - /** MM Context (EPS Security Context, Quadruplets and Quintuplets) */ + /// MM Context (EPS Security Context, Quadruplets and Quintuplets) MmContext5 = 107, - /** MM Context (UMTS Key, Quadruplets and Quintuplets) */ + /// MM Context (UMTS Key, Quadruplets and Quintuplets) MmContext6 = 108, - /** PDN Connection */ + /// PDN Connection PdnConnection = 109, - /** PDU Numbers */ + /// PDU Numbers PduNumbers = 110, - /** Packet TMSI */ + /// Packet TMSI PTmsi = 111, - /** P-TMSI Signature */ + /// P-TMSI Signature PTmsiSignature = 112, - /** Hop Counter */ + /// Hop Counter HopCounter = 113, - /** UE Time Zone */ + /// UE Time Zone UeTimeZone = 114, - /** Trace Reference */ + /// Trace Reference TraceReference = 115, - /** Complete Request Message */ + /// Complete Request Message CompleteRequestMessage = 116, - /** Globally Unique Temporary Identity */ + /// Globally Unique Temporary Identity Guti = 117, - /** F-Container */ + /// F-Container FContainer = 118, - /** F-Cause */ + /// F-Cause FCause = 119, - /** PLMN Identity */ + /// PLMN Identity PlmnId = 120, - /** Target Identification */ + /// Target Identification TargetIdentification = 121, - /** Packet Flow ID */ + /// Packet Flow ID PacketFlowId = 123, - /** RAB Context */ + /// RAB Context RabContext = 124, - /** Source RNC PDCP Context Info */ + /// Source RNC PDCP Context Info SourceRncPdcpContextInfo = 125, - /** Port Number */ + /// Port Number PortNumber = 126, - /** APN Restriction */ + /// APN Restriction ApnRestriction = 127, - /** Selection Mode */ + /// Selection Mode SelectionMode = 128, - /** Source Identification */ + /// Source Identification SourceIdentification = 129, - /** Change Reporting Action */ + /// Change Reporting Action ChangeReportingAction = 131, - /** Fully Qualified PDN Connection Set Identifier */ + /// Fully Qualified PDN Connection Set Identifier FqCsid = 132, - /** Channel Needed */ + /// Channel Needed ChannelNeeded = 133, - /** eMLPP Priority */ + /// eMLPP Priority EmlppPriority = 134, - /** Node Type */ + /// Node Type NodeType = 135, - /** Fully Qualified Domain Name */ + /// Fully Qualified Domain Name Fqdn = 136, - /** Transaction Identifier */ + /// Transaction Identifier Ti = 137, - /** MBMS Session Duration */ + /// MBMS Session Duration MbmsSessionDuration = 138, - /** MBMS Service Area */ + /// MBMS Service Area MbmsServiceArea = 139, - /** MBMS Session Identifier */ + /// MBMS Session Identifier MbmsSessionIdentifier = 140, - /** MBMS Flow Identifier */ + /// MBMS Flow Identifier MbmsFlowIdentifier = 141, - /** MBMS IP Multicast Distribution */ + /// MBMS IP Multicast Distribution MbmsIpMulticastDistribution = 142, - /** MBMS Distribution Acknowledge */ + /// MBMS Distribution Acknowledge MbmsDistributionAcknowledge = 143, - /** RF Selection Priority Index */ + /// RF Selection Priority Index RfspIndex = 144, - /** User CSG Information */ + /// User CSG Information Uci = 145, - /** CSG Information Reporting Action */ + /// CSG Information Reporting Action CsgInformationReportingAction = 146, - /** CSG ID */ + /// CSG ID CsgId = 147, - /** CSG Membership Indication */ + /// CSG Membership Indication Cmi = 148, - /** Service Indicator */ + /// Service Indicator ServiceIndicator = 149, - /** Detach Type */ + /// Detach Type DetachType = 150, - /** Local Distinguished Name */ + /// Local Distinguished Name Ldn = 151, - /** Node Features */ + /// Node Features NodeFeatures = 152, - /** MBMS Time To Data Transfer */ + /// MBMS Time To Data Transfer MbmsTimeToDataTransfer = 153, - /** Throttling */ + /// Throttling Throttling = 154, - /** Allocation Retention Priority */ + /// Allocation Retention Priority Arp = 155, - /** EPC Timer */ + /// EPC Timer EpcTimer = 156, - /** Signalling Priority Indication */ + /// Signalling Priority Indication SignallingPriorityIndication = 157, - /** Temporary Mobile Group Identity */ + /// Temporary Mobile Group Identity Tmgi = 158, - /** Additional MM Context For SRVCC */ + /// Additional MM Context For SRVCC AdditionalMmContextForSrvcc = 159, - /** Additional Flags For SRVCC */ + /// Additional Flags For SRVCC AdditionalFlagsForSrvcc = 160, - /** MDT Configuration */ + /// MDT Configuration MdtConfiguration = 162, - /** Additional Protocol Configuration Options */ + /// Additional Protocol Configuration Options Apco = 163, - /** Absolute Time of MBMS Data Transfer */ + /// Absolute Time of MBMS Data Transfer AbsoluteTimeOfMbmsDataTransfer = 164, - /** H(e)NB Information Reporting */ + /// H(e)NB Information Reporting HenbInformationReporting = 165, - /** IPv4 Configuration Parameters */ + /// IPv4 Configuration Parameters Ipv4ConfigurationParameters = 166, - /** Change To Report Flags */ + /// Change To Report Flags ChangeToReportFlags = 167, - /** Action Indication */ + /// Action Indication ActionIndication = 168, - /** TWAN Identifier */ + /// TWAN Identifier TwanIdentifier = 169, - /** ULI Timestamp */ + /// ULI Timestamp UliTimestamp = 170, - /** MBMS Flags */ + /// MBMS Flags MbmsFlags = 171, - /** RAN/NAS Cause */ + /// RAN/NAS Cause RanNasCause = 172, - /** CN Operator Selection Entity */ + /// CN Operator Selection Entity CnOperatorSelectionEntity = 173, - /** Trusted WLAN Mode Indication */ + /// Trusted WLAN Mode Indication Twmi = 174, - /** Node Number */ + /// Node Number NodeNumber = 175, - /** Node Identifier */ + /// Node Identifier NodeIdentifier = 176, - /** Presence Reporting Area Action */ + /// Presence Reporting Area Action PresenceReportingAreaAction = 177, - /** Presence Reporting Area Information */ + /// Presence Reporting Area Information PresenceReportingAreaInformation = 178, - /** TWAN Identifier Timestamp */ + /// TWAN Identifier Timestamp TwanIdentifierTimestamp = 179, - /** Overload Control Information */ + /// Overload Control Information OverloadControlInformation = 180, - /** Load Control Information */ + /// Load Control Information LoadControlInformation = 181, - /** Metric */ + /// Metric Metric = 182, - /** Sequence Number */ + /// Sequence Number SequenceNumber = 183, - /** APN and Relative Capacity */ + /// APN and Relative Capacity ApnAndRelativeCapacity = 184, - /** WLAN Offloadability Indication */ + /// WLAN Offloadability Indication WlanOffloadabilityIndication = 185, - /** Paging and Service Information */ + /// Paging and Service Information PagingAndServiceInformation = 186, - /** Integer Number */ + /// Integer Number IntegerNumber = 187, - /** Millisecond Time Stamp */ + /// Millisecond Time Stamp MillisecondTimeStamp = 188, - /** Monitoring Event Information */ + /// Monitoring Event Information MonitoringEventInformation = 189, - /** ECGI List */ + /// ECGI List EcgiList = 190, - /** Remote UE Context */ + /// Remote UE Context RemoteUeContext = 191, - /** Remote User ID */ + /// Remote User ID RemoteUserId = 192, - /** Remote UE IP Information */ + /// Remote UE IP Information RemoteUeIpInformation = 193, - /** CIoT Optimizations Support Indication */ + /// CIoT Optimizations Support Indication CiotOptimizationsSupportIndication = 194, - /** SCEF PDN Connection */ + /// SCEF PDN Connection ScefPdnConnection = 195, - /** Header Compression Configuration */ + /// Header Compression Configuration HeaderCompressionConfiguration = 196, - /** Extended Protocol Configuration Options */ + /// Extended Protocol Configuration Options ExtendedPco = 197, - /** Serving PLMN Rate Control */ + /// Serving PLMN Rate Control ServingPlmnRateControl = 198, - /** Counter */ + /// Counter Counter = 199, - /** Mapped UE Usage Type */ + /// Mapped UE Usage Type MappedUeUsageType = 200, - /** Secondary RAT Usage Data Report */ + /// Secondary RAT Usage Data Report SecondaryRatUsageDataReport = 201, - /** UP Function Selection Indication Flags */ + /// UP Function Selection Indication Flags UpFunctionSelectionIndicationFlags = 202, - /** Maximum Packet Loss Rate */ + /// Maximum Packet Loss Rate MaximumPacketLossRate = 203, - /** APN Rate Control Status */ + /// APN Rate Control Status ApnRateControlStatus = 204, - /** Extended Trace Information */ + /// Extended Trace Information ExtendedTraceInformation = 205, - /** Monitoring Event Extension Information */ + /// Monitoring Event Extension Information MonitoringEventExtensionInformation = 206, - /** Additional RRM Policy Index */ + /// Additional RRM Policy Index AdditionalRrmPolicyIndex = 207, - /** V2X Context */ + /// V2X Context V2xContext = 208, - /** PC5 QoS Parameters */ + /// PC5 QoS Parameters Pc5QosParameters = 209, - /** Services Authorized */ + /// Services Authorized ServicesAuthorized = 210, - /** Bit Rate */ + /// Bit Rate BitRate = 211, - /** PC5 QoS Flow */ + /// PC5 QoS Flow Pc5QosFlow = 212, - /** SGi PtP Tunnel Address */ + /// SGi PtP Tunnel Address SgiPtpTunnelAddress = 213 }; diff --git a/Packet++/header/HttpLayer.h b/Packet++/header/HttpLayer.h index 5c2beed560..fa5a2c1dcd 100644 --- a/Packet++/header/HttpLayer.h +++ b/Packet++/header/HttpLayer.h @@ -14,43 +14,43 @@ namespace pcpp /// An enum for HTTP version enum HttpVersion { - /** HTTP/0.9 */ + /// HTTP/0.9 ZeroDotNine, - /** HTTP/1.0 */ + /// HTTP/1.0 OneDotZero, - /** HTTP/1.1 */ + /// HTTP/1.1 OneDotOne, - /** Unknown HTTP version */ + /// Unknown HTTP version HttpVersionUnknown }; // some popular HTTP fields - /** Host field */ + /// Host field #define PCPP_HTTP_HOST_FIELD "Host" - /** Connection field */ + /// Connection field #define PCPP_HTTP_CONNECTION_FIELD "Connection" - /** User-Agent field */ + /// User-Agent field #define PCPP_HTTP_USER_AGENT_FIELD "User-Agent" - /** Referer field */ + /// Referer field #define PCPP_HTTP_REFERER_FIELD "Referer" - /** Accept field */ + /// Accept field #define PCPP_HTTP_ACCEPT_FIELD "Accept" - /** Accept-Encoding field */ + /// Accept-Encoding field #define PCPP_HTTP_ACCEPT_ENCODING_FIELD "Accept-Encoding" - /** Accept-Language field */ + /// Accept-Language field #define PCPP_HTTP_ACCEPT_LANGUAGE_FIELD "Accept-Language" - /** Cookie field */ + /// Cookie field #define PCPP_HTTP_COOKIE_FIELD "Cookie" - /** Content-Length field */ + /// Content-Length field #define PCPP_HTTP_CONTENT_LENGTH_FIELD "Content-Length" - /** Content-Encoding field */ + /// Content-Encoding field #define PCPP_HTTP_CONTENT_ENCODING_FIELD "Content-Encoding" - /** Content-Type field */ + /// Content-Type field #define PCPP_HTTP_CONTENT_TYPE_FIELD "Content-Type" - /** Transfer-Encoding field */ + /// Transfer-Encoding field #define PCPP_HTTP_TRANSFER_ENCODING_FIELD "Transfer-Encoding" - /** Server field */ + /// Server field #define PCPP_HTTP_SERVER_FIELD "Server" // -------- classes to be defined later ----------------- @@ -135,25 +135,25 @@ namespace pcpp /// HTTP request methods enum HttpMethod { - /** GET */ + /// GET HttpGET, - /** HEAD */ + /// HEAD HttpHEAD, - /** POST */ + /// POST HttpPOST, - /** PUT */ + /// PUT HttpPUT, - /** DELETE */ + /// DELETE HttpDELETE, - /** TRACE */ + /// TRACE HttpTRACE, - /** OPTIONS */ + /// OPTIONS HttpOPTIONS, - /** CONNECT */ + /// CONNECT HttpCONNECT, - /** PATCH */ + /// PATCH HttpPATCH, - /** Unknown HTTP method */ + /// Unknown HTTP method HttpMethodUnknown }; @@ -214,191 +214,191 @@ namespace pcpp /// @brief Define enum types and the corresponding int values enum Value : int { - /** 100 Continue*/ + /// 100 Continue Http100Continue = 100, - /** 101 Switching Protocols*/ + /// 101 Switching Protocols Http101SwitchingProtocols = 101, - /** 102 Processing */ + /// 102 Processing Http102Processing = 102, - /** 103 Early Hints */ + /// 103 Early Hints Http103EarlyHints = 103, - /** 104-199 Unassigned */ + /// 104-199 Unassigned - /** 200 OK */ + /// 200 OK Http200OK = 200, - /** 201 Created */ + /// 201 Created Http201Created = 201, - /** 202 Accepted */ + /// 202 Accepted Http202Accepted = 202, - /** 203 Non-Authoritative Information */ + /// 203 Non-Authoritative Information Http203NonAuthoritativeInformation = 203, - /** 204 No Content*/ + /// 204 No Content Http204NoContent = 204, - /** 205 Reset Content*/ + /// 205 Reset Content Http205ResetContent = 205, - /** 206 Partial Content */ + /// 206 Partial Content Http206PartialContent = 206, - /** 207 Multi-Status */ + /// 207 Multi-Status Http207MultiStatus = 207, - /** 208 Already Reported */ + /// 208 Already Reported Http208AlreadyReported = 208, - /** 209-225 Unassigned */ - /** 226 IM Used */ + /// 209-225 Unassigned + /// 226 IM Used Http226IMUsed = 226, - /** 227-299 Unassigned */ + /// 227-299 Unassigned - /** 300 Multiple Choices */ + /// 300 Multiple Choices Http300MultipleChoices = 300, - /** 301 Moved Permanently */ + /// 301 Moved Permanently Http301MovedPermanently = 301, - /** 302 (various messages) */ + /// 302 (various messages) Http302 = 302, - /** 303 See Other */ + /// 303 See Other Http303SeeOther = 303, - /** 304 Not Modified */ + /// 304 Not Modified Http304NotModified = 304, - /** 305 Use Proxy */ + /// 305 Use Proxy Http305UseProxy = 305, - /** 306 Switch Proxy */ + /// 306 Switch Proxy Http306SwitchProxy = 306, - /** 307 Temporary Redirect */ + /// 307 Temporary Redirect Http307TemporaryRedirect = 307, - /** 308 Permanent Redirect, */ + /// 308 Permanent Redirect, Http308PermanentRedirect = 308, - /** 309-399 Unassigned */ + /// 309-399 Unassigned - /** 400 Bad Request */ + /// 400 Bad Request Http400BadRequest = 400, - /** 401 Unauthorized */ + /// 401 Unauthorized Http401Unauthorized = 401, - /** 402 Payment Required */ + /// 402 Payment Required Http402PaymentRequired = 402, - /** 403 Forbidden */ + /// 403 Forbidden Http403Forbidden = 403, - /** 404 Not Found */ + /// 404 Not Found Http404NotFound = 404, - /** 405 Method Not Allowed */ + /// 405 Method Not Allowed Http405MethodNotAllowed = 405, - /** 406 Not Acceptable */ + /// 406 Not Acceptable Http406NotAcceptable = 406, - /** 407 Proxy Authentication Required */ + /// 407 Proxy Authentication Required Http407ProxyAuthenticationRequired = 407, - /** 408 Request Timeout */ + /// 408 Request Timeout Http408RequestTimeout = 408, - /** 409 Conflict */ + /// 409 Conflict Http409Conflict = 409, - /** 410 Gone */ + /// 410 Gone Http410Gone = 410, - /** 411 Length Required */ + /// 411 Length Required Http411LengthRequired = 411, - /** 412 Precondition Failed */ + /// 412 Precondition Failed Http412PreconditionFailed = 412, - /** 413 RequestEntity Too Large */ + /// 413 RequestEntity Too Large Http413RequestEntityTooLarge = 413, - /** 414 Request-URI Too Long */ + /// 414 Request-URI Too Long Http414RequestURITooLong = 414, - /** 415 Unsupported Media Type */ + /// 415 Unsupported Media Type Http415UnsupportedMediaType = 415, - /** 416 Requested Range Not Satisfiable */ + /// 416 Requested Range Not Satisfiable Http416RequestedRangeNotSatisfiable = 416, - /** 417 Expectation Failed */ + /// 417 Expectation Failed Http417ExpectationFailed = 417, - /** 418 I'm a teapot */ + /// 418 I'm a teapot Http418ImATeapot = 418, - /** 419 Authentication Timeout */ + /// 419 Authentication Timeout Http419AuthenticationTimeout = 419, - /** 420 (various messages) */ + /// 420 (various messages) Http420 = 420, - /** 421 Misdirected Request */ + /// 421 Misdirected Request Http421MisdirectedRequest = 421, - /** 422 Unprocessable Entity */ + /// 422 Unprocessable Entity Http422UnprocessableEntity = 422, - /** 423 Locked */ + /// 423 Locked Http423Locked = 423, - /** 424 Failed Dependency */ + /// 424 Failed Dependency Http424FailedDependency = 424, - /** 425 Too Early */ + /// 425 Too Early Http425TooEarly = 425, - /** 426 Upgrade Required */ + /// 426 Upgrade Required Http426UpgradeRequired = 426, - /** 427 Unassigned */ - /** 428 Precondition Required */ + /// 427 Unassigned + /// 428 Precondition Required Http428PreconditionRequired = 428, - /** 429 Too Many Requests */ + /// 429 Too Many Requests Http429TooManyRequests = 429, - /** 430 Unassigned */ - /** 431 Request Header Fields Too Large */ + /// 430 Unassigned + /// 431 Request Header Fields Too Large Http431RequestHeaderFieldsTooLarge = 431, - /** 432-439 unassigned */ - /** 440 Login Timeout */ + /// 432-439 unassigned + /// 440 Login Timeout Http440LoginTimeout = 440, - /** 441-443 unassigned */ - /** 444 No Response */ + /// 441-443 unassigned + /// 444 No Response Http444NoResponse = 444, - /** 445-448 unassigned */ - /** 449 Retry With */ + /// 445-448 unassigned + /// 449 Retry With Http449RetryWith = 449, - /** 450 Blocked by Windows Parental Controls */ + /// 450 Blocked by Windows Parental Controls Http450BlockedByWindowsParentalControls = 450, - /** 451 (various messages) */ + /// 451 (various messages) Http451 = 451, - /** 452-493 unassigned */ - /** 494 Request Header Too Large */ + /// 452-493 unassigned + /// 494 Request Header Too Large Http494RequestHeaderTooLarge = 494, - /** 495 Cert Error */ + /// 495 Cert Error Http495CertError = 495, - /** 496 No Cert */ + /// 496 No Cert Http496NoCert = 496, - /** 497 HTTP to HTTPS */ + /// 497 HTTP to HTTPS Http497HTTPtoHTTPS = 497, - /** 498 Token expired/invalid */ + /// 498 Token expired/invalid Http498TokenExpiredInvalid = 498, - /** 499 (various messages) */ + /// 499 (various messages) Http499 = 499, - /** 500 Internal Server Error */ + /// 500 Internal Server Error Http500InternalServerError = 500, - /** 501 Not Implemented */ + /// 501 Not Implemented Http501NotImplemented = 501, - /** 502 Bad Gateway */ + /// 502 Bad Gateway Http502BadGateway = 502, - /** 503 Service Unavailable */ + /// 503 Service Unavailable Http503ServiceUnavailable = 503, - /** 504 Gateway Timeout */ + /// 504 Gateway Timeout Http504GatewayTimeout = 504, - /** 505 HTTP Version Not Supported */ + /// 505 HTTP Version Not Supported Http505HTTPVersionNotSupported = 505, - /** 506 Variant Also Negotiates */ + /// 506 Variant Also Negotiates Http506VariantAlsoNegotiates = 506, - /** 507 Insufficient Storage */ + /// 507 Insufficient Storage Http507InsufficientStorage = 507, - /** 508 Loop Detected */ + /// 508 Loop Detected Http508LoopDetected = 508, - /** 509 Bandwidth Limit Exceeded */ + /// 509 Bandwidth Limit Exceeded Http509BandwidthLimitExceeded = 509, - /** 510 Not Extended */ + /// 510 Not Extended Http510NotExtended = 510, - /** 511 Network Authentication Required */ + /// 511 Network Authentication Required Http511NetworkAuthenticationRequired = 511, - /** 512-519 unassigned */ - /** 520 Origin Error */ + /// 512-519 unassigned + /// 520 Origin Error Http520OriginError = 520, - /** 521 Web server is down */ + /// 521 Web server is down Http521WebServerIsDown = 521, - /** 522 Connection timed out */ + /// 522 Connection timed out Http522ConnectionTimedOut = 522, - /** 523 Proxy Declined Request */ + /// 523 Proxy Declined Request Http523ProxyDeclinedRequest = 523, - /** 524 A timeout occurred */ + /// 524 A timeout occurred Http524aTimeoutOccurred = 524, - /** 525-597 unassigned */ - /** 598 Network read timeout error */ + /// 525-597 unassigned + /// 598 Network read timeout error Http598NetworkReadTimeoutError = 598, - /** 599 Network connect timeout error */ + /// 599 Network connect timeout error Http599NetworkConnectTimeoutError = 599, // clang-format off - /** Unknown status code */ + /// Unknown status code HttpStatus1xxCodeUnknown = 900001, // 1xx: Informational - Request received, continuing process HttpStatus2xxCodeUnknown = 900002, // 2xx: Success - The action was successfully received, understood, and accepted HttpStatus3xxCodeUnknown = 900003, // 3xx: Redirection - Further action must be taken in order to complete the request diff --git a/Packet++/header/IPReassembly.h b/Packet++/header/IPReassembly.h index b945096644..7edca76003 100644 --- a/Packet++/header/IPReassembly.h +++ b/Packet++/header/IPReassembly.h @@ -289,20 +289,20 @@ namespace pcpp /// An enum representing the status returned from processing a fragment enum ReassemblyStatus { - /** The processed packet isn't of type IPv4 or IPv6 */ + /// The processed packet isn't of type IPv4 or IPv6 NON_IP_PACKET = 0x00, - /** The processed packet isn't a fragment */ + /// The processed packet isn't a fragment NON_FRAGMENT = 0x01, - /** The processed fragment is the first fragment */ + /// The processed fragment is the first fragment FIRST_FRAGMENT = 0x02, - /** The processed fragment is a fragment (but not the first one) */ + /// The processed fragment is a fragment (but not the first one) FRAGMENT = 0x04, - /** The processed fragment is not the fragment that was expected at this time */ + /// The processed fragment is not the fragment that was expected at this time OUT_OF_ORDER_FRAGMENT = 0x08, - /** The processed fragment is malformed, meaning a fragment which has offset of zero but isn't the first - * fragment */ + /// The processed fragment is malformed, meaning a fragment which has offset of zero but isn't the first + /// fragment MALFORMED_FRAGMENT = 0x10, - /** Packet is now fully reassembled */ + /// Packet is now fully reassembled REASSEMBLED = 0x20 }; diff --git a/Packet++/header/IPSecLayer.h b/Packet++/header/IPSecLayer.h index 8c392e0553..ccf9525746 100644 --- a/Packet++/header/IPSecLayer.h +++ b/Packet++/header/IPSecLayer.h @@ -13,15 +13,15 @@ namespace pcpp #pragma pack(push, 1) struct ipsec_authentication_header { - /** Type of the next header */ + /// Type of the next header uint8_t nextHeader; - /** The length of the Authentication Header in 4-octet units, minus 2 */ + /// The length of the Authentication Header in 4-octet units, minus 2 uint8_t payloadLen; - /** Reserved */ + /// Reserved uint16_t reserved; - /** Security Parameters Index */ + /// Security Parameters Index uint32_t spi; - /** Sequence Number */ + /// Sequence Number uint32_t sequenceNumber; }; #pragma pack(pop) @@ -31,9 +31,9 @@ namespace pcpp #pragma pack(push, 1) struct ipsec_esp { - /** Security Parameters Index */ + /// Security Parameters Index uint32_t spi; - /** Sequence Number */ + /// Sequence Number uint32_t sequenceNumber; }; #pragma pack(pop) diff --git a/Packet++/header/IPv4Layer.h b/Packet++/header/IPv4Layer.h index 7eaf70bf34..e254eae9cd 100644 --- a/Packet++/header/IPv4Layer.h +++ b/Packet++/header/IPv4Layer.h @@ -19,133 +19,133 @@ namespace pcpp struct iphdr { #if (BYTE_ORDER == LITTLE_ENDIAN) - /** IP header length, has the value of 5 for IPv4 */ + /// IP header length, has the value of 5 for IPv4 uint8_t internetHeaderLength : 4, - /** IP version number, has the value of 4 for IPv4 */ + /// IP version number, has the value of 4 for IPv4 ipVersion : 4; #else - /** IP version number, has the value of 4 for IPv4 */ + /// IP version number, has the value of 4 for IPv4 uint8_t ipVersion : 4, - /** IP header length, has the value of 5 for IPv4 */ + /// IP header length, has the value of 5 for IPv4 internetHeaderLength : 4; #endif - /** type of service, same as Differentiated Services Code Point (DSCP)*/ + /// type of service, same as Differentiated Services Code Point (DSCP) uint8_t typeOfService; - /** Entire packet (fragment) size, including header and data, in bytes */ + /// Entire packet (fragment) size, including header and data, in bytes uint16_t totalLength; - /** Identification field. Primarily used for uniquely identifying the group of fragments of a single IP - * datagram*/ + /// Identification field. Primarily used for uniquely identifying the group of fragments of a single IP + /// datagram uint16_t ipId; - /** Fragment offset field, measured in units of eight-byte blocks (64 bits) */ + /// Fragment offset field, measured in units of eight-byte blocks (64 bits) uint16_t fragmentOffset; - /** An eight-bit time to live field helps prevent datagrams from persisting (e.g. going in circles) on an - * internet. In practice, the field has become a hop count */ + /// An eight-bit time to live field helps prevent datagrams from persisting (e.g. going in circles) on an + /// internet. In practice, the field has become a hop count uint8_t timeToLive; - /** Defines the protocol used in the data portion of the IP datagram. Must be one of ::IPProtocolTypes */ + /// Defines the protocol used in the data portion of the IP datagram. Must be one of ::IPProtocolTypes uint8_t protocol; - /** Error-checking of the header */ + /// Error-checking of the header uint16_t headerChecksum; - /** IPv4 address of the sender of the packet */ + /// IPv4 address of the sender of the packet uint32_t ipSrc; - /** IPv4 address of the receiver of the packet */ + /// IPv4 address of the receiver of the packet uint32_t ipDst; - /*The options start here. */ + // The options start here. }; #pragma pack(pop) /// An enum for all possible IPv4 and IPv6 protocol types enum IPProtocolTypes { - /** Dummy protocol for TCP */ + /// Dummy protocol for TCP PACKETPP_IPPROTO_IP = 0, - /** IPv6 Hop-by-Hop options */ + /// IPv6 Hop-by-Hop options PACKETPP_IPPROTO_HOPOPTS = 0, - /** Internet Control Message Protocol */ + /// Internet Control Message Protocol PACKETPP_IPPROTO_ICMP = 1, - /** Internet Gateway Management Protocol */ + /// Internet Gateway Management Protocol PACKETPP_IPPROTO_IGMP = 2, - /** IPIP tunnels (older KA9Q tunnels use 94) */ + /// IPIP tunnels (older KA9Q tunnels use 94) PACKETPP_IPPROTO_IPIP = 4, - /** Transmission Control Protocol */ + /// Transmission Control Protocol PACKETPP_IPPROTO_TCP = 6, - /** Exterior Gateway Protocol */ + /// Exterior Gateway Protocol PACKETPP_IPPROTO_EGP = 8, - /** PUP protocol */ + /// PUP protocol PACKETPP_IPPROTO_PUP = 12, - /** User Datagram Protocol */ + /// User Datagram Protocol PACKETPP_IPPROTO_UDP = 17, - /** XNS IDP protocol */ + /// XNS IDP protocol PACKETPP_IPPROTO_IDP = 22, - /** IPv6 header */ + /// IPv6 header PACKETPP_IPPROTO_IPV6 = 41, - /** IPv6 Routing header */ + /// IPv6 Routing header PACKETPP_IPPROTO_ROUTING = 43, - /** IPv6 fragmentation header */ + /// IPv6 fragmentation header PACKETPP_IPPROTO_FRAGMENT = 44, - /** GRE protocol */ + /// GRE protocol PACKETPP_IPPROTO_GRE = 47, - /** encapsulating security payload */ + /// encapsulating security payload PACKETPP_IPPROTO_ESP = 50, - /** authentication header */ + /// authentication header PACKETPP_IPPROTO_AH = 51, - /** ICMPv6 */ + /// ICMPv6 PACKETPP_IPPROTO_ICMPV6 = 58, - /** IPv6 no next header */ + /// IPv6 no next header PACKETPP_IPPROTO_NONE = 59, - /** IPv6 Destination options */ + /// IPv6 Destination options PACKETPP_IPPROTO_DSTOPTS = 60, - /** VRRP protocol */ + /// VRRP protocol PACKETPP_IPPROTO_VRRP = 112, - /** Raw IP packets */ + /// Raw IP packets PACKETPP_IPPROTO_RAW = 255, - /** Maximum value */ + /// Maximum value PACKETPP_IPPROTO_MAX }; /// An enum for supported IPv4 option types enum IPv4OptionTypes { - /** End of Options List */ + /// End of Options List IPV4OPT_EndOfOptionsList = 0, - /** No Operation */ + /// No Operation IPV4OPT_NOP = 1, - /** Record Route */ + /// Record Route IPV4OPT_RecordRoute = 7, - /** MTU Probe */ + /// MTU Probe IPV4OPT_MTUProbe = 11, - /** MTU Reply */ + /// MTU Reply IPV4OPT_MTUReply = 12, - /** Quick-Start */ + /// Quick-Start IPV4OPT_QuickStart = 25, - /** Timestamp */ + /// Timestamp IPV4OPT_Timestamp = 68, - /** Traceroute */ + /// Traceroute IPV4OPT_Traceroute = 82, - /** Security */ + /// Security IPV4OPT_Security = 130, - /** Loose Source Route */ + /// Loose Source Route IPV4OPT_LooseSourceRoute = 131, - /** Extended Security */ + /// Extended Security IPV4OPT_ExtendedSecurity = 133, - /** Commercial Security */ + /// Commercial Security IPV4OPT_CommercialSecurity = 134, - /** Stream ID */ + /// Stream ID IPV4OPT_StreamID = 136, - /** Strict Source Route */ + /// Strict Source Route IPV4OPT_StrictSourceRoute = 137, - /** Extended Internet Protocol */ + /// Extended Internet Protocol IPV4OPT_ExtendedInternetProtocol = 145, - /** Address Extension */ + /// Address Extension IPV4OPT_AddressExtension = 147, - /** Router Alert */ + /// Router Alert IPV4OPT_RouterAlert = 148, - /** Selective Directed Broadcast */ + /// Selective Directed Broadcast IPV4OPT_SelectiveDirectedBroadcast = 149, - /** Dynamic Packet State */ + /// Dynamic Packet State IPV4OPT_DynamicPacketState = 151, - /** Upstream Multicast Pkt. */ + /// Upstream Multicast Pkt. IPV4OPT_UpstreamMulticastPkt = 152, - /** Unknown IPv4 option */ + /// Unknown IPv4 option IPV4OPT_Unknown }; @@ -160,26 +160,26 @@ namespace pcpp /// An enum for IPv4 timestamp option types enum TimestampType { - /** Value containing only timestamps */ + /// Value containing only timestamps TimestampOnly = 0, - /** Value containing both timestamps and IPv4 addresses */ + /// Value containing both timestamps and IPv4 addresses TimestampAndIP = 1, - /** The IPv4 addresses are prespecified */ + /// The IPv4 addresses are prespecified TimestampsForPrespecifiedIPs = 2, - /** Invalid or unknown value type */ + /// Invalid or unknown value type Unknown = 3 }; - /** The timestamp value type */ + /// The timestamp value type TimestampType type; - /** A list of timestamps parsed from the IPv4 timestamp option value */ + /// A list of timestamps parsed from the IPv4 timestamp option value std::vector timestamps; - /** A list of IPv4 addresses parsed from the IPv4 timestamp option value */ + /// A list of IPv4 addresses parsed from the IPv4 timestamp option value std::vector ipAddresses; - /** The default constructor */ + /// The default constructor IPv4TimestampOptionValue() : type(IPv4TimestampOptionValue::Unknown) {} diff --git a/Packet++/header/IPv6Extensions.h b/Packet++/header/IPv6Extensions.h index 04cb2ce20b..e03d32837d 100644 --- a/Packet++/header/IPv6Extensions.h +++ b/Packet++/header/IPv6Extensions.h @@ -22,17 +22,17 @@ namespace pcpp /// An enum representing all supported IPv6 extension types enum IPv6ExtensionType { - /** Hop-By-Hop extension type */ + /// Hop-By-Hop extension type IPv6HopByHop = 0, - /** Routing extension type */ + /// Routing extension type IPv6Routing = 43, - /** IPv6 fragmentation extension type */ + /// IPv6 fragmentation extension type IPv6Fragmentation = 44, - /** Authentication Header extension type */ + /// Authentication Header extension type IPv6AuthenticationHdr = 51, - /** Destination extension type */ + /// Destination extension type IPv6Destination = 60, - /** Unknown or unsupported extension type */ + /// Unknown or unsupported extension type IPv6ExtensionUnknown = 255 }; @@ -113,14 +113,14 @@ namespace pcpp /// A struct representing IPv6 fragmentation header struct ipv6_frag_header { - /** Next header type */ + /// Next header type uint8_t nextHeader; - /** Fragmentation header size is fixed 8 bytes, so len is always zero */ + /// Fragmentation header size is fixed 8 bytes, so len is always zero uint8_t headerLen; - /** Offset, in 8-octet units, relative to the start of the fragmentable part of the original packet - * plus 1-bit indicating if more fragments will follow */ + /// Offset, in 8-octet units, relative to the start of the fragmentable part of the original packet + /// plus 1-bit indicating if more fragments will follow uint16_t fragOffsetAndFlags; - /** packet identification value. Needed for reassembly of the original packet */ + /// packet identification value. Needed for reassembly of the original packet uint32_t id; }; @@ -364,13 +364,13 @@ namespace pcpp /// A struct representing the fixed part of the IPv6 routing extension header struct ipv6_routing_header { - /** Next header type */ + /// Next header type uint8_t nextHeader; - /** The length of this header, in multiples of 8 octets, not including the first 8 octets */ + /// The length of this header, in multiples of 8 octets, not including the first 8 octets uint8_t headerLen; - /** A value representing the routing type */ + /// A value representing the routing type uint8_t routingType; - /** Number of nodes this packet still has to visit before reaching its final destination */ + /// Number of nodes this packet still has to visit before reaching its final destination uint8_t segmentsLeft; }; @@ -430,18 +430,18 @@ namespace pcpp /// A struct representing the fixed part of the IPv6 authentication header extension struct ipv6_authentication_header { - /** Next header type */ + /// Next header type uint8_t nextHeader; - /** The length of this Authentication Header in 4-octet units, minus 2. For example, an AH value of 4 - * equals: [ 3×(32-bit fixed-length AH fields) + 3×(32-bit ICV fields) − 2 ] and thus an AH value of 4 means - * 24 octets */ + /// The length of this Authentication Header in 4-octet units, minus 2. For example, an AH value of 4 + /// equals: [ 3×(32-bit fixed-length AH fields) + 3×(32-bit ICV fields) − 2 ] and thus an AH value of 4 + /// means 24 octets uint8_t headerLen; - /** Reserved bytes, all zeros */ + /// Reserved bytes, all zeros uint16_t reserved; - /** Arbitrary value which is used (together with the destination IP address) to identify the security - * association of the receiving party */ + /// Arbitrary value which is used (together with the destination IP address) to identify the security + /// association of the receiving party uint32_t securityParametersIndex; - /** A monotonic strictly increasing sequence number (incremented by 1 for every packet sent) */ + /// A monotonic strictly increasing sequence number (incremented by 1 for every packet sent) uint32_t sequenceNumber; }; diff --git a/Packet++/header/IPv6Layer.h b/Packet++/header/IPv6Layer.h index 8fba5e2ffd..62aa8d7085 100644 --- a/Packet++/header/IPv6Layer.h +++ b/Packet++/header/IPv6Layer.h @@ -18,27 +18,27 @@ namespace pcpp struct ip6_hdr { #if (BYTE_ORDER == LITTLE_ENDIAN) - /** Traffic class */ + /// Traffic class uint8_t trafficClass : 4, - /** IP version number, has the value of 6 for IPv6 */ + /// IP version number, has the value of 6 for IPv6 ipVersion : 4; #else - /** IP version number, has the value of 6 for IPv6 */ + /// IP version number, has the value of 6 for IPv6 uint8_t ipVersion : 4, - /** Traffic class */ + /// Traffic class trafficClass : 4; #endif - /** Flow label */ + /// Flow label uint8_t flowLabel[3]; - /** The size of the payload in octets, including any extension headers */ + /// The size of the payload in octets, including any extension headers uint16_t payloadLength; - /** Specifies the type of the next header (protocol). Must be one of ::IPProtocolTypes */ + /// Specifies the type of the next header (protocol). Must be one of ::IPProtocolTypes uint8_t nextHeader; - /** Replaces the time to live field of IPv4 */ + /// Replaces the time to live field of IPv4 uint8_t hopLimit; - /** Source address */ + /// Source address uint8_t ipSrc[16]; - /** Destination address */ + /// Destination address uint8_t ipDst[16]; }; #pragma pack(pop) diff --git a/Packet++/header/IcmpLayer.h b/Packet++/header/IcmpLayer.h index 1ecb7998cf..d1e25dfbd5 100644 --- a/Packet++/header/IcmpLayer.h +++ b/Packet++/header/IcmpLayer.h @@ -21,11 +21,11 @@ namespace pcpp #pragma pack(push, 1) typedef struct icmphdr { - /** message type */ + /// message type uint8_t type; - /** message code */ + /// message code uint8_t code; - /** message checksum */ + /// message checksum uint16_t checksum; } icmphdr; #pragma pack(pop) @@ -33,37 +33,37 @@ namespace pcpp /// An enum of all supported ICMP message types enum IcmpMessageType { - /** ICMP echo (ping) reply message */ + /// ICMP echo (ping) reply message ICMP_ECHO_REPLY = 0, - /** ICMP destination unreachable message */ + /// ICMP destination unreachable message ICMP_DEST_UNREACHABLE = 3, - /** ICMP source quench message */ + /// ICMP source quench message ICMP_SOURCE_QUENCH = 4, - /** ICMP redirect message */ + /// ICMP redirect message ICMP_REDIRECT = 5, - /** ICMP echo (ping) request message */ + /// ICMP echo (ping) request message ICMP_ECHO_REQUEST = 8, - /** ICMP router advertisement message */ + /// ICMP router advertisement message ICMP_ROUTER_ADV = 9, - /** ICMP router soliciatation message */ + /// ICMP router soliciatation message ICMP_ROUTER_SOL = 10, - /** ICMP time-to-live excceded message */ + /// ICMP time-to-live excceded message ICMP_TIME_EXCEEDED = 11, - /** ICMP parameter problem message */ + /// ICMP parameter problem message ICMP_PARAM_PROBLEM = 12, - /** ICMP timestamp request message */ + /// ICMP timestamp request message ICMP_TIMESTAMP_REQUEST = 13, - /** ICMP timestamp reply message */ + /// ICMP timestamp reply message ICMP_TIMESTAMP_REPLY = 14, - /** ICMP information request message */ + /// ICMP information request message ICMP_INFO_REQUEST = 15, - /** ICMP information reply message */ + /// ICMP information reply message ICMP_INFO_REPLY = 16, - /** ICMP address mask request message */ + /// ICMP address mask request message ICMP_ADDRESS_MASK_REQUEST = 17, - /** ICMP address mask reply message */ + /// ICMP address mask reply message ICMP_ADDRESS_MASK_REPLY = 18, - /** ICMP message type unsupported by PcapPlusPlus */ + /// ICMP message type unsupported by PcapPlusPlus ICMP_UNSUPPORTED = 255 }; @@ -71,43 +71,40 @@ namespace pcpp /// Documentation is taken from Wikipedia: https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol enum IcmpDestUnreachableCodes { - /** Network unreachable error */ + /// Network unreachable error IcmpNetworkUnreachable = 0, - /** Host unreachable error */ + /// Host unreachable error IcmpHostUnreachable = 1, - /** Protocol unreachable error (the designated transport protocol is not supported) */ + /// Protocol unreachable error (the designated transport protocol is not supported) IcmpProtocolUnreachable = 2, - /** Port unreachable error (the designated protocol is unable to inform the host of the incoming message) */ + /// Port unreachable error (the designated protocol is unable to inform the host of the incoming message) IcmpPortUnreachable = 3, - /** The datagram is too big. Packet fragmentation is required but the 'don't fragment' (DF) flag is on */ + /// The datagram is too big. Packet fragmentation is required but the 'don't fragment' (DF) flag is on IcmpDatagramTooBig = 4, - /** Source route failed error */ + /// Source route failed error IcmpSourceRouteFailed = 5, - /** Destination network unknown error */ + /// Destination network unknown error IcmpDestinationNetworkUnknown = 6, - /** Destination host unknown error */ + /// Destination host unknown error IcmpDestinationHostUnknown = 7, - /** Source host isolated error */ + /// Source host isolated error IcmpSourceHostIsolated = 8, - /** The destination network is administratively prohibited */ + /// The destination network is administratively prohibited IcmpDestinationNetworkProhibited = 9, - /** The destination host is administratively prohibited */ + /// The destination host is administratively prohibited IcmpDestinationHostProhibited = 10, - /** The network is unreachable for Type Of Service */ + /// The network is unreachable for Type Of Service IcmpNetworkUnreachableForTypeOfService = 11, - /** The host is unreachable for Type Of Service */ + /// The host is unreachable for Type Of Service IcmpHostUnreachableForTypeOfService = 12, - /** Communication administratively prohibited (administrative filtering prevents - * packet from being forwarded) - */ + /// Communication administratively prohibited (administrative filtering prevents + /// packet from being forwarded) IcmpCommunicationProhibited = 13, - /** Host precedence violation (indicates the requested precedence is not permitted for - * the combination of host or network and port) - */ + /// Host precedence violation (indicates the requested precedence is not permitted for + /// the combination of host or network and port) IcmpHostPrecedenceViolation = 14, - /** Precedence cutoff in effect (precedence of datagram is below the level set by - * the network administrators) - */ + /// Precedence cutoff in effect (precedence of datagram is below the level set by + /// the network administrators) IcmpPrecedenceCutoff = 15 }; @@ -116,12 +113,12 @@ namespace pcpp #pragma pack(push, 1) typedef struct icmp_echo_hdr : icmphdr { - /** the echo (ping) request identifier */ + /// the echo (ping) request identifier uint16_t id; - /** the echo (ping) request sequence number */ - uint16_t sequence; - /** a timestamp of when the message was sent */ - uint64_t timestamp; + /// the echo (ping) request sequence number + uint16_t sequence; + /// a timestamp of when the message was sent + uint64_t timestamp; } icmp_echo_hdr; #pragma pack(pop) @@ -129,11 +126,11 @@ namespace pcpp /// ICMP echo (ping) request/reply message structure typedef struct icmp_echo_request { - /** a pointer to the header data */ + /// a pointer to the header data icmp_echo_hdr* header; - /** most echo requests/replies contain some payload data. This is the data length */ + /// most echo requests/replies contain some payload data. This is the data length size_t dataLength; - /** most echo requests/replies contain some payload data. This is a pointer to this data */ + /// most echo requests/replies contain some payload data. This is a pointer to this data uint8_t* data; } icmp_echo_request; @@ -146,15 +143,15 @@ namespace pcpp #pragma pack(push, 1) typedef struct icmp_timestamp_request : icmphdr { - /** the timestamp request identifier */ + /// the timestamp request identifier uint16_t id; - /** the timestamp request sequence number */ + /// the timestamp request sequence number uint16_t sequence; - /** the time (in milliseconds since midnight) the sender last touched the packet */ + /// the time (in milliseconds since midnight) the sender last touched the packet uint32_t originateTimestamp; - /** relevant for timestamp reply only - the time the echoer first touched it on receipt */ + /// relevant for timestamp reply only - the time the echoer first touched it on receipt uint32_t receiveTimestamp; - /** relevant for timestamp reply only - the time the echoer last touched the message on sending it */ + /// relevant for timestamp reply only - the time the echoer last touched the message on sending it uint32_t transmitTimestamp; } icmp_timestamp_request; #pragma pack(pop) @@ -168,9 +165,9 @@ namespace pcpp #pragma pack(push, 1) typedef struct icmp_destination_unreachable : icmphdr { - /** unused 2 bytes */ + /// unused 2 bytes uint16_t unused; - /** contains the MTU of the next-hop network if a code 4 error occurs */ + /// contains the MTU of the next-hop network if a code 4 error occurs uint16_t nextHopMTU; } icmp_destination_unreachable; #pragma pack(pop) @@ -180,7 +177,7 @@ namespace pcpp #pragma pack(push, 1) typedef struct icmp_time_exceeded : icmphdr { - /** unused 4 bytes */ + /// unused 4 bytes uint32_t unused; } icmp_time_exceeded; #pragma pack(pop) @@ -194,12 +191,12 @@ namespace pcpp #pragma pack(push, 1) typedef struct icmp_param_problem : icmphdr { - /** in the case of an invalid IP header (Code 0), this field indicates the byte offset of the error in the - * header */ + /// in the case of an invalid IP header (Code 0), this field indicates the byte offset of the error in the + /// header uint8_t pointer; - /** unused 1 byte */ + /// unused 1 byte uint8_t unused1; - /** unused 2 bytes */ + /// unused 2 bytes uint16_t unused2; } icmp_param_problem; #pragma pack(pop) @@ -213,7 +210,7 @@ namespace pcpp #pragma pack(push, 1) typedef struct icmp_redirect : icmphdr { - /** an IPv4 address of the gateway to which the redirection should be sent */ + /// an IPv4 address of the gateway to which the redirection should be sent uint32_t gatewayAddress; } icmp_redirect; #pragma pack(pop) @@ -223,11 +220,11 @@ namespace pcpp #pragma pack(push, 1) struct icmp_router_address_structure { - /** the IPv4 address of the advertised router */ + /// the IPv4 address of the advertised router uint32_t routerAddress; - /** The preferability of the router address as a default router address, relative to other router addresses - * on the same subnet. This is a twos-complement value where higher values indicate that the route is - * more preferable */ + /// The preferability of the router address as a default router address, relative to other router addresses + /// on the same subnet. This is a twos-complement value where higher values indicate that the route is + /// more preferable uint32_t preferenceLevel; /// Set router address structure from a given IPv4 address and preference level @@ -248,13 +245,13 @@ namespace pcpp #pragma pack(push, 1) typedef struct icmp_router_advertisement_hdr : icmphdr { - /** the number of router advertisements in this message. Each advertisement contains one router - * address/preference level pair */ + /// the number of router advertisements in this message. Each advertisement contains one router + /// address/preference level pair uint8_t advertisementCount; - /** the number of 32-bit words of information for each router address entry in the list. The value is normally - * set to 2 (router address + preference level) */ + /// the number of 32-bit words of information for each router address entry in the list. The value is normally + /// set to 2 (router address + preference level) uint8_t addressEntrySize; - /** the maximum number of seconds that the router addresses in this list may be considered valid */ + /// the maximum number of seconds that the router addresses in this list may be considered valid uint16_t lifetime; } icmp_router_advertisement_hdr; #pragma pack(pop) @@ -263,7 +260,7 @@ namespace pcpp /// ICMP router advertisement message structure struct icmp_router_advertisement { - /** a pointer to the header data on the packet */ + /// a pointer to the header data on the packet icmp_router_advertisement_hdr* header; /// Extract router advertisement at a given index @@ -279,11 +276,11 @@ namespace pcpp #pragma pack(push, 1) typedef struct icmp_address_mask_request : icmphdr { - /** the address mask request identifier */ + /// the address mask request identifier uint16_t id; - /** the address mask request sequence */ + /// the address mask request sequence uint16_t sequence; - /** the subnet mask of the requesting host */ + /// the subnet mask of the requesting host uint32_t addressMask; } icmp_address_mask_request; #pragma pack(pop) @@ -297,9 +294,9 @@ namespace pcpp #pragma pack(push, 1) typedef struct icmp_info_request : icmphdr { - /** the information request identifier */ + /// the information request identifier uint16_t id; - /** the information request sequence */ + /// the information request sequence uint16_t sequence; } icmp_info_request; #pragma pack(pop) diff --git a/Packet++/header/IcmpV6Layer.h b/Packet++/header/IcmpV6Layer.h index 92c5ca7820..d690a12a9d 100644 --- a/Packet++/header/IcmpV6Layer.h +++ b/Packet++/header/IcmpV6Layer.h @@ -11,81 +11,81 @@ namespace pcpp /// An enum representing the available ICMPv6 message types enum class ICMPv6MessageType : int { - /** Unknown ICMPv6 message */ + /// Unknown ICMPv6 message ICMPv6_UNKNOWN_MESSAGE = 0, - /** Destination Unreachable Message */ + /// Destination Unreachable Message ICMPv6_DESTINATION_UNREACHABLE = 1, - /** Packet Too Big Message */ + /// Packet Too Big Message ICMPv6_PACKET_TOO_BIG = 2, - /** Time Exceeded Message */ + /// Time Exceeded Message ICMPv6_TIME_EXCEEDED = 3, - /** Parameter Problem Message */ + /// Parameter Problem Message ICMPv6_PARAMETER_PROBLEM = 4, - /** Private Experimentation Message */ + /// Private Experimentation Message ICMPv6_PRIVATE_EXPERIMENTATION1 = 100, - /** Private Experimentation Message */ + /// Private Experimentation Message ICMPv6_PRIVATE_EXPERIMENTATION2 = 101, - /** Reserved for expansion of ICMPv6 error messages */ + /// Reserved for expansion of ICMPv6 error messages ICMPv6_RESERVED_EXPANSION_ERROR = 127, - /** Echo Request Message */ + /// Echo Request Message ICMPv6_ECHO_REQUEST = 128, - /** Echo Reply Message */ + /// Echo Reply Message ICMPv6_ECHO_REPLY = 129, - /** Multicast Listener Query Message */ + /// Multicast Listener Query Message ICMPv6_MULTICAST_LISTENER_QUERY = 130, - /** Multicast Listener Report Message */ + /// Multicast Listener Report Message ICMPv6_MULTICAST_LISTENER_REPORT = 131, - /** Multicast Listener Done Message */ + /// Multicast Listener Done Message ICMPv6_MULTICAST_LISTENER_DONE = 132, - /** Router Solicitation Message */ + /// Router Solicitation Message ICMPv6_ROUTER_SOLICITATION = 133, - /** Router Advertisement Message */ + /// Router Advertisement Message ICMPv6_ROUTER_ADVERTISEMENT = 134, - /** Neighbor Solicitation Message */ + /// Neighbor Solicitation Message ICMPv6_NEIGHBOR_SOLICITATION = 135, - /** Neighbor Advertisement Message */ + /// Neighbor Advertisement Message ICMPv6_NEIGHBOR_ADVERTISEMENT = 136, - /** Redirect Message */ + /// Redirect Message ICMPv6_REDIRECT_MESSAGE = 137, - /** Router Renumbering Message */ + /// Router Renumbering Message ICMPv6_ROUTER_RENUMBERING = 138, - /** Node Information Query Message */ + /// Node Information Query Message ICMPv6_ICMP_NODE_INFORMATION_QUERY = 139, - /** Node Information Reply Message*/ + /// Node Information Reply Message ICMPv6_ICMP_NODE_INFORMATION_RESPONSE = 140, - /** Inverse Neighbor Discovery Solicitation Message */ + /// Inverse Neighbor Discovery Solicitation Message ICMPv6_INVERSE_NEIGHBOR_DISCOVERY_SOLICITATION_MESSAGE = 141, - /** Inverse Neighbor Discovery Advertisement Message */ + /// Inverse Neighbor Discovery Advertisement Message ICMPv6_INVERSE_NEIGHBOR_DISCOVERY_ADVERTISEMENT_MESSAGE = 142, - /** Multicast Listener Report Message */ + /// Multicast Listener Report Message ICMPv6_MULTICAST_LISTENER_DISCOVERY_REPORTS = 143, - /** Home Agent Address Discovery Request Message */ + /// Home Agent Address Discovery Request Message ICMPv6_HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_MESSAGE = 144, - /** Home Agent Address Discovery Reply Message */ + /// Home Agent Address Discovery Reply Message ICMPv6_HOME_AGENT_ADDRESS_DISCOVERY_REPLY_MESSAGE = 145, - /** Mobile Prefix Solicitation Message */ + /// Mobile Prefix Solicitation Message ICMPv6_MOBILE_PREFIX_SOLICITATION = 146, - /** Mobile Prefix Advertisement Message */ + /// Mobile Prefix Advertisement Message ICMPv6_MOBILE_PREFIX_ADVERTISEMENT = 147, - /** Certification Path Solicitation Message */ + /// Certification Path Solicitation Message ICMPv6_CERTIFICATION_PATH_SOLICITATION = 148, - /** Certification Path Advertisement Message */ + /// Certification Path Advertisement Message ICMPv6_CERTIFICATION_PATH_ADVERTISEMENT = 149, - /** ICMP Experimental Mobility Subtype Format and Registry Message */ + /// ICMP Experimental Mobility Subtype Format and Registry Message ICMPv6_EXPERIMENTAL_MOBILITY = 150, - /** Multicast Router Advertisement Message */ + /// Multicast Router Advertisement Message ICMPv6_MULTICAST_ROUTER_ADVERTISEMENT = 151, - /** Multicast Router Solicitation Message */ + /// Multicast Router Solicitation Message ICMPv6_MULTICAST_ROUTER_SOLICITATION = 152, - /** Multicast Router Termination Message*/ + /// Multicast Router Termination Message ICMPv6_MULTICAST_ROUTER_TERMINATION = 153, - /** RPL Control Message */ + /// RPL Control Message ICMPv6_RPL_CONTROL_MESSAGE = 155, - /** Private Experimentation Message */ + /// Private Experimentation Message ICMPv6_PRIVATE_EXPERIMENTATION3 = 200, - /** Private Experimentation Message */ + /// Private Experimentation Message ICMPv6_PRIVATE_EXPERIMENTATION4 = 201, - /** Reserved for expansion of ICMPv6 informational messages */ + /// Reserved for expansion of ICMPv6 informational messages ICMPv6_RESERVED_EXPANSION_INFORMATIONAL = 255 }; @@ -94,12 +94,12 @@ namespace pcpp #pragma pack(push, 1) struct icmpv6hdr { - /** Type of the message. Values in the range from 0 to 127 (high-order bit is 0) indicate an error message, - while values in the range from 128 to 255 (high-order bit is 1) indicate an information message. */ + /// Type of the message. Values in the range from 0 to 127 (high-order bit is 0) indicate an error message, + /// while values in the range from 128 to 255 (high-order bit is 1) indicate an information message. uint8_t type; - /** The code field value depends on the message type and provides an additional level of message granularity */ + /// The code field value depends on the message type and provides an additional level of message granularity uint8_t code; - /** The checksum field provides a minimal level of integrity verification for the ICMP message */ + /// The checksum field provides a minimal level of integrity verification for the ICMP message uint16_t checksum; }; #pragma pack(pop) @@ -109,9 +109,9 @@ namespace pcpp #pragma pack(push, 1) typedef struct icmpv6_echo_hdr : icmpv6hdr { - /** the echo request identifier */ + /// the echo request identifier uint16_t id; - /** the echo request sequence number */ + /// the echo request sequence number uint16_t sequence; } icmpv6_echo_hdr; #pragma pack(pop) @@ -202,9 +202,9 @@ namespace pcpp /// An enum representing ICMPv6 echo message types enum ICMPv6EchoType { - /** Echo Request Type */ + /// Echo Request Type REQUEST, - /** Echo Reply Type */ + /// Echo Reply Type REPLY }; diff --git a/Packet++/header/IgmpLayer.h b/Packet++/header/IgmpLayer.h index b16f296b16..b62397f132 100644 --- a/Packet++/header/IgmpLayer.h +++ b/Packet++/header/IgmpLayer.h @@ -14,14 +14,13 @@ namespace pcpp /// IGMPv1 and IGMPv2 basic protocol header struct igmp_header { - /** Indicates the message type. The enum for message type is pcpp::IgmpType */ + /// Indicates the message type. The enum for message type is pcpp::IgmpType uint8_t type; - /** Specifies the time limit for the corresponding report. The field has a resolution of 100 milliseconds */ + /// Specifies the time limit for the corresponding report. The field has a resolution of 100 milliseconds uint8_t maxResponseTime; - /** This is the 16-bit one's complement of the one's complement sum of the entire IGMP message */ + /// This is the 16-bit one's complement of the one's complement sum of the entire IGMP message uint16_t checksum; - /** This is the multicast address being queried when sending a Group-Specific or Group-and-Source-Specific Query - */ + /// This is the multicast address being queried when sending a Group-Specific or Group-and-Source-Specific Query uint32_t groupAddress; }; @@ -29,20 +28,19 @@ namespace pcpp /// IGMPv3 membership query basic header struct igmpv3_query_header { - /** IGMP message type. Should always have value of membership query (::IgmpType_MembershipQuery) */ + /// IGMP message type. Should always have value of membership query (::IgmpType_MembershipQuery) uint8_t type; - /** This field specifies the maximum time (in 1/10 second) allowed before sending a responding report */ + /// This field specifies the maximum time (in 1/10 second) allowed before sending a responding report uint8_t maxResponseTime; - /** This is the 16-bit one's complement of the one's complement sum of the entire IGMP message */ + /// This is the 16-bit one's complement of the one's complement sum of the entire IGMP message uint16_t checksum; - /** This is the multicast address being queried when sending a Group-Specific or Group-and-Source-Specific Query - */ + /// This is the multicast address being queried when sending a Group-Specific or Group-and-Source-Specific Query uint32_t groupAddress; - /** Suppress Router-side Processing Flag + Querier's Robustness Variable */ + /// Suppress Router-side Processing Flag + Querier's Robustness Variable uint8_t s_qrv; - /** Querier's Query Interval Code */ + /// Querier's Query Interval Code uint8_t qqic; - /** This field specifies the number of source addresses present in the Query */ + /// This field specifies the number of source addresses present in the Query uint16_t numOfSources; }; @@ -50,15 +48,15 @@ namespace pcpp /// IGMPv3 membership report basic header struct igmpv3_report_header { - /** IGMP message type. Should always have value of IGMPv3 membership report (::IgmpType_MembershipReportV3) */ + /// IGMP message type. Should always have value of IGMPv3 membership report (::IgmpType_MembershipReportV3) uint8_t type; - /** Unused byte */ + /// Unused byte uint8_t reserved1; - /** This is the 16-bit one's complement of the one's complement sum of the entire IGMP message */ + /// This is the 16-bit one's complement of the one's complement sum of the entire IGMP message uint16_t checksum; - /** Unused bytes */ + /// Unused bytes uint16_t reserved2; - /** This field specifies the number of group records present in the Report */ + /// This field specifies the number of group records present in the Report uint16_t numOfGroupRecords; }; @@ -67,16 +65,15 @@ namespace pcpp /// the interface from which the Report is sent. Relevant only for IGMPv3 membership report messages struct igmpv3_group_record { - /** Group record type */ + /// Group record type uint8_t recordType; - /** Contains the length of the Auxiliary Data field in this Group Record. A value other than 0 isn't supported - */ + /// Contains the length of the Auxiliary Data field in this Group Record. A value other than 0 isn't supported uint8_t auxDataLen; - /** Specifies how many source addresses are present in this Group Record */ + /// Specifies how many source addresses are present in this Group Record uint16_t numOfSources; - /** Contains the IP multicast address to which this Group Record pertains */ + /// Contains the IP multicast address to which this Group Record pertains uint32_t multicastAddress; - /** A vector of n IP unicast addresses, where n is the value in this record's Number of Sources field */ + /// A vector of n IP unicast addresses, where n is the value in this record's Number of Sources field uint8_t sourceAddresses[]; /// @return The multicast address in igmpv3_group_record#multicastAddress as IPv4Address instance @@ -101,33 +98,33 @@ namespace pcpp /// IGMP message types enum IgmpType { - /** Unknown message type */ + /// Unknown message type IgmpType_Unknown = 0, - /** IGMP Membership Query */ + /// IGMP Membership Query IgmpType_MembershipQuery = 0x11, - /** IGMPv1 Membership Report */ + /// IGMPv1 Membership Report IgmpType_MembershipReportV1 = 0x12, - /** DVMRP */ + /// DVMRP IgmpType_DVMRP = 0x13, - /** PIM version 1 */ + /// PIM version 1 IgmpType_P1Mv1 = 0x14, - /** Cisco Trace Messages */ + /// Cisco Trace Messages IgmpType_CiscoTrace = 0x15, - /** IGMPv2 Membership Report */ + /// IGMPv2 Membership Report IgmpType_MembershipReportV2 = 0x16, - /** IGMPv2 Leave Group */ + /// IGMPv2 Leave Group IgmpType_LeaveGroup = 0x17, - /** Multicast Traceroute Response */ + /// Multicast Traceroute Response IgmpType_MulticastTracerouteResponse = 0x1e, - /** Multicast Traceroute */ + /// Multicast Traceroute IgmpType_MulticastTraceroute = 0x1f, - /** IGMPv3 Membership Report */ + /// IGMPv3 Membership Report IgmpType_MembershipReportV3 = 0x22, - /** MRD, Multicast Router Advertisement */ + /// MRD, Multicast Router Advertisement IgmpType_MulticastRouterAdvertisement = 0x30, - /** MRD, Multicast Router Solicitation */ + /// MRD, Multicast Router Solicitation IgmpType_MulticastRouterSolicitation = 0x31, - /** MRD, Multicast Router Termination */ + /// MRD, Multicast Router Termination IgmpType_MulticastRouterTermination = 0x32, }; @@ -315,16 +312,16 @@ namespace pcpp /// Add a new source address at the end of the source address list. The igmpv3_query_header#numOfSources field /// will be incremented accordingly /// @param[in] addr The IPv4 source address to add - /// @return True if source address was added successfully or false otherwise. If false is returned an appropriate - /// error message will be printed to log + /// @return True if source address was added successfully or false otherwise. If false is returned an + /// appropriate error message will be printed to log bool addSourceAddress(const IPv4Address& addr); /// Add a new source address at a certain index of the source address list. The igmpv3_query_header#numOfSources /// field will be incremented accordingly /// @param[in] addr The IPv4 source address to add /// @param[in] index The index to add the new source address at - /// @return True if source address was added successfully or false otherwise. If false is returned an appropriate - /// error message will be printed to log + /// @return True if source address was added successfully or false otherwise. If false is returned an + /// appropriate error message will be printed to log bool addSourceAddressAtIndex(const IPv4Address& addr, int index); /// Remove a source address at a certain index. The igmpv3_query_header#numOfSources field will be decremented @@ -344,8 +341,8 @@ namespace pcpp /// Calculate the IGMP checksum void computeCalculateFields() override; - /// @return The message size in bytes which include the size of the basic header + the size of the source address - /// list + /// @return The message size in bytes which include the size of the basic header + the size of the source + /// address list size_t getHeaderLen() const override; }; @@ -421,8 +418,8 @@ namespace pcpp /// Remove a group record at a certain index. The igmpv3_report_header#numOfGroupRecords field will be /// decremented accordingly /// @param[in] index The index of the group record to be removed - /// @return True if group record was removed successfully or false otherwise. If false is returned an appropriate - /// error message will be printed to log + /// @return True if group record was removed successfully or false otherwise. If false is returned an + /// appropriate error message will be printed to log bool removeGroupRecordAtIndex(int index); /// Remove all group records in the message. The igmpv3_report_header#numOfGroupRecords field will be set to 0 diff --git a/Packet++/header/NdpLayer.h b/Packet++/header/NdpLayer.h index e417cfb267..e769f5a60f 100644 --- a/Packet++/header/NdpLayer.h +++ b/Packet++/header/NdpLayer.h @@ -161,9 +161,9 @@ namespace pcpp #pragma pack(push, 1) struct ndpneighborsolicitationhdr : icmpv6hdr { - /** Reserved */ + /// Reserved uint32_t reserved; - /** Target address - Target address of solicitation message */ + /// Target address - Target address of solicitation message uint8_t targetIP[16]; }; #pragma pack(pop) @@ -230,30 +230,30 @@ namespace pcpp { #if (BYTE_ORDER == LITTLE_ENDIAN) uint32_t - /** Unused field */ + /// Unused field reserved : 5, - /** Flag indicating that this entry should override the old one */ + /// Flag indicating that this entry should override the old one override : 1, - /** Flag indicating that the advertisement was sent in response to a Neighbor Solicitation from the - Destination address */ + /// Flag indicating that the advertisement was sent in response to a Neighbor Solicitation from the + /// Destination address solicited : 1, - /** Flag indicating that the advertisement is sent by a router */ + /// Flag indicating that the advertisement is sent by a router router : 1, - /** Unused field */ + /// Unused field reserved2 : 24; #else uint32_t - /** Flag indicating that the advertisement is sent by a router */ + /// Flag indicating that the advertisement is sent by a router router : 1, - /** Flag indicating that the advertisement was sent in response to a Neighbor Solicitation from the - Destination address */ + /// Flag indicating that the advertisement was sent in response to a Neighbor Solicitation from the + /// Destination address solicited : 1, - /** Flag indicating that this entry should override the old one */ + /// Flag indicating that this entry should override the old one override : 1, - /** Unused field */ + /// Unused field reserved : 29; #endif - /** Target address - Either source address of advertisement or address for requested MAC */ + /// Target address - Either source address of advertisement or address for requested MAC uint8_t targetIP[16]; }; #pragma pack(pop) diff --git a/Packet++/header/NflogLayer.h b/Packet++/header/NflogLayer.h index 0604dc9642..87d99f566a 100644 --- a/Packet++/header/NflogLayer.h +++ b/Packet++/header/NflogLayer.h @@ -15,11 +15,11 @@ namespace pcpp #pragma pack(push, 1) struct nflog_header { - /** A Linux AF_ value, so it's 2 for IPv4 and 10 for IPv6 */ + /// A Linux AF_ value, so it's 2 for IPv4 and 10 for IPv6 uint8_t addressFamily; - /** The version field is 0 for the current version of the pseudo-header */ + /// The version field is 0 for the current version of the pseudo-header uint8_t version; - /** The network byte order (big-endian) */ + /// The network byte order (big-endian) uint16_t resourceId; }; #pragma pack(pop) @@ -28,39 +28,39 @@ namespace pcpp /// Represents TLV types of NFLOG packets enum class NflogTlvType { - /** the packet header structure */ + /// the packet header structure NFULA_PACKET_HDR = 1, - /** packet mark from skbuff */ + /// packet mark from skbuff NFULA_MARK = 2, - /** nflog_timestamp_t for skbuff's time stamp */ + /// nflog_timestamp_t for skbuff's time stamp NFULA_TIMESTAMP = 3, - /** ifindex of device on which packet received (possibly bridge group) */ + /// ifindex of device on which packet received (possibly bridge group) NFULA_IFINDEX_INDEV = 4, - /** ifindex of device on which packet transmitted (possibly bridge group) */ + /// ifindex of device on which packet transmitted (possibly bridge group) NFULA_IFINDEX_OUTDEV = 5, - /** ifindex of physical device on which packet received (not bridge group) */ + /// ifindex of physical device on which packet received (not bridge group) NFULA_IFINDEX_PHYSINDEV = 6, - /** ifindex of physical device on which packet transmitted (not bridge group) */ + /// ifindex of physical device on which packet transmitted (not bridge group) NFULA_IFINDEX_PHYSOUTDEV = 7, - /** nflog_hwaddr_t for hardware address */ + /// nflog_hwaddr_t for hardware address NFULA_HWADDR = 8, - /** packet payload */ + /// packet payload NFULA_PAYLOAD = 9, - /** text string - null-terminated, count includes NUL */ + /// text string - null-terminated, count includes NUL NFULA_PREFIX = 10, - /** UID owning socket on which packet was sent/received */ + /// UID owning socket on which packet was sent/received NFULA_UID = 11, - /** sequence number of packets on this NFLOG socket */ + /// sequence number of packets on this NFLOG socket NFULA_SEQ = 12, - /** sequence number of packets on all NFLOG sockets */ + /// sequence number of packets on all NFLOG sockets NFULA_SEQ_GLOBAL = 13, - /** GID owning socket on which packet was sent/received */ + /// GID owning socket on which packet was sent/received NFULA_GID = 14, - /** ARPHRD_ type of skbuff's device */ + /// ARPHRD_ type of skbuff's device NFULA_HWTYPE = 15, - /** skbuff's MAC-layer header */ + /// skbuff's MAC-layer header NFULA_HWHEADER = 16, - /** length of skbuff's MAC-layer header */ + /// length of skbuff's MAC-layer header NFULA_HWLEN = 17, }; @@ -72,11 +72,11 @@ namespace pcpp private: struct NflogTLVRawData { - /** Record length in bytes */ + /// Record length in bytes uint16_t recordLen; - /** Record type */ + /// Record type uint16_t recordType; - /** Record value (variable size) */ + /// Record value (variable size) uint8_t recordValue[]; }; NflogTLVRawData* m_Data; diff --git a/Packet++/header/NullLoopbackLayer.h b/Packet++/header/NullLoopbackLayer.h index b30824875d..0903781771 100644 --- a/Packet++/header/NullLoopbackLayer.h +++ b/Packet++/header/NullLoopbackLayer.h @@ -9,21 +9,21 @@ namespace pcpp { -/** IPv4 protocol **/ +/// IPv4 protocol * #define PCPP_BSD_AF_INET 2 -/** XEROX NS protocols */ +/// XEROX NS protocols #define PCPP_BSD_AF_NS 6 -/** ISO */ +/// ISO #define PCPP_BSD_AF_ISO 7 -/** AppleTalk */ +/// AppleTalk #define PCPP_BSD_AF_APPLETALK 16 -/** IPX */ +/// IPX #define PCPP_BSD_AF_IPX 23 -/** OpenBSD (and probably NetBSD), BSD/OS IPv6 */ +/// OpenBSD (and probably NetBSD), BSD/OS IPv6 #define PCPP_BSD_AF_INET6_BSD 24 -/** FreeBSD IPv6 */ +/// FreeBSD IPv6 #define PCPP_BSD_AF_INET6_FREEBSD 28 -/** Darwin IPv6 */ +/// Darwin IPv6 #define PCPP_BSD_AF_INET6_DARWIN 30 /// @class NullLoopbackLayer diff --git a/Packet++/header/PPPoELayer.h b/Packet++/header/PPPoELayer.h index 0da5631d75..012e6d0b46 100644 --- a/Packet++/header/PPPoELayer.h +++ b/Packet++/header/PPPoELayer.h @@ -17,23 +17,23 @@ namespace pcpp struct pppoe_header { #if (BYTE_ORDER == LITTLE_ENDIAN) - /** PPPoE version */ + /// PPPoE version uint8_t version : 4; - /** PPPoE type */ + /// PPPoE type uint8_t type : 4; - /** PPPoE code */ + /// PPPoE code uint8_t code; #else - /** PPPoE version */ + /// PPPoE version uint16_t version : 4; - /** PPPoE type */ + /// PPPoE type uint16_t type : 4; - /** PPPoE code */ + /// PPPoE code uint16_t code : 8; #endif - /** PPPoE session ID (relevant for PPPoE session packets only) */ + /// PPPoE session ID (relevant for PPPoE session packets only) uint16_t sessionId; - /** Length (in bytes) of payload, not including the PPPoE header */ + /// Length (in bytes) of payload, not including the PPPoE header uint16_t payloadLength; }; #pragma pack(pop) @@ -47,27 +47,27 @@ namespace pcpp /// PPPoE possible codes enum PPPoECode { - /** PPPoE session code */ + /// PPPoE session code PPPOE_CODE_SESSION = 0x00, - /** PPPoE discovery PADO */ + /// PPPoE discovery PADO PPPOE_CODE_PADO = 0x07, - /** PPPoE discovery PADI */ + /// PPPoE discovery PADI PPPOE_CODE_PADI = 0x09, - /** PPPoE discovery PADG */ + /// PPPoE discovery PADG PPPOE_CODE_PADG = 0x0a, - /** PPPoE discovery PADC */ + /// PPPoE discovery PADC PPPOE_CODE_PADC = 0x0b, - /** PPPoE discovery PADQ */ + /// PPPoE discovery PADQ PPPOE_CODE_PADQ = 0x0c, - /** PPPoE discovery PADR */ + /// PPPoE discovery PADR PPPOE_CODE_PADR = 0x19, - /** PPPoE discovery PADS */ + /// PPPoE discovery PADS PPPOE_CODE_PADS = 0x65, - /** PPPoE discovery PADT */ + /// PPPoE discovery PADT PPPOE_CODE_PADT = 0xa7, - /** PPPoE discovery PADM */ + /// PPPoE discovery PADM PPPOE_CODE_PADM = 0xd3, - /** PPPoE discovery PADN */ + /// PPPoE discovery PADN PPPOE_CODE_PADN = 0xd4 }; @@ -167,41 +167,41 @@ namespace pcpp /// PPPoE tag types enum PPPoETagTypes { - /** End-Of-List tag type*/ + /// End-Of-List tag type PPPOE_TAG_EOL = 0x0000, - /** Service-Name tag type*/ + /// Service-Name tag type PPPOE_TAG_SVC_NAME = 0x0101, - /** AC-Name tag type*/ + /// AC-Name tag type PPPOE_TAG_AC_NAME = 0x0102, - /** Host-Uniq tag type*/ + /// Host-Uniq tag type PPPOE_TAG_HOST_UNIQ = 0x0103, - /** AC-Cookie tag type*/ + /// AC-Cookie tag type PPPOE_TAG_AC_COOKIE = 0x0104, - /** Vendor-Specific tag type*/ + /// Vendor-Specific tag type PPPOE_TAG_VENDOR = 0x0105, - /** Credits tag type*/ + /// Credits tag type PPPOE_TAG_CREDITS = 0x0106, - /** Metrics tag type*/ + /// Metrics tag type PPPOE_TAG_METRICS = 0x0107, - /** Sequence Number tag type */ + /// Sequence Number tag type PPPOE_TAG_SEQ_NUM = 0x0108, - /** Credit Scale Factor tag type */ + /// Credit Scale Factor tag type PPPOE_TAG_CRED_SCALE = 0x0109, - /** Relay-Session-Id tag type */ + /// Relay-Session-Id tag type PPPOE_TAG_RELAY_ID = 0x0110, - /** HURL tag type */ + /// HURL tag type PPPOE_TAG_HURL = 0x0111, - /** MOTM tag type */ + /// MOTM tag type PPPOE_TAG_MOTM = 0x0112, - /** PPP-Max-Payload tag type */ + /// PPP-Max-Payload tag type PPPOE_TAG_MAX_PAYLD = 0x0120, - /** IP_Route_Add tag type */ + /// IP_Route_Add tag type PPPOE_TAG_IP_RT_ADD = 0x0121, - /** Service-Name-Error tag type */ + /// Service-Name-Error tag type PPPOE_TAG_SVC_ERR = 0x0201, - /** AC-System-Error tag type */ + /// AC-System-Error tag type PPPOE_TAG_AC_ERR = 0x0202, - /** Generic-Error tag type */ + /// Generic-Error tag type PPPOE_TAG_GENERIC_ERR = 0x0203 }; @@ -387,271 +387,271 @@ namespace pcpp // Copied from Wireshark: ppptypes.h - /** Padding Protocol */ + /// Padding Protocol #define PCPP_PPP_PADDING 0x1 - /** ROHC small-CID */ + /// ROHC small-CID #define PCPP_PPP_ROHC_SCID 0x3 - /** ROHC large-CID */ + /// ROHC large-CID #define PCPP_PPP_ROHC_LCID 0x5 - /** Internet Protocol version 4 */ + /// Internet Protocol version 4 #define PCPP_PPP_IP 0x21 - /** OSI Network Layer */ + /// OSI Network Layer #define PCPP_PPP_OSI 0x23 - /** Xerox NS IDP */ + /// Xerox NS IDP #define PCPP_PPP_XNSIDP 0x25 - /** DECnet Phase IV */ + /// DECnet Phase IV #define PCPP_PPP_DEC4 0x27 - /** AppleTalk */ + /// AppleTalk #define PCPP_PPP_AT 0x29 - /** Novell IPX */ + /// Novell IPX #define PCPP_PPP_IPX 0x2b - /** Van Jacobson Compressed TCP/IP */ + /// Van Jacobson Compressed TCP/IP #define PCPP_PPP_VJC_COMP 0x2d - /** Van Jacobson Uncompressed TCP/IP */ + /// Van Jacobson Uncompressed TCP/IP #define PCPP_PPP_VJC_UNCOMP 0x2f - /** Bridging PDU */ + /// Bridging PDU #define PCPP_PPP_BCP 0x31 - /** Stream Protocol (ST-II) */ + /// Stream Protocol (ST-II) #define PCPP_PPP_ST 0x33 - /** Banyan Vines */ + /// Banyan Vines #define PCPP_PPP_VINES 0x35 - /** AppleTalk EDDP */ + /// AppleTalk EDDP #define PCPP_PPP_AT_EDDP 0x39 - /** AppleTalk SmartBuffered */ + /// AppleTalk SmartBuffered #define PCPP_PPP_AT_SB 0x3b - /** Multi-Link */ + /// Multi-Link #define PCPP_PPP_MP 0x3d - /** NETBIOS Framing */ + /// NETBIOS Framing #define PCPP_PPP_NB 0x3f - /** Cisco Systems */ + /// Cisco Systems #define PCPP_PPP_CISCO 0x41 - /** Ascom Timeplex */ + /// Ascom Timeplex #define PCPP_PPP_ASCOM 0x43 - /** Fujitsu Link Backup and Load Balancing */ + /// Fujitsu Link Backup and Load Balancing #define PCPP_PPP_LBLB 0x45 - /** DCA Remote Lan */ + /// DCA Remote Lan #define PCPP_PPP_RL 0x47 - /** Serial Data Transport Protocol */ + /// Serial Data Transport Protocol #define PCPP_PPP_SDTP 0x49 - /** SNA over 802.2 */ + /// SNA over 802.2 #define PCPP_PPP_LLC 0x4b - /** SNA */ + /// SNA #define PCPP_PPP_SNA 0x4d - /** IPv6 Header Compression */ + /// IPv6 Header Compression #define PCPP_PPP_IPV6HC 0x4f - /** KNX Bridging Data */ + /// KNX Bridging Data #define PCPP_PPP_KNX 0x51 - /** Encryption */ + /// Encryption #define PCPP_PPP_ENCRYPT 0x53 - /** Individual Link Encryption */ + /// Individual Link Encryption #define PCPP_PPP_ILE 0x55 - /** Internet Protocol version 6 */ + /// Internet Protocol version 6 #define PCPP_PPP_IPV6 0x57 - /** PPP Muxing */ + /// PPP Muxing #define PCPP_PPP_MUX 0x59 - /** Vendor-Specific Network Protocol (VSNP) */ + /// Vendor-Specific Network Protocol (VSNP) #define PCPP_PPP_VSNP 0x5b - /** TRILL Network Protocol (TNP) */ + /// TRILL Network Protocol (TNP) #define PCPP_PPP_TNP 0x5d - /** RTP IPHC Full Header */ + /// RTP IPHC Full Header #define PCPP_PPP_RTP_FH 0x61 - /** RTP IPHC Compressed TCP */ + /// RTP IPHC Compressed TCP #define PCPP_PPP_RTP_CTCP 0x63 - /** RTP IPHC Compressed Non TCP */ + /// RTP IPHC Compressed Non TCP #define PCPP_PPP_RTP_CNTCP 0x65 - /** RTP IPHC Compressed UDP 8 */ + /// RTP IPHC Compressed UDP 8 #define PCPP_PPP_RTP_CUDP8 0x67 - /** RTP IPHC Compressed RTP 8 */ + /// RTP IPHC Compressed RTP 8 #define PCPP_PPP_RTP_CRTP8 0x69 - /** Stampede Bridging */ + /// Stampede Bridging #define PCPP_PPP_STAMPEDE 0x6f - /** MP+ Protocol */ + /// MP+ Protocol #define PCPP_PPP_MPPLUS 0x73 - /** NTCITS IPI */ + /// NTCITS IPI #define PCPP_PPP_NTCITS_IPI 0xc1 - /** Single link compression in multilink */ + /// Single link compression in multilink #define PCPP_PPP_ML_SLCOMP 0xfb - /** Compressed datagram */ + /// Compressed datagram #define PCPP_PPP_COMP 0xfd - /** 802.1d Hello Packets */ + /// 802.1d Hello Packets #define PCPP_PPP_STP_HELLO 0x0201 - /** IBM Source Routing BPDU */ + /// IBM Source Routing BPDU #define PCPP_PPP_IBM_SR 0x0203 - /** DEC LANBridge100 Spanning Tree */ + /// DEC LANBridge100 Spanning Tree #define PCPP_PPP_DEC_LB 0x0205 - /** Cisco Discovery Protocol */ + /// Cisco Discovery Protocol #define PCPP_PPP_CDP 0x0207 - /** Netcs Twin Routing */ + /// Netcs Twin Routing #define PCPP_PPP_NETCS 0x0209 - /** STP - Scheduled Transfer Protocol */ + /// STP - Scheduled Transfer Protocol #define PCPP_PPP_STP 0x020b - /** EDP - Extreme Discovery Protocol */ + /// EDP - Extreme Discovery Protocol #define PCPP_PPP_EDP 0x020d - /** Optical Supervisory Channel Protocol */ + /// Optical Supervisory Channel Protocol #define PCPP_PPP_OSCP 0x0211 - /** Optical Supervisory Channel Protocol */ + /// Optical Supervisory Channel Protocol #define PCPP_PPP_OSCP2 0x0213 - /** Luxcom */ + /// Luxcom #define PCPP_PPP_LUXCOM 0x0231 - /** Sigma Network Systems */ + /// Sigma Network Systems #define PCPP_PPP_SIGMA 0x0233 - /** Apple Client Server Protocol */ + /// Apple Client Server Protocol #define PCPP_PPP_ACSP 0x0235 - /** MPLS Unicast */ + /// MPLS Unicast #define PCPP_PPP_MPLS_UNI 0x0281 - /** MPLS Multicast */ + /// MPLS Multicast #define PCPP_PPP_MPLS_MULTI 0x0283 - /** IEEE p1284.4 standard - data packets */ + /// IEEE p1284.4 standard - data packets #define PCPP_PPP_P12844 0x0285 - /** ETSI TETRA Network Protocol Type 1 */ + /// ETSI TETRA Network Protocol Type 1 #define PCPP_PPP_TETRA 0x0287 - /** Multichannel Flow Treatment Protocol */ + /// Multichannel Flow Treatment Protocol #define PCPP_PPP_MFTP 0x0289 - /** RTP IPHC Compressed TCP No Delta */ + /// RTP IPHC Compressed TCP No Delta #define PCPP_PPP_RTP_CTCPND 0x2063 - /** RTP IPHC Context State */ + /// RTP IPHC Context State #define PCPP_PPP_RTP_CS 0x2065 - /** RTP IPHC Compressed UDP 16 */ + /// RTP IPHC Compressed UDP 16 #define PCPP_PPP_RTP_CUDP16 0x2067 - /** RTP IPHC Compressed RTP 16 */ + /// RTP IPHC Compressed RTP 16 #define PCPP_PPP_RTP_CRDP16 0x2069 - /** Cray Communications Control Protocol */ + /// Cray Communications Control Protocol #define PCPP_PPP_CCCP 0x4001 - /** CDPD Mobile Network Registration Protocol */ + /// CDPD Mobile Network Registration Protocol #define PCPP_PPP_CDPD_MNRP 0x4003 - /** Expand accelerator protocol */ + /// Expand accelerator protocol #define PCPP_PPP_EXPANDAP 0x4005 - /** ODSICP NCP */ + /// ODSICP NCP #define PCPP_PPP_ODSICP 0x4007 - /** DOCSIS DLL */ + /// DOCSIS DLL #define PCPP_PPP_DOCSIS 0x4009 - /** Cetacean Network Detection Protocol */ + /// Cetacean Network Detection Protocol #define PCPP_PPP_CETACEANNDP 0x400b - /** Stacker LZS */ + /// Stacker LZS #define PCPP_PPP_LZS 0x4021 - /** RefTek Protocol */ + /// RefTek Protocol #define PCPP_PPP_REFTEK 0x4023 - /** Fibre Channel */ + /// Fibre Channel #define PCPP_PPP_FC 0x4025 - /** EMIT Protocols */ + /// EMIT Protocols #define PCPP_PPP_EMIT 0x4027 - /** Vendor-Specific Protocol (VSP) */ + /// Vendor-Specific Protocol (VSP) #define PCPP_PPP_VSP 0x405b - /** TRILL Link State Protocol (TLSP) */ + /// TRILL Link State Protocol (TLSP) #define PCPP_PPP_TLSP 0x405d - /** Internet Protocol Control Protocol */ + /// Internet Protocol Control Protocol #define PCPP_PPP_IPCP 0x8021 - /** OSI Network Layer Control Protocol */ + /// OSI Network Layer Control Protocol #define PCPP_PPP_OSINLCP 0x8023 - /** Xerox NS IDP Control Protocol */ + /// Xerox NS IDP Control Protocol #define PCPP_PPP_XNSIDPCP 0x8025 - /** DECnet Phase IV Control Protocol */ + /// DECnet Phase IV Control Protocol #define PCPP_PPP_DECNETCP 0x8027 - /** AppleTalk Control Protocol */ + /// AppleTalk Control Protocol #define PCPP_PPP_ATCP 0x8029 - /** Novell IPX Control Protocol */ + /// Novell IPX Control Protocol #define PCPP_PPP_IPXCP 0x802b - /** Bridging NCP */ + /// Bridging NCP #define PCPP_PPP_BRIDGENCP 0x8031 - /** Stream Protocol Control Protocol */ + /// Stream Protocol Control Protocol #define PCPP_PPP_SPCP 0x8033 - /** Banyan Vines Control Protocol */ + /// Banyan Vines Control Protocol #define PCPP_PPP_BVCP 0x8035 - /** Multi-Link Control Protocol */ + /// Multi-Link Control Protocol #define PCPP_PPP_MLCP 0x803d - /** NETBIOS Framing Control Protocol */ + /// NETBIOS Framing Control Protocol #define PCPP_PPP_NBCP 0x803f - /** Cisco Systems Control Protocol */ + /// Cisco Systems Control Protocol #define PCPP_PPP_CISCOCP 0x8041 - /** Ascom Timeplex Control Protocol (?) */ + /// Ascom Timeplex Control Protocol (?) #define PCPP_PPP_ASCOMCP 0x8043 - /** Fujitsu LBLB Control Protocol */ + /// Fujitsu LBLB Control Protocol #define PCPP_PPP_LBLBCP 0x8045 - /** DCA Remote Lan Network Control Protocol */ + /// DCA Remote Lan Network Control Protocol #define PCPP_PPP_RLNCP 0x8047 - /** Serial Data Control Protocol */ + /// Serial Data Control Protocol #define PCPP_PPP_SDCP 0x8049 - /** SNA over 802.2 Control Protocol */ + /// SNA over 802.2 Control Protocol #define PCPP_PPP_LLCCP 0x804b - /** SNA Control Protocol */ + /// SNA Control Protocol #define PCPP_PPP_SNACP 0x804d - /** IP6 Header Compression Control Protocol */ + /// IP6 Header Compression Control Protocol #define PCPP_PPP_IP6HCCP 0x804f - /** KNX Bridging Control Protocol */ + /// KNX Bridging Control Protocol #define PCPP_PPP_KNXCP 0x8051 - /** Encryption Control Protocol */ + /// Encryption Control Protocol #define PCPP_PPP_ECP 0x8053 - /** Individual Link Encryption Control Protocol */ + /// Individual Link Encryption Control Protocol #define PCPP_PPP_ILECP 0x8055 - /** IPv6 Control Protocol */ + /// IPv6 Control Protocol #define PCPP_PPP_IPV6CP 0x8057 - /** PPP Muxing Control Protocol */ + /// PPP Muxing Control Protocol #define PCPP_PPP_MUXCP 0x8059 - /** Vendor-Specific Network Control Protocol (VSNCP) [RFC3772] */ + /// Vendor-Specific Network Control Protocol (VSNCP) [RFC3772] #define PCPP_PPP_VSNCP 0x805b - /** TRILL Network Control Protocol (TNCP) */ + /// TRILL Network Control Protocol (TNCP) #define PCPP_PPP_TNCP 0x805d - /** Stampede Bridging Control Protocol */ + /// Stampede Bridging Control Protocol #define PCPP_PPP_STAMPEDECP 0x806f - /** MP+ Contorol Protocol */ + /// MP+ Contorol Protocol #define PCPP_PPP_MPPCP 0x8073 - /** NTCITS IPI Control Protocol */ + /// NTCITS IPI Control Protocol #define PCPP_PPP_IPICP 0x80c1 - /** Single link compression in multilink control */ + /// Single link compression in multilink control #define PCPP_PPP_SLCC 0x80fb - /** Compression Control Protocol */ + /// Compression Control Protocol #define PCPP_PPP_CCP 0x80fd - /** Cisco Discovery Protocol Control Protocol */ + /// Cisco Discovery Protocol Control Protocol #define PCPP_PPP_CDPCP 0x8207 - /** Netcs Twin Routing */ + /// Netcs Twin Routing #define PCPP_PPP_NETCSCP 0x8209 - /** STP - Control Protocol */ + /// STP - Control Protocol #define PCPP_PPP_STPCP 0x820b - /** EDPCP - Extreme Discovery Protocol Control Protocol */ + /// EDPCP - Extreme Discovery Protocol Control Protocol #define PCPP_PPP_EDPCP 0x820d - /** Apple Client Server Protocol Control */ + /// Apple Client Server Protocol Control #define PCPP_PPP_ACSPC 0x8235 - /** MPLS Control Protocol */ + /// MPLS Control Protocol #define PCPP_PPP_MPLSCP 0x8281 - /** IEEE p1284.4 standard - Protocol Control */ + /// IEEE p1284.4 standard - Protocol Control #define PCPP_PPP_P12844CP 0x8285 - /** ETSI TETRA TNP1 Control Protocol */ + /// ETSI TETRA TNP1 Control Protocol #define PCPP_PPP_TETRACP 0x8287 - /** Multichannel Flow Treatment Protocol */ + /// Multichannel Flow Treatment Protocol #define PCPP_PPP_MFTPCP 0x8289 - /** Link Control Protocol */ + /// Link Control Protocol #define PCPP_PPP_LCP 0xc021 - /** Password Authentication Protocol */ + /// Password Authentication Protocol #define PCPP_PPP_PAP 0xc023 - /** Link Quality Report */ + /// Link Quality Report #define PCPP_PPP_LQR 0xc025 - /** Shiva Password Authentication Protocol */ + /// Shiva Password Authentication Protocol #define PCPP_PPP_SPAP 0xc027 - /** CallBack Control Protocol (CBCP) */ + /// CallBack Control Protocol (CBCP) #define PCPP_PPP_CBCP 0xc029 - /** BACP Bandwidth Allocation Control Protocol */ + /// BACP Bandwidth Allocation Control Protocol #define PCPP_PPP_BACP 0xc02b - /** BAP Bandwidth Allocation Protocol */ + /// BAP Bandwidth Allocation Protocol #define PCPP_PPP_BAP 0xc02d - /** Vendor-Specific Authentication Protocol (VSAP) */ + /// Vendor-Specific Authentication Protocol (VSAP) #define PCPP_PPP_VSAP 0xc05b - /** Container Control Protocol */ + /// Container Control Protocol #define PCPP_PPP_CONTCP 0xc081 - /** Challenge Handshake Authentication Protocol */ + /// Challenge Handshake Authentication Protocol #define PCPP_PPP_CHAP 0xc223 - /** RSA Authentication Protocol */ + /// RSA Authentication Protocol #define PCPP_PPP_RSAAP 0xc225 - /** Extensible Authentication Protocol */ + /// Extensible Authentication Protocol #define PCPP_PPP_EAP 0xc227 - /** Mitsubishi Security Information Exchange Protocol (SIEP) */ + /// Mitsubishi Security Information Exchange Protocol (SIEP) #define PCPP_PPP_SIEP 0xc229 - /** Stampede Bridging Authorization Protocol */ + /// Stampede Bridging Authorization Protocol #define PCPP_PPP_SBAP 0xc26f - /** Proprietary Authentication Protocol */ + /// Proprietary Authentication Protocol #define PCPP_PPP_PRPAP 0xc281 - /** Proprietary Authentication Protocol */ + /// Proprietary Authentication Protocol #define PCPP_PPP_PRPAP2 0xc283 - /** Proprietary Node ID Authentication Protocol */ + /// Proprietary Node ID Authentication Protocol #define PCPP_PPP_PRPNIAP 0xc481 } // namespace pcpp diff --git a/Packet++/header/PacketTrailerLayer.h b/Packet++/header/PacketTrailerLayer.h index 375daabee3..fdcb8e6487 100644 --- a/Packet++/header/PacketTrailerLayer.h +++ b/Packet++/header/PacketTrailerLayer.h @@ -1,6 +1,5 @@ #pragma once - #include "Layer.h" /// @file diff --git a/Packet++/header/ProtocolType.h b/Packet++/header/ProtocolType.h index d100670e45..a56a5b5a9a 100644 --- a/Packet++/header/ProtocolType.h +++ b/Packet++/header/ProtocolType.h @@ -220,21 +220,21 @@ namespace pcpp /// An enum representing OSI model layers enum OsiModelLayer { - /** Physical layer (layer 1) */ + /// Physical layer (layer 1) OsiModelPhysicalLayer = 1, - /** Data link layer (layer 2) */ + /// Data link layer (layer 2) OsiModelDataLinkLayer = 2, - /** Network layer (layer 3) */ + /// Network layer (layer 3) OsiModelNetworkLayer = 3, - /** Transport layer (layer 4) */ + /// Transport layer (layer 4) OsiModelTransportLayer = 4, - /** Session layer (layer 5) */ + /// Session layer (layer 5) OsiModelSesionLayer = 5, - /** Presentation layer (layer 6) */ + /// Presentation layer (layer 6) OsiModelPresentationLayer = 6, - /** Application layer (layer 7) */ + /// Application layer (layer 7) OsiModelApplicationLayer = 7, - /** Unknown / null layer */ + /// Unknown / null layer OsiModelLayerUnknown = 8 }; } // namespace pcpp diff --git a/Packet++/header/RadiusLayer.h b/Packet++/header/RadiusLayer.h index 4356150849..007362a9ff 100644 --- a/Packet++/header/RadiusLayer.h +++ b/Packet++/header/RadiusLayer.h @@ -14,13 +14,13 @@ namespace pcpp #pragma pack(push, 1) struct radius_header { - /** RADIUS message code */ + /// RADIUS message code uint8_t code; - /** RADIUS message ID */ + /// RADIUS message ID uint8_t id; - /** RADIUS message length */ + /// RADIUS message length uint16_t length; - /** Used to authenticate the reply from the RADIUS server and to encrypt passwords */ + /// Used to authenticate the reply from the RADIUS server and to encrypt passwords uint8_t authenticator[16]; }; #pragma pack(pop) diff --git a/Packet++/header/RawPacket.h b/Packet++/header/RawPacket.h index efdefc1a6e..0cdf34efe0 100644 --- a/Packet++/header/RawPacket.h +++ b/Packet++/header/RawPacket.h @@ -18,234 +18,233 @@ namespace pcpp /// An enum describing all known link layer type. Taken from: http://www.tcpdump.org/linktypes.html . enum LinkLayerType { - /** BSD loopback encapsulation */ + /// BSD loopback encapsulation LINKTYPE_NULL = 0, - /** IEEE 802.3 Ethernet */ + /// IEEE 802.3 Ethernet LINKTYPE_ETHERNET = 1, - /** AX.25 packet */ + /// AX.25 packet LINKTYPE_AX25 = 3, - /** IEEE 802.5 Token Ring */ + /// IEEE 802.5 Token Ring LINKTYPE_IEEE802_5 = 6, - /** ARCNET Data Packets */ + /// ARCNET Data Packets LINKTYPE_ARCNET_BSD = 7, - /** SLIP, encapsulated with a LINKTYPE_SLIP header */ + /// SLIP, encapsulated with a LINKTYPE_SLIP header LINKTYPE_SLIP = 8, - /** PPP, as per RFC 1661 and RFC 1662 */ + /// PPP, as per RFC 1661 and RFC 1662 LINKTYPE_PPP = 9, - /** FDDI, as specified by ANSI INCITS 239-1994 */ + /// FDDI, as specified by ANSI INCITS 239-1994 LINKTYPE_FDDI = 10, - /** Raw IP */ + /// Raw IP LINKTYPE_DLT_RAW1 = 12, - /** Raw IP (OpenBSD) */ + /// Raw IP (OpenBSD) LINKTYPE_DLT_RAW2 = 14, - /** PPP in HDLC-like framing, as per RFC 1662, or Cisco PPP with HDLC framing, as per section 4.3.1 of RFC 1547 - */ + /// PPP in HDLC-like framing, as per RFC 1662, or Cisco PPP with HDLC framing, as per section 4.3.1 of RFC 1547 LINKTYPE_PPP_HDLC = 50, - /** PPPoE */ + /// PPPoE LINKTYPE_PPP_ETHER = 51, - /** RFC 1483 LLC/SNAP-encapsulated ATM */ + /// RFC 1483 LLC/SNAP-encapsulated ATM LINKTYPE_ATM_RFC1483 = 100, - /** Raw IP */ + /// Raw IP LINKTYPE_RAW = 101, - /** Cisco PPP with HDLC framing */ + /// Cisco PPP with HDLC framing LINKTYPE_C_HDLC = 104, - /** IEEE 802.11 wireless LAN */ + /// IEEE 802.11 wireless LAN LINKTYPE_IEEE802_11 = 105, - /** Frame Relay */ + /// Frame Relay LINKTYPE_FRELAY = 107, - /** OpenBSD loopback encapsulation */ + /// OpenBSD loopback encapsulation LINKTYPE_LOOP = 108, - /** Linux "cooked" capture encapsulation */ + /// Linux "cooked" capture encapsulation LINKTYPE_LINUX_SLL = 113, - /** Apple LocalTalk */ + /// Apple LocalTalk LINKTYPE_LTALK = 114, - /** OpenBSD pflog */ + /// OpenBSD pflog LINKTYPE_PFLOG = 117, - /** Prism monitor mode information followed by an 802.11 header */ + /// Prism monitor mode information followed by an 802.11 header LINKTYPE_IEEE802_11_PRISM = 119, - /** RFC 2625 IP-over-Fibre Channel */ + /// RFC 2625 IP-over-Fibre Channel LINKTYPE_IP_OVER_FC = 122, - /** ATM traffic, encapsulated as per the scheme used by SunATM devices */ + /// ATM traffic, encapsulated as per the scheme used by SunATM devices LINKTYPE_SUNATM = 123, - /** Radiotap link-layer information followed by an 802.11 header */ + /// Radiotap link-layer information followed by an 802.11 header LINKTYPE_IEEE802_11_RADIOTAP = 127, - /** ARCNET Data Packets, as described by the ARCNET Trade Association standard ATA 878.1-1999 */ + /// ARCNET Data Packets, as described by the ARCNET Trade Association standard ATA 878.1-1999 LINKTYPE_ARCNET_LINUX = 129, - /** Apple IP-over-IEEE 1394 cooked header */ + /// Apple IP-over-IEEE 1394 cooked header LINKTYPE_APPLE_IP_OVER_IEEE1394 = 138, - /** Signaling System 7 Message Transfer Part Level 2 */ + /// Signaling System 7 Message Transfer Part Level 2 LINKTYPE_MTP2_WITH_PHDR = 139, - /** Signaling System 7 Message Transfer Part Level 2 */ + /// Signaling System 7 Message Transfer Part Level 2 LINKTYPE_MTP2 = 140, - /** Signaling System 7 Message Transfer Part Level 3 */ + /// Signaling System 7 Message Transfer Part Level 3 LINKTYPE_MTP3 = 141, - /** Signaling System 7 Signalling Connection Control Part */ + /// Signaling System 7 Signalling Connection Control Part LINKTYPE_SCCP = 142, - /** Signaling System 7 Signalling Connection Control Part */ + /// Signaling System 7 Signalling Connection Control Part LINKTYPE_DOCSIS = 143, - /** Linux-IrDA packets */ + /// Linux-IrDA packets LINKTYPE_LINUX_IRDA = 144, - /** Reserved for private use */ + /// Reserved for private use LINKTYPE_USER0 = 147, - /** Reserved for private use */ + /// Reserved for private use LINKTYPE_USER1 = 148, - /** Reserved for private use */ + /// Reserved for private use LINKTYPE_USER2 = 149, - /** Reserved for private use */ + /// Reserved for private use LINKTYPE_USER3 = 150, - /** Reserved for private use */ + /// Reserved for private use LINKTYPE_USER4 = 151, - /** Reserved for private use */ + /// Reserved for private use LINKTYPE_USER5 = 152, - /** Reserved for private use */ + /// Reserved for private use LINKTYPE_USER6 = 153, - /** Reserved for private use */ + /// Reserved for private use LINKTYPE_USER7 = 154, - /** Reserved for private use */ + /// Reserved for private use LINKTYPE_USER8 = 155, - /** Reserved for private use */ + /// Reserved for private use LINKTYPE_USER9 = 156, - /** Reserved for private use */ + /// Reserved for private use LINKTYPE_USER10 = 157, - /** Reserved for private use */ + /// Reserved for private use LINKTYPE_USER11 = 158, - /** Reserved for private use */ + /// Reserved for private use LINKTYPE_USER12 = 159, - /** Reserved for private use */ + /// Reserved for private use LINKTYPE_USER13 = 160, - /** Reserved for private use */ + /// Reserved for private use LINKTYPE_USER14 = 161, - /** Reserved for private use */ + /// Reserved for private use LINKTYPE_USER15 = 162, - /** AVS monitor mode information followed by an 802.11 header */ + /// AVS monitor mode information followed by an 802.11 header LINKTYPE_IEEE802_11_AVS = 163, - /** BACnet MS/TP frames */ + /// BACnet MS/TP frames LINKTYPE_BACNET_MS_TP = 165, - /** PPP in HDLC-like encapsulation, like LINKTYPE_PPP_HDLC, but with the 0xff address byte replaced by a - * direction indication - 0x00 for incoming and 0x01 for outgoing */ + /// PPP in HDLC-like encapsulation, like LINKTYPE_PPP_HDLC, but with the 0xff address byte replaced by a + /// direction indication - 0x00 for incoming and 0x01 for outgoing LINKTYPE_PPP_PPPD = 166, - /** General Packet Radio Service Logical Link Control */ + /// General Packet Radio Service Logical Link Control LINKTYPE_GPRS_LLC = 169, - /** Transparent-mapped generic framing procedure */ + /// Transparent-mapped generic framing procedure LINKTYPE_GPF_T = 170, - /** Frame-mapped generic framing procedure */ + /// Frame-mapped generic framing procedure LINKTYPE_GPF_F = 171, - /** Link Access Procedures on the D Channel (LAPD) frames */ + /// Link Access Procedures on the D Channel (LAPD) frames LINKTYPE_LINUX_LAPD = 177, - /** Bluetooth HCI UART transport layer */ + /// Bluetooth HCI UART transport layer LINKTYPE_BLUETOOTH_HCI_H4 = 187, - /** USB packets, beginning with a Linux USB header */ + /// USB packets, beginning with a Linux USB header LINKTYPE_USB_LINUX = 189, - /** Per-Packet Information information */ + /// Per-Packet Information information LINKTYPE_PPI = 192, - /** IEEE 802.15.4 wireless Personal Area Network */ + /// IEEE 802.15.4 wireless Personal Area Network LINKTYPE_IEEE802_15_4 = 195, - /** Various link-layer types, with a pseudo-header, for SITA */ + /// Various link-layer types, with a pseudo-header, for SITA LINKTYPE_SITA = 196, - /** Various link-layer types, with a pseudo-header, for Endace DAG cards; encapsulates Endace ERF record */ + /// Various link-layer types, with a pseudo-header, for Endace DAG cards; encapsulates Endace ERF record LINKTYPE_ERF = 197, - /** Bluetooth HCI UART transport layer */ + /// Bluetooth HCI UART transport layer LINKTYPE_BLUETOOTH_HCI_H4_WITH_PHDR = 201, - /** AX.25 packet, with a 1-byte KISS header containing a type indicator */ + /// AX.25 packet, with a 1-byte KISS header containing a type indicator LINKTYPE_AX25_KISS = 202, - /** Link Access Procedures on the D Channel (LAPD) frames */ + /// Link Access Procedures on the D Channel (LAPD) frames LINKTYPE_LAPD = 203, - /** PPP, as per RFC 1661 and RFC 1662, preceded with a one-byte pseudo-header with a zero value meaning - * "received by this host" and a non-zero value meaning "sent by this host" */ + /// PPP, as per RFC 1661 and RFC 1662, preceded with a one-byte pseudo-header with a zero value meaning + /// "received by this host" and a non-zero value meaning "sent by this host" LINKTYPE_PPP_WITH_DIR = 204, - /** Cisco PPP with HDLC framing */ + /// Cisco PPP with HDLC framing LINKTYPE_C_HDLC_WITH_DIR = 205, - /** Frame Relay */ + /// Frame Relay LINKTYPE_FRELAY_WITH_DIR = 206, - /** IPMB over an I2C circuit */ + /// IPMB over an I2C circuit LINKTYPE_IPMB_LINUX = 209, - /** IEEE 802.15.4 wireless Personal Area Network */ + /// IEEE 802.15.4 wireless Personal Area Network LINKTYPE_IEEE802_15_4_NONASK_PHY = 215, - /** USB packets, beginning with a Linux USB header */ + /// USB packets, beginning with a Linux USB header LINKTYPE_USB_LINUX_MMAPPED = 220, - /** Fibre Channel FC-2 frames, beginning with a Frame_Header */ + /// Fibre Channel FC-2 frames, beginning with a Frame_Header LINKTYPE_FC_2 = 224, - /** Fibre Channel FC-2 frames */ + /// Fibre Channel FC-2 frames LINKTYPE_FC_2_WITH_FRAME_DELIMS = 225, - /** Solaris ipnet pseudo-header */ + /// Solaris ipnet pseudo-header LINKTYPE_IPNET = 226, - /** CAN (Controller Area Network) frames, with a pseudo-header as supplied by Linux SocketCAN */ + /// CAN (Controller Area Network) frames, with a pseudo-header as supplied by Linux SocketCAN LINKTYPE_CAN_SOCKETCAN = 227, - /** Raw IPv4; the packet begins with an IPv4 header */ + /// Raw IPv4; the packet begins with an IPv4 header LINKTYPE_IPV4 = 228, - /** Raw IPv6; the packet begins with an IPv6 header */ + /// Raw IPv6; the packet begins with an IPv6 header LINKTYPE_IPV6 = 229, - /** IEEE 802.15.4 wireless Personal Area Network, without the FCS at the end of the frame */ + /// IEEE 802.15.4 wireless Personal Area Network, without the FCS at the end of the frame LINKTYPE_IEEE802_15_4_NOFCS = 230, - /** Raw D-Bus messages, starting with the endianness flag, followed by the message type, etc., but without the - * authentication handshake before the message sequence */ + /// Raw D-Bus messages, starting with the endianness flag, followed by the message type, etc., but without the + /// authentication handshake before the message sequence LINKTYPE_DBUS = 231, - /** DVB-CI (DVB Common Interface for communication between a PC Card module and a DVB receiver), with the - * message format specified by the PCAP format for DVB-CI specification */ + /// DVB-CI (DVB Common Interface for communication between a PC Card module and a DVB receiver), with the + /// message format specified by the PCAP format for DVB-CI specification LINKTYPE_DVB_CI = 235, - /** Variant of 3GPP TS 27.010 multiplexing protocol (similar to, but not the same as, 27.010) */ + /// Variant of 3GPP TS 27.010 multiplexing protocol (similar to, but not the same as, 27.010) LINKTYPE_MUX27010 = 236, - /** D_PDUs as described by NATO standard STANAG 5066, starting with the synchronization sequence, and including - * both header and data CRCs */ + /// D_PDUs as described by NATO standard STANAG 5066, starting with the synchronization sequence, and including + /// both header and data CRCs LINKTYPE_STANAG_5066_D_PDU = 237, - /** Linux netlink NETLINK NFLOG socket log messages */ + /// Linux netlink NETLINK NFLOG socket log messages LINKTYPE_NFLOG = 239, - /** Pseudo-header for Hilscher Gesellschaft für Systemautomation mbH netANALYZER devices, followed by an - * Ethernet frame, beginning with the MAC header and ending with the FCS */ + /// Pseudo-header for Hilscher Gesellschaft für Systemautomation mbH netANALYZER devices, followed by an + /// Ethernet frame, beginning with the MAC header and ending with the FCS LINKTYPE_NETANALYZER = 240, - /** Pseudo-header for Hilscher Gesellschaft für Systemautomation mbH netANALYZER devices, followed by an - * Ethernet frame, beginning with the preamble, SFD, and MAC header, and ending with the FCS */ + /// Pseudo-header for Hilscher Gesellschaft für Systemautomation mbH netANALYZER devices, followed by an + /// Ethernet frame, beginning with the preamble, SFD, and MAC header, and ending with the FCS LINKTYPE_NETANALYZER_TRANSPARENT = 241, - /** IP-over-InfiniBand, as specified by RFC 4391 section 6 */ + /// IP-over-InfiniBand, as specified by RFC 4391 section 6 LINKTYPE_IPOIB = 242, - /** MPEG-2 Transport Stream transport packets, as specified by ISO 13818-1/ITU-T Recommendation H.222.0 */ + /// MPEG-2 Transport Stream transport packets, as specified by ISO 13818-1/ITU-T Recommendation H.222.0 LINKTYPE_MPEG_2_TS = 243, - /** Pseudo-header for ng4T GmbH's UMTS Iub/Iur-over-ATM and Iub/Iur-over-IP format as used by their ng40 - * protocol tester */ + /// Pseudo-header for ng4T GmbH's UMTS Iub/Iur-over-ATM and Iub/Iur-over-IP format as used by their ng40 + /// protocol tester LINKTYPE_NG40 = 244, - /** Pseudo-header for NFC LLCP packet captures, followed by frame data for the LLCP Protocol as specified by - * NFCForum-TS-LLCP_1.1 */ + /// Pseudo-header for NFC LLCP packet captures, followed by frame data for the LLCP Protocol as specified by + /// NFCForum-TS-LLCP_1.1 LINKTYPE_NFC_LLCP = 245, - /** Raw InfiniBand frames, starting with the Local Routing Header */ + /// Raw InfiniBand frames, starting with the Local Routing Header LINKTYPE_INFINIBAND = 247, - /** SCTP packets, as defined by RFC 4960, with no lower-level protocols such as IPv4 or IPv6 */ + /// SCTP packets, as defined by RFC 4960, with no lower-level protocols such as IPv4 or IPv6 LINKTYPE_SCTP = 248, - /** USB packets, beginning with a USBPcap header */ + /// USB packets, beginning with a USBPcap header LINKTYPE_USBPCAP = 249, - /** Serial-line packet header for the Schweitzer Engineering Laboratories "RTAC" product */ + /// Serial-line packet header for the Schweitzer Engineering Laboratories "RTAC" product LINKTYPE_RTAC_SERIAL = 250, - /** Bluetooth Low Energy air interface Link Layer packets */ + /// Bluetooth Low Energy air interface Link Layer packets LINKTYPE_BLUETOOTH_LE_LL = 251, - /** Linux Netlink capture encapsulation */ + /// Linux Netlink capture encapsulation LINKTYPE_NETLINK = 253, - /** Bluetooth Linux Monitor encapsulation of traffic for the BlueZ stack */ + /// Bluetooth Linux Monitor encapsulation of traffic for the BlueZ stack LINKTYPE_BLUETOOTH_LINUX_MONITOR = 254, - /** Bluetooth Basic Rate and Enhanced Data Rate baseband packets */ + /// Bluetooth Basic Rate and Enhanced Data Rate baseband packets LINKTYPE_BLUETOOTH_BREDR_BB = 255, - /** Bluetooth Low Energy link-layer packets */ + /// Bluetooth Low Energy link-layer packets LINKTYPE_BLUETOOTH_LE_LL_WITH_PHDR = 256, - /** PROFIBUS data link layer packets, as specified by IEC standard 61158-6-3 */ + /// PROFIBUS data link layer packets, as specified by IEC standard 61158-6-3 LINKTYPE_PROFIBUS_DL = 257, - /** Apple PKTAP capture encapsulation */ + /// Apple PKTAP capture encapsulation LINKTYPE_PKTAP = 258, - /** Ethernet-over-passive-optical-network packets */ + /// Ethernet-over-passive-optical-network packets LINKTYPE_EPON = 259, - /** IPMI trace packets, as specified by Table 3-20 "Trace Data Block Format" in the PICMG HPM.2 specification */ + /// IPMI trace packets, as specified by Table 3-20 "Trace Data Block Format" in the PICMG HPM.2 specification LINKTYPE_IPMI_HPM_2 = 260, - /** Per Joshua Wright , formats for Z-Wave RF profiles R1 and R2 captures */ + /// Per Joshua Wright , formats for Z-Wave RF profiles R1 and R2 captures LINKTYPE_ZWAVE_R1_R2 = 261, - /** Per Joshua Wright , formats for Z-Wave RF profile R3 captures */ + /// Per Joshua Wright , formats for Z-Wave RF profile R3 captures LINKTYPE_ZWAVE_R3 = 262, - /** Formats for WattStopper Digital Lighting Management (DLM) and Legrand Nitoo Open protocol common packet - * structure captures */ + /// Formats for WattStopper Digital Lighting Management (DLM) and Legrand Nitoo Open protocol common packet + /// structure captures LINKTYPE_WATTSTOPPER_DLM = 263, - /** Messages between ISO 14443 contactless smartcards (Proximity Integrated Circuit Card, PICC) and card readers - * (Proximity Coupling Device, PCD), with the message format specified by the PCAP format for ISO14443 - * specification */ + /// Messages between ISO 14443 contactless smartcards (Proximity Integrated Circuit Card, PICC) and card readers + /// (Proximity Coupling Device, PCD), with the message format specified by the PCAP format for ISO14443 + /// specification LINKTYPE_ISO_14443 = 264, - /** Linux "cooked" capture encapsulation v2 */ + /// Linux "cooked" capture encapsulation v2 LINKTYPE_LINUX_SLL2 = 276, - /** Set if interface ID for a packet of a pcapng file is too high */ + /// Set if interface ID for a packet of a pcapng file is too high LINKTYPE_INVALID = 0xFFFF }; diff --git a/Packet++/header/S7CommLayer.h b/Packet++/header/S7CommLayer.h index e4fb24232d..757c1f619e 100644 --- a/Packet++/header/S7CommLayer.h +++ b/Packet++/header/S7CommLayer.h @@ -12,17 +12,17 @@ namespace pcpp #pragma pack(push, 1) typedef struct { - /** protocol id */ + /// protocol id uint8_t protocolId; - /** message type */ + /// message type uint8_t msgType; - /** redundancy identification (reserved) */ + /// redundancy identification (reserved) uint16_t reserved; - /** protocol data unit reference */ + /// protocol data unit reference uint16_t pduRef; - /** parameter length */ + /// parameter length uint16_t paramLength; - /** data length */ + /// data length uint16_t dataLength; } s7commhdr; #pragma pack(pop) @@ -32,9 +32,9 @@ namespace pcpp #pragma pack(push, 1) struct s7comm_ack_data_hdr : s7commhdr { - /** error class */ + /// error class uint8_t errorClass; - /** error code */ + /// error code uint8_t errorCode; }; #pragma pack(pop) diff --git a/Packet++/header/SSHLayer.h b/Packet++/header/SSHLayer.h index ca9bea90d5..aad10a7ed5 100644 --- a/Packet++/header/SSHLayer.h +++ b/Packet++/header/SSHLayer.h @@ -188,21 +188,21 @@ namespace pcpp /// An enum that represents SSH non-encrypted message types enum SSHHandshakeMessageType { - /** Key Exchange Init message */ + /// Key Exchange Init message SSH_MSG_KEX_INIT = 20, - /** New Keys message */ + /// New Keys message SSH_MSG_NEW_KEYS = 21, - /** Diffie-Hellman Key Exchange Init message */ + /// Diffie-Hellman Key Exchange Init message SSH_MSG_KEX_DH_INIT = 30, - /** message */ + /// message SSH_MSG_KEX_DH_REPLY = 31, - /** Diffie-Hellman Group Exchange Init message */ + /// Diffie-Hellman Group Exchange Init message SSH_MSG_KEX_DH_GEX_INIT = 32, - /** "Diffie-Hellman Group Exchange Reply message */ + /// "Diffie-Hellman Group Exchange Reply message SSH_MSG_KEX_DH_GEX_REPLY = 33, - /** Diffie-Hellman Group Exchange Request message */ + /// Diffie-Hellman Group Exchange Request message SSH_MSG_KEX_DH_GEX_REQUEST = 34, - /** Unknown message */ + /// Unknown message SSH_MSG_UNKNOWN = 999 }; diff --git a/Packet++/header/SSLCommon.h b/Packet++/header/SSLCommon.h index e6f620f172..40be073e0b 100644 --- a/Packet++/header/SSLCommon.h +++ b/Packet++/header/SSLCommon.h @@ -15,11 +15,11 @@ namespace pcpp #pragma pack(push, 1) struct ssl_tls_record_layer { - /** Message (record) type (one of ::SSLRecordType) */ + /// Message (record) type (one of ::SSLRecordType) uint8_t recordType; - /** Message (record) version (one of SSLVersion::SSLVersionEnum) */ + /// Message (record) version (one of SSLVersion::SSLVersionEnum) uint16_t recordVersion; - /** Message (record) length in bytes */ + /// Message (record) length in bytes uint16_t length; }; #pragma pack(pop) @@ -29,11 +29,11 @@ namespace pcpp #pragma pack(push, 1) struct ssl_tls_handshake_layer { - /** Type of the handshake message (one of ::SSLHandshakeType) */ + /// Type of the handshake message (one of ::SSLHandshakeType) uint8_t handshakeType; - /** Length of the message. Length is 3-Byte long, This is the MSB byte */ + /// Length of the message. Length is 3-Byte long, This is the MSB byte uint8_t length1; - /** Length of the message. Length is 3-Byte long, This is the 2 LSB bytes */ + /// Length of the message. Length is 3-Byte long, This is the 2 LSB bytes uint16_t length2; }; #pragma pack(pop) @@ -43,9 +43,9 @@ namespace pcpp #pragma pack(push, 1) struct ssl_tls_client_server_hello : ssl_tls_handshake_layer { - /** SSL/TLS handshake version (one of SSLVersion::SSLVersionEnum) */ + /// SSL/TLS handshake version (one of SSLVersion::SSLVersionEnum) uint16_t handshakeVersion; - /** 32-bytes random number */ + /// 32-bytes random number uint8_t random[32]; }; #pragma pack(pop) @@ -55,7 +55,7 @@ namespace pcpp #pragma pack(push, 1) struct ssl_tls_change_cipher_spec { - /** Unused byte */ + /// Unused byte uint8_t changeCipherSpec; }; #pragma pack(pop) @@ -65,9 +65,9 @@ namespace pcpp #pragma pack(push, 1) struct ssl_tls_alert { - /** Alert level (one of ::SSLAlertLevel) */ + /// Alert level (one of ::SSLAlertLevel) uint8_t alertLevel; - /** Alert description (one of ::SSLAlertDescription) */ + /// Alert description (one of ::SSLAlertDescription) uint8_t alertDescription; }; #pragma pack(pop) @@ -75,13 +75,13 @@ namespace pcpp /// SSL/TLS message types enum SSLRecordType { - /** Change-cipher-spec message */ + /// Change-cipher-spec message SSL_CHANGE_CIPHER_SPEC = 20, - /** SSL alert message */ + /// SSL alert message SSL_ALERT = 21, - /** SSL handshake message */ + /// SSL handshake message SSL_HANDSHAKE = 22, - /** SSL data message */ + /// SSL data message SSL_APPLICATION_DATA = 23 }; @@ -95,53 +95,53 @@ namespace pcpp /// SSL/TLS versions enum enum SSLVersionEnum { - /** SSL 2.0 */ + /// SSL 2.0 SSL2 = 0x0200, - /** SSL 3.0 */ + /// SSL 3.0 SSL3 = 0x0300, - /** TLS 1.0 */ + /// TLS 1.0 TLS1_0 = 0x0301, - /** TLS 1.1 */ + /// TLS 1.1 TLS1_1 = 0x0302, - /** TLS 1.2 */ + /// TLS 1.2 TLS1_2 = 0x0303, - /** TLS 1.3 */ + /// TLS 1.3 TLS1_3 = 0x0304, - /** TLS 1.3 (draft 14) */ + /// TLS 1.3 (draft 14) TLS1_3_D14 = 0x7f0e, - /** TLS 1.3 (draft 15) */ + /// TLS 1.3 (draft 15) TLS1_3_D15 = 0x7f0f, - /** TLS 1.3 (draft 16) */ + /// TLS 1.3 (draft 16) TLS1_3_D16 = 0x7f10, - /** TLS 1.3 (draft 17) */ + /// TLS 1.3 (draft 17) TLS1_3_D17 = 0x7f11, - /** TLS 1.3 (draft 18) */ + /// TLS 1.3 (draft 18) TLS1_3_D18 = 0x7f12, - /** TLS 1.3 (draft 19) */ + /// TLS 1.3 (draft 19) TLS1_3_D19 = 0x7f13, - /** TLS 1.3 (draft 20) */ + /// TLS 1.3 (draft 20) TLS1_3_D20 = 0x7f14, - /** TLS 1.3 (draft 21) */ + /// TLS 1.3 (draft 21) TLS1_3_D21 = 0x7f15, - /** TLS 1.3 (draft 22) */ + /// TLS 1.3 (draft 22) TLS1_3_D22 = 0x7f16, - /** TLS 1.3 (draft 23) */ + /// TLS 1.3 (draft 23) TLS1_3_D23 = 0x7f17, - /** TLS 1.3 (draft 24) */ + /// TLS 1.3 (draft 24) TLS1_3_D24 = 0x7f18, - /** TLS 1.3 (draft 25) */ + /// TLS 1.3 (draft 25) TLS1_3_D25 = 0x7f19, - /** TLS 1.3 (draft 26) */ + /// TLS 1.3 (draft 26) TLS1_3_D26 = 0x7f1a, - /** TLS 1.3 (draft 27) */ + /// TLS 1.3 (draft 27) TLS1_3_D27 = 0x7f1b, - /** TLS 1.3 (draft 28) */ + /// TLS 1.3 (draft 28) TLS1_3_D28 = 0x7f1c, - /** TLS 1.3 (Facebook draft 23) */ + /// TLS 1.3 (Facebook draft 23) TLS1_3_FBD23 = 0xfb17, - /** TLS 1.3 (Facebook draft 26) */ + /// TLS 1.3 (Facebook draft 26) TLS1_3_FBD26 = 0xfb1a, - /** Unknown value */ + /// Unknown value Unknown = 0 }; @@ -183,379 +183,379 @@ namespace pcpp /// SSL/TLS handshake message types enum SSLHandshakeType { - /** Hello-request message type */ + /// Hello-request message type SSL_HELLO_REQUEST = 0, - /** Client-hello message type */ + /// Client-hello message type SSL_CLIENT_HELLO = 1, - /** Server-hello message type */ + /// Server-hello message type SSL_SERVER_HELLO = 2, - /** New-session-ticket message type */ + /// New-session-ticket message type SSL_NEW_SESSION_TICKET = 4, - /** End-of-early-data message type (TLS 1.3) */ + /// End-of-early-data message type (TLS 1.3) SSL_END_OF_EARLY_DATE = 5, - /** Encrypted-extensions message type (TLS 1.3) */ + /// Encrypted-extensions message type (TLS 1.3) SSL_ENCRYPTED_EXTENSIONS = 8, - /** Certificate message type */ + /// Certificate message type SSL_CERTIFICATE = 11, - /** Server-key-exchange message type */ + /// Server-key-exchange message type SSL_SERVER_KEY_EXCHANGE = 12, - /** Certificate-request message type */ + /// Certificate-request message type SSL_CERTIFICATE_REQUEST = 13, - /** Server-hello-done message type */ + /// Server-hello-done message type SSL_SERVER_DONE = 14, - /** Certificate-verify message type */ + /// Certificate-verify message type SSL_CERTIFICATE_VERIFY = 15, - /** Client-key-exchange message type */ + /// Client-key-exchange message type SSL_CLIENT_KEY_EXCHANGE = 16, - /** Finish message type */ + /// Finish message type SSL_FINISHED = 20, - /** Key-update message type (TLS 1.3) */ + /// Key-update message type (TLS 1.3) SSL_KEY_UPDATE = 24, - /** Unknown SSL handshake message */ + /// Unknown SSL handshake message SSL_HANDSHAKE_UNKNOWN = 255 }; /// SSL/TLS alert levels enum SSLAlertLevel { - /** Warning level alert */ + /// Warning level alert SSL_ALERT_LEVEL_WARNING = 1, - /** Fatal level alert */ + /// Fatal level alert SSL_ALERT_LEVEL_FATAL = 2, - /** For encrypted alerts the level is unknown so this type will be returned */ + /// For encrypted alerts the level is unknown so this type will be returned SSL_ALERT_LEVEL_ENCRYPTED = 255 }; /// SSL/TLS alert description types enum SSLAlertDescription { - /** Close notify alert */ + /// Close notify alert SSL_ALERT_CLOSE_NOTIFY = 0, - /** Unexpected message alert */ + /// Unexpected message alert SSL_ALERT_UNEXPECTED_MESSAGE = 10, - /** Bad record MAC alert */ + /// Bad record MAC alert SSL_ALERT_BAD_RECORD_MAC = 20, - /** Decryption failed alert */ + /// Decryption failed alert SSL_ALERT_DECRYPTION_FAILED = 21, - /** */ + /// SSL_ALERT_RECORD_OVERFLOW = 22, - /** Decompression failure alert */ + /// Decompression failure alert SSL_ALERT_DECOMPRESSION_FAILURE = 30, - /** Handshake failure alert */ + /// Handshake failure alert SSL_ALERT_HANDSHAKE_FAILURE = 40, - /** No certificate alert */ + /// No certificate alert SSL_ALERT_NO_CERTIFICATE = 41, - /** Bad certificate alert */ + /// Bad certificate alert SSL_ALERT_BAD_CERTIFICATE = 42, - /** Unsupported certificate */ + /// Unsupported certificate SSL_ALERT_UNSUPPORTED_CERTIFICATE = 43, - /** Certificate revoked alert */ + /// Certificate revoked alert SSL_ALERT_CERTIFICATE_REVOKED = 44, - /** Certificate expired alert */ + /// Certificate expired alert SSL_ALERT_CERTIFICATE_EXPIRED = 45, - /** Certificate unknown alert */ + /// Certificate unknown alert SSL_ALERT_CERTIFICATE_UNKNOWN = 46, - /** Illegal parameter alert */ + /// Illegal parameter alert SSL_ALERT_ILLEGAL_PARAMETER = 47, - /** Unknown CA alert */ + /// Unknown CA alert SSL_ALERT_UNKNOWN_CA = 48, - /** Access denied alert */ + /// Access denied alert SSL_ALERT_ACCESS_DENIED = 49, - /** Decode error alert */ + /// Decode error alert SSL_ALERT_DECODE_ERROR = 50, - /** Decrypt error alert */ + /// Decrypt error alert SSL_ALERT_DECRYPT_ERROR = 51, - /** Export restriction alert */ + /// Export restriction alert SSL_ALERT_EXPORT_RESTRICTION = 60, - /** Protocol version alert */ + /// Protocol version alert SSL_ALERT_PROTOCOL_VERSION = 70, - /** Insufficient security alert */ + /// Insufficient security alert SSL_ALERT_INSUFFICIENT_SECURITY = 71, - /** Internal error alert */ + /// Internal error alert SSL_ALERT_INTERNAL_ERROR = 80, - /** User cancelled alert */ + /// User cancelled alert SSL_ALERT_USER_CANCELLED = 90, - /** No negotiation alert */ + /// No negotiation alert SSL_ALERT_NO_RENEGOTIATION = 100, - /** Unsupported extension alert */ + /// Unsupported extension alert SSL_ALERT_UNSUPPORTED_EXTENSION = 110, - /** Encrtpyed alert (cannot determine its type) */ + /// Encrtpyed alert (cannot determine its type) SSL_ALERT_ENCRYPTED = 255 }; /// SSL/TLS key exchange algorithms enum SSLKeyExchangeAlgorithm { - /** Null value */ + /// Null value SSL_KEYX_NULL, - /** RSA (Rivest-Shamir-Adleman) */ + /// RSA (Rivest-Shamir-Adleman) SSL_KEYX_RSA, - /** Diffie-Hellman */ + /// Diffie-Hellman SSL_KEYX_DH, - /** Diffie-Hellman ephemeral */ + /// Diffie-Hellman ephemeral SSL_KEYX_DHE, - /** Elliptic curve Diffie�Hellman */ + /// Elliptic curve Diffie�Hellman SSL_KEYX_ECDH, - /** Elliptic curve Diffie�Hellman ephemeral */ + /// Elliptic curve Diffie�Hellman ephemeral SSL_KEYX_ECDHE, - /** Fortezza Crypto Card */ + /// Fortezza Crypto Card SSL_KEYX_FORTEZZA, - /** Kerberos 5 */ + /// Kerberos 5 SSL_KEYX_KRB5, - /** Pre-Shared Key */ + /// Pre-Shared Key SSL_KEYX_PSK, - /** GOST */ + /// GOST SSL_KEYX_GOST, - /** Secure Remote Password */ + /// Secure Remote Password SSL_KEYX_SRP, - /** PCT */ + /// PCT SSL_KEYX_PCT, - /** Unknown algorithm */ + /// Unknown algorithm SSL_KEYX_Unknown }; /// SSL/TLS authentication algorithms enum SSLAuthenticationAlgorithm { - /** Null value */ + /// Null value SSL_AUTH_NULL, - /** RSA (Rivest-Shamir-Adleman) */ + /// RSA (Rivest-Shamir-Adleman) SSL_AUTH_RSA, - /** Digital Signature Standard */ + /// Digital Signature Standard SSL_AUTH_DSS, - /** Anonymous */ + /// Anonymous SSL_AUTH_anon, - /** Diffie-Hellman based key-exchange protocol */ + /// Diffie-Hellman based key-exchange protocol SSL_AUTH_KEA, - /** Kerberos 5 */ + /// Kerberos 5 SSL_AUTH_KRB5, - /** Pre-Shared Key */ + /// Pre-Shared Key SSL_AUTH_PSK, - /** Elliptic Curve Digital Signature Algorithm */ + /// Elliptic Curve Digital Signature Algorithm SSL_AUTH_ECDSA, - /** GOST */ + /// GOST SSL_AUTH_GOST, - /** SHA-1 (Secure Hash Algorithm) */ + /// SHA-1 (Secure Hash Algorithm) SSL_AUTH_SHA, - /** PCT */ + /// PCT SSL_AUTH_PCT, - /** Diffie-Hellman ephemeral */ + /// Diffie-Hellman ephemeral SSL_AUTH_DHE, - /** Unknown algorithm */ + /// Unknown algorithm SSL_AUTH_Unknown }; /// SSL/TLS symmetric encryption algorithms enum SSLSymetricEncryptionAlgorithm { - /** Null value */ + /// Null value SSL_SYM_NULL, - /** RC4_40 */ + /// RC4_40 SSL_SYM_RC4_40, - /** RC4_128 */ + /// RC4_128 SSL_SYM_RC4_128, - /** RC2_CBC_40 */ + /// RC2_CBC_40 SSL_SYM_RC2_CBC_40, - /** IDEA_CBC */ + /// IDEA_CBC SSL_SYM_IDEA_CBC, - /** DES40_CBC */ + /// DES40_CBC SSL_SYM_DES40_CBC, - /** DES_CBC */ + /// DES_CBC SSL_SYM_DES_CBC, - /** 3DES_EDE_CBC */ + /// 3DES_EDE_CBC SSL_SYM_3DES_EDE_CBC, - /** FORTEZZA_CBC */ + /// FORTEZZA_CBC SSL_SYM_FORTEZZA_CBC, - /** DES_CBC_40 */ + /// DES_CBC_40 SSL_SYM_DES_CBC_40, - /** AES_128_CBC */ + /// AES_128_CBC SSL_SYM_AES_128_CBC, - /** AES_256_CBC */ + /// AES_256_CBC SSL_SYM_AES_256_CBC, - /** CAMELLIA_128_CBC */ + /// CAMELLIA_128_CBC SSL_SYM_CAMELLIA_128_CBC, - /** CAMELLIA_128_GCM */ + /// CAMELLIA_128_GCM SSL_SYM_CAMELLIA_128_GCM, - /** CAMELLIA_256_GCM */ + /// CAMELLIA_256_GCM SSL_SYM_CAMELLIA_256_GCM, - /** RC4_56 */ + /// RC4_56 SSL_SYM_RC4_56, - /** RC2_CBC_56 */ + /// RC2_CBC_56 SSL_SYM_RC2_CBC_56, - /** GOST28147 */ + /// GOST28147 SSL_SYM_GOST28147, - /** CAMELLIA_256_CBC */ + /// CAMELLIA_256_CBC SSL_SYM_CAMELLIA_256_CBC, - /** SEED_CBC */ + /// SEED_CBC SSL_SYM_SEED_CBC, - /** AES_128 */ + /// AES_128 SSL_SYM_AES_128, - /** AES_256 */ + /// AES_256 SSL_SYM_AES_256, - /** SSL_SYM_AES_128_GCM */ + /// SSL_SYM_AES_128_GCM SSL_SYM_AES_128_GCM, - /** AES_256_GCM */ + /// AES_256_GCM SSL_SYM_AES_256_GCM, - /** RC4_128_EXPORT40 */ + /// RC4_128_EXPORT40 SSL_SYM_RC4_128_EXPORT40, - /** RC2_CBC_128_CBC */ + /// RC2_CBC_128_CBC SSL_SYM_RC2_CBC_128_CBC, - /** IDEA_128_CBC */ + /// IDEA_128_CBC SSL_SYM_IDEA_128_CBC, - /** DES_64_CBC */ + /// DES_64_CBC SSL_SYM_DES_64_CBC, - /** DES_192_EDE3_CBC */ + /// DES_192_EDE3_CBC SSL_SYM_DES_192_EDE3_CBC, - /** RC4_64 */ + /// RC4_64 SSL_SYM_RC4_64, - /** ARIA_128_CBC*/ + /// ARIA_128_CBC SSL_SYM_ARIA_128_CBC, - /** ARIA_256_CBC */ + /// ARIA_256_CBC SSL_SYM_ARIA_256_CBC, - /** ARIA_128_GCM */ + /// ARIA_128_GCM SSL_SYM_ARIA_128_GCM, - /** ARIA_256_GCM */ + /// ARIA_256_GCM SSL_SYM_ARIA_256_GCM, - /** CHACHA20_POLY1305 */ + /// CHACHA20_POLY1305 SSL_SYM_CHACHA20_POLY1305, - /** AES_128_CCM */ + /// AES_128_CCM SSL_SYM_AES_128_CCM, - /** AES_128_CCM_8 */ + /// AES_128_CCM_8 SSL_SYM_AES_128_CCM_8, - /** Unknown algorithm */ + /// Unknown algorithm SSL_SYM_Unknown }; /// SSL/TLS hashing algorithms enum SSLHashingAlgorithm { - /** Null value */ + /// Null value SSL_HASH_NULL, - /** Message-Digest Algorithm */ + /// Message-Digest Algorithm SSL_HASH_MD5, - /** SHA-1 (Secure Hash Algorithm) */ + /// SHA-1 (Secure Hash Algorithm) SSL_HASH_SHA, - /** SHA-256 (Secure Hash Algorithm) */ + /// SHA-256 (Secure Hash Algorithm) SSL_HASH_SHA256, - /** GOST 28147 */ + /// GOST 28147 SSL_HASH_GOST28147, - /** GOST R 34.11 */ + /// GOST R 34.11 SSL_HASH_GOSTR3411, - /** SHA-384 (Secure Hash Algorithm) */ + /// SHA-384 (Secure Hash Algorithm) SSL_HASH_SHA384, - /** CCM mode (Counter with CBC-MAC) */ + /// CCM mode (Counter with CBC-MAC) SSL_HASH_CCM, - /** CCM mode (Counter with CBC-MAC) */ + /// CCM mode (Counter with CBC-MAC) SSL_HASH_CCM_8, - /** Unknown algorithm */ + /// Unknown algorithm SSL_HASH_Unknown }; /// SSL/TLS extension types enum SSLExtensionType { - /** Server Name Indication extension */ + /// Server Name Indication extension SSL_EXT_SERVER_NAME = 0, - /** Maximum Fragment Length Negotiation extension */ + /// Maximum Fragment Length Negotiation extension SSL_EXT_MAX_FRAGMENT_LENGTH = 1, - /** Client Certificate URLs extension */ + /// Client Certificate URLs extension SSL_EXT_CLIENT_CERTIFICATE_URL = 2, - /** Trusted CA Indication extension */ + /// Trusted CA Indication extension SSL_EXT_TRUSTED_CA_KEYS = 3, - /** Truncated HMAC extension */ + /// Truncated HMAC extension SSL_EXT_TRUNCATED_HMAC = 4, - /** Certificate Status Request extension */ + /// Certificate Status Request extension SSL_EXT_STATUS_REQUEST = 5, - /** TLS User Mapping extension */ + /// TLS User Mapping extension SSL_EXT_USER_MAPPING = 6, - /** Client Authorization extension */ + /// Client Authorization extension SSL_EXT_CLIENT_AUTHZ = 7, - /** Server Authorization extension */ + /// Server Authorization extension SSL_EXT_SERVER_AUTHZ = 8, - /** Certificate Type extension */ + /// Certificate Type extension SSL_EXT_CERT_TYPE = 9, - /** Supported Groups extension (renamed from "elliptic curves") */ + /// Supported Groups extension (renamed from "elliptic curves") SSL_EXT_SUPPORTED_GROUPS = 10, - /** Elliptic Curves Point Format extension */ + /// Elliptic Curves Point Format extension SSL_EXT_EC_POINT_FORMATS = 11, - /** Secure Remote Password extension */ + /// Secure Remote Password extension SSL_EXT_SRP = 12, - /** Signature Algorithms extension */ + /// Signature Algorithms extension SSL_EXT_SIGNATURE_ALGORITHMS = 13, - /** Use Secure Real-time Transport Protocol extension */ + /// Use Secure Real-time Transport Protocol extension SSL_EXT_USE_SRTP = 14, - /** TLS Heartbit extension */ + /// TLS Heartbit extension SSL_EXT_HEARTBEAT = 15, - /** Application Layer Protocol Negotiation (ALPN) extension */ + /// Application Layer Protocol Negotiation (ALPN) extension SSL_EXT_APPLICATION_LAYER_PROTOCOL_NEGOTIATION = 16, - /** Status Request extension */ + /// Status Request extension SSL_EXT_STATUS_REQUEST_V2 = 17, - /** Signed Certificate Timestamp extension */ + /// Signed Certificate Timestamp extension SSL_EXT_SIGNED_CERTIFICATE_TIMESTAMP = 18, - /** Client Certificate Type extension */ + /// Client Certificate Type extension SSL_EXT_CLIENT_CERTIFICATE_TYPE = 19, - /** Server Certificate Type extension */ + /// Server Certificate Type extension SSL_EXT_SERVER_CERTIFICATE_TYPE = 20, - /** ClientHello Padding extension */ + /// ClientHello Padding extension SSL_EXT_PADDING = 21, - /** Encrypt-then-MAC extension */ + /// Encrypt-then-MAC extension SSL_EXT_ENCRYPT_THEN_MAC = 22, - /** Extended Master Secret extension */ + /// Extended Master Secret extension SSL_EXT_EXTENDED_MASTER_SECRET = 23, - /** Token Binding extension */ + /// Token Binding extension SSL_EXT_TOKEN_BINDING = 24, - /** SessionTicket TLS extension */ + /// SessionTicket TLS extension SSL_EXT_SESSIONTICKET_TLS = 35, - /** Pre-shared key (PSK) extension (TLS 1.3) */ + /// Pre-shared key (PSK) extension (TLS 1.3) SSL_EXT_PRE_SHARED_KEY = 41, - /** Early data extension (TLS 1.3) */ + /// Early data extension (TLS 1.3) SSL_EXT_EARLY_DATA = 42, - /** Supported versions extension (TLS 1.3) */ + /// Supported versions extension (TLS 1.3) SSL_EXT_SUPPORTED_VERSIONS = 43, - /** Cookie extension (TLS 1.3) */ + /// Cookie extension (TLS 1.3) SSL_EXT_COOKIE = 44, - /** Pre-Shared Key Exchange Modes extension (TLS 1.3) */ + /// Pre-Shared Key Exchange Modes extension (TLS 1.3) SSL_EXT_PSK_KEY_EXCHANGE_MODES = 45, - /** Certificate authorities extension (TLS 1.3) */ + /// Certificate authorities extension (TLS 1.3) SSL_EXT_CERTIFICATE_AUTHORITIES = 47, - /** Old filters extension (TLS 1.3) */ + /// Old filters extension (TLS 1.3) SSL_EXT_OLD_FILTERS = 48, - /** Post handshake auth extension (TLS 1.3) */ + /// Post handshake auth extension (TLS 1.3) SSL_EXT_POST_HANDSHAKE_AUTH = 49, - /** Signature algorithm cert extension (TLS 1.3) */ + /// Signature algorithm cert extension (TLS 1.3) SSL_EXT_SIGNATURE_ALGORITHM_CERT = 50, - /** Key share extension (TLS 1.3) */ + /// Key share extension (TLS 1.3) SSL_EXT_KEY_SHARE = 51, - /** Renegotiation Indication extension */ + /// Renegotiation Indication extension SSL_EXT_RENEGOTIATION_INFO = 65281, - /** Unknown extension */ + /// Unknown extension SSL_EXT_Unknown }; /// SSL/TLS client certificate types enum SSLClientCertificateType { - /** RSA_SIGN */ + /// RSA_SIGN SSL_CCT_RSA_SIGN = 1, - /** DSS_SIGN */ + /// DSS_SIGN SSL_CCT_DSS_SIGN = 2, - /** RSA_FIXED_DH */ + /// RSA_FIXED_DH SSL_CCT_RSA_FIXED_DH = 3, - /** DSS_FIXED_DH */ + /// DSS_FIXED_DH SSL_CCT_DSS_FIXED_DH = 4, - /** RSA_EPHEMERAL_DH_RESERVED */ + /// RSA_EPHEMERAL_DH_RESERVED SSL_CCT_RSA_EPHEMERAL_DH_RESERVED = 5, - /** DSS_EPHEMERAL_DH_RESERVED */ + /// DSS_EPHEMERAL_DH_RESERVED SSL_CCT_DSS_EPHEMERAL_DH_RESERVED = 6, - /** FORTEZZA_DMS_RESERVED */ + /// FORTEZZA_DMS_RESERVED SSL_CCT_FORTEZZA_DMS_RESERVED = 20, - /** ECDSA_SIGN */ + /// ECDSA_SIGN SSL_CCT_ECDSA_SIGN = 64, - /** FIXED_ECDH */ + /// FIXED_ECDH SSL_CCT_RSA_FIXED_ECDH = 65, - /** ECDSA_FIXED_ECDH */ + /// ECDSA_FIXED_ECDH SSL_CCT_ECDSA_FIXED_ECDH = 66, - /** Unknown client certificate type */ + /// Unknown client certificate type SSL_CCT_UNKNOWN }; } // namespace pcpp diff --git a/Packet++/header/SSLHandshake.h b/Packet++/header/SSLHandshake.h index 549d3ef850..04b31dec04 100644 --- a/Packet++/header/SSLHandshake.h +++ b/Packet++/header/SSLHandshake.h @@ -122,11 +122,11 @@ namespace pcpp /// Represents the common fields of the extension struct SSLExtensionStruct { - /** Extension type */ + /// Extension type uint16_t extensionType; - /** Extension length */ + /// Extension length uint16_t extensionDataLength; - /** Extension data as raw (byte array) */ + /// Extension data as raw (byte array) uint8_t extensionData[]; }; @@ -312,15 +312,15 @@ namespace pcpp /// This struct contains methods to extract the TLS fingerprint itself: toString() and toMD5() struct ClientHelloTLSFingerprint { - /** TLS version */ + /// TLS version uint16_t tlsVersion; - /** A list of Cipher Suite IDs */ + /// A list of Cipher Suite IDs std::vector cipherSuites; - /** A list of extension IDs */ + /// A list of extension IDs std::vector extensions; - /** A list of Suppotred Groups taken from the "supported groups" TLS extension (if exist in the message) */ + /// A list of Suppotred Groups taken from the "supported groups" TLS extension (if exist in the message) std::vector supportedGroups; - /** A list of EC point formats taken from the "EC point formats" TLS extension (if exist in the message) */ + /// A list of EC point formats taken from the "EC point formats" TLS extension (if exist in the message) std::vector ecPointFormats; /// @return A string representing the TLS fingerprint, for example: @@ -456,11 +456,11 @@ namespace pcpp /// This struct contains methods to extract the TLS fingerprint itself: toString() and toMD5() struct ServerHelloTLSFingerprint { - /** TLS version */ + /// TLS version uint16_t tlsVersion; - /** Cipher Suite ID */ + /// Cipher Suite ID uint16_t cipherSuite; - /** A list of extension IDs */ + /// A list of extension IDs std::vector extensions; /// @return A string representing the TLS fingerprint, for example: 771,49195,65281-16-11 diff --git a/Packet++/header/SdpLayer.h b/Packet++/header/SdpLayer.h index 8b9101b627..3e83a09c38 100644 --- a/Packet++/header/SdpLayer.h +++ b/Packet++/header/SdpLayer.h @@ -11,35 +11,35 @@ namespace pcpp { -/** Protocol version (v) */ +/// Protocol version (v) #define PCPP_SDP_PROTOCOL_VERSION_FIELD "v" -/** Originator and session identifier (o) */ +/// Originator and session identifier (o) #define PCPP_SDP_ORIGINATOR_FIELD "o" -/** Session name (s) */ +/// Session name (s) #define PCPP_SDP_SESSION_NAME_FIELD "s" -/** Session title, media title or short information (i) */ +/// Session title, media title or short information (i) #define PCPP_SDP_INFO_FIELD "i" -/** URI of description (u) */ +/// URI of description (u) #define PCPP_SDP_URI_FIELD "u" -/** Email address with optional name of contacts (e) */ +/// Email address with optional name of contacts (e) #define PCPP_SDP_EMAIL_FIELD "e" -/** Phone number with optional name of contacts (p) */ +/// Phone number with optional name of contacts (p) #define PCPP_SDP_PHONE_FIELD "p" -/** Connection information (c) */ +/// Connection information (c) #define PCPP_SDP_CONNECTION_INFO_FIELD "c" -/** Bandwidth information (b) */ +/// Bandwidth information (b) #define PCPP_SDP_BANDWIDTH_FIELD "b" -/** Time the session is active (t) */ +/// Time the session is active (t) #define PCPP_SDP_TIME_FIELD "t" -/** Repeat times (r) */ +/// Repeat times (r) #define PCPP_SDP_REPEAT_TIMES_FIELD "r" -/** Time zone adjustments (z) */ +/// Time zone adjustments (z) #define PCPP_SDP_TIME_ZONE_FIELD "z" -/** Encryption key (k) */ +/// Encryption key (k) #define PCPP_SDP_ENCRYPTION_KEY_FIELD "k" -/** Media attribute (a) */ +/// Media attribute (a) #define PCPP_SDP_MEDIA_ATTRIBUTE_FIELD "a" -/** Media name and transport address (m) */ +/// Media name and transport address (m) #define PCPP_SDP_MEDIA_NAME_FIELD "m" /// @class SdpLayer @@ -104,19 +104,19 @@ namespace pcpp } /// The 'originator' field (o=) contains the IP address of the the machine from which the session is created. - /// This IP address can be used to track the RTP data relevant for the call. This method extracts this IP address - /// from the 'originator' field and returns it. A value of IPv4Address#Zero will be returned in the following - /// cases: (1) if 'originator' field doesn't exist; (2) if it doesn't contain the IP address; (3) if it contains - /// a non-IPv4 address + /// This IP address can be used to track the RTP data relevant for the call. This method extracts this IP + /// address from the 'originator' field and returns it. A value of IPv4Address#Zero will be returned in the + /// following cases: (1) if 'originator' field doesn't exist; (2) if it doesn't contain the IP address; (3) if + /// it contains a non-IPv4 address /// @return The IP address of the the machine from which the session is created IPv4Address getOwnerIPv4Address() const; /// The 'media-description' field (m=) contains the transport port to which the media stream is sent. This port /// can be used to track the RTP data relevant for the call. This method extracts this port from the - /// 'media-description' field and returns it. Since a SDP message can contain several 'media-description' fields, - /// one for each media type (e.g audio, image, etc.), the user is required to provide the media type. A value of - /// 0 will be returned in the following cases: (1) if 'media-description' field doesn't exist; (2) if provided - /// media type was not found; (3) if 'media-description' field didn't contain a port + /// 'media-description' field and returns it. Since a SDP message can contain several 'media-description' + /// fields, one for each media type (e.g audio, image, etc.), the user is required to provide the media type. A + /// value of 0 will be returned in the following cases: (1) if 'media-description' field doesn't exist; (2) if + /// provided media type was not found; (3) if 'media-description' field didn't contain a port /// @param[in] mediaType The media type to search in /// @return The transport port to which the media stream is sent uint16_t getMediaPort(const std::string& mediaType) const; diff --git a/Packet++/header/SipLayer.h b/Packet++/header/SipLayer.h index f90daad009..bd25e4cd83 100644 --- a/Packet++/header/SipLayer.h +++ b/Packet++/header/SipLayer.h @@ -10,57 +10,57 @@ namespace pcpp { // some popular SIP header fields -/** From field */ +/// From field #define PCPP_SIP_FROM_FIELD "From" -/** To field */ +/// To field #define PCPP_SIP_TO_FIELD "To" -/** Via field */ +/// Via field #define PCPP_SIP_VIA_FIELD "Via" -/** Call-ID field */ +/// Call-ID field #define PCPP_SIP_CALL_ID_FIELD "Call-ID" -/** Content-Type field */ +/// Content-Type field #define PCPP_SIP_CONTENT_TYPE_FIELD "Content-Type" -/** Content-Length field */ +/// Content-Length field #define PCPP_SIP_CONTENT_LENGTH_FIELD "Content-Length" -/** Content-Disposition field */ +/// Content-Disposition field #define PCPP_SIP_CONTENT_DISPOSITION_FIELD "Content-Disposition" -/** Content-Encoding field */ +/// Content-Encoding field #define PCPP_SIP_CONTENT_ENCODING_FIELD "Content-Encoding" -/** Content-Language field */ +/// Content-Language field #define PCPP_SIP_CONTENT_LANGUAGE_FIELD "Content-Language" -/** CSeq field */ +/// CSeq field #define PCPP_SIP_CSEQ_FIELD "CSeq" -/** Contact field */ +/// Contact field #define PCPP_SIP_CONTACT_FIELD "Contact" -/** Max-Forwards field */ +/// Max-Forwards field #define PCPP_SIP_MAX_FORWARDS_FIELD "Max-Forwards" -/** User-Agent field */ +/// User-Agent field #define PCPP_SIP_USER_AGENT_FIELD "User-Agent" -/** Accept field */ +/// Accept field #define PCPP_SIP_ACCEPT_FIELD "Accept" -/** Accept-Encoding field */ +/// Accept-Encoding field #define PCPP_SIP_ACCEPT_ENCODING_FIELD "Accept-Encoding" -/** Accept-Language field */ +/// Accept-Language field #define PCPP_SIP_ACCEPT_LANGUAGE_FIELD "Accept-Language" -/** Allow field */ +/// Allow field #define PCPP_SIP_ALLOW_FIELD "Allow" -/** Authorization field */ +/// Authorization field #define PCPP_SIP_AUTHORIZATION_FIELD "Authorization" -/** Date field */ +/// Date field #define PCPP_SIP_DATE_FIELD "Date" -/** MIME-Version field */ +/// MIME-Version field #define PCPP_SIP_MIME_VERSION_FIELD "MIME-Version" -/** Reason field */ +/// Reason field #define PCPP_SIP_REASON_FIELD "Reason" -/** Supported field */ +/// Supported field #define PCPP_SIP_SUPPORTED_FIELD "Supported" -/** Server field */ +/// Server field #define PCPP_SIP_SERVER_FIELD "Server" -/** WWW-Authenticate fild */ +/// WWW-Authenticate fild #define PCPP_SIP_WWW_AUTHENTICATE_FIELD "WWW-Authenticate" -/** Retry-After field */ +/// Retry-After field #define PCPP_SIP_RETRY_AFTER_FIELD "Retry-After" -/** Record-Route field */ +/// Record-Route field #define PCPP_SIP_RECORD_ROUTE_FIELD "Record-Route" /// @class SipLayer @@ -156,35 +156,35 @@ namespace pcpp /// SIP request methods enum SipMethod { - /** INVITE */ + /// INVITE SipINVITE, - /** ACK */ + /// ACK SipACK, - /** BYE */ + /// BYE SipBYE, - /** CANCEL */ + /// CANCEL SipCANCEL, - /** REFISTER */ + /// REFISTER SipREGISTER, - /** PRACK */ + /// PRACK SipPRACK, - /** OPTIONS */ + /// OPTIONS SipOPTIONS, - /** SUBSCRIBE */ + /// SUBSCRIBE SipSUBSCRIBE, - /** NOTIFY */ + /// NOTIFY SipNOTIFY, - /** PUBLISH */ + /// PUBLISH SipPUBLISH, - /** INFO */ + /// INFO SipINFO, - /** REFER */ + /// REFER SipREFER, - /** MESSAGE */ + /// MESSAGE SipMESSAGE, - /** UPDATE */ + /// UPDATE SipUPDATE, - /** Unknown SIP method */ + /// Unknown SIP method SipMethodUnknown }; @@ -246,198 +246,197 @@ namespace pcpp /// https://en.wikipedia.org/wiki/List_of_SIP_response_codes enum SipResponseStatusCode { - /** Extended search being performed may take a significant time so a forking proxy must send a 100 Trying - * response */ + /// Extended search being performed may take a significant time so a forking proxy must send a 100 Trying + /// response Sip100Trying, - /** Destination user agent received INVITE, and is alerting user of call */ + /// Destination user agent received INVITE, and is alerting user of call Sip180Ringing, - /** Servers can optionally send this response to indicate a call is being forwarded */ + /// Servers can optionally send this response to indicate a call is being forwarded Sip181CallisBeingForwarded, - /** Indicates that the destination was temporarily unavailable, so the server has queued the call until the - * destination is available. A server may send multiple 182 responses to update progress of the queue */ + /// Indicates that the destination was temporarily unavailable, so the server has queued the call until the + /// destination is available. A server may send multiple 182 responses to update progress of the queue Sip182Queued, - /** This response may be used to send extra information for a call which is still being set up */ + /// This response may be used to send extra information for a call which is still being set up Sip183SessioninProgress, - /** Can be used by User Agent Server to indicate to upstream SIP entities (including the User Agent Client - * (UAC)) that an early dialog has been terminated */ + /// Can be used by User Agent Server to indicate to upstream SIP entities (including the User Agent Client + /// (UAC)) that an early dialog has been terminated Sip199EarlyDialogTerminated, - /** Indicates the request was successful */ + /// Indicates the request was successful Sip200OK, - /** Indicates that the request has been accepted for processing, but the processing has not been completed - */ + /// Indicates that the request has been accepted for processing, but the processing has not been completed Sip202Accepted, - /** Indicates the request was successful, but the corresponding response will not be received */ + /// Indicates the request was successful, but the corresponding response will not be received Sip204NoNotification, - /** The address resolved to one of several options for the user or client to choose between, which are - * listed in the message body or the message's Contact fields */ + /// The address resolved to one of several options for the user or client to choose between, which are + /// listed in the message body or the message's Contact fields Sip300MultipleChoices, - /** The original Request-URI is no longer valid, the new address is given in the Contact header field, and - * the client should update any records of the original Request-URI with the new value */ + /// The original Request-URI is no longer valid, the new address is given in the Contact header field, and + /// the client should update any records of the original Request-URI with the new value Sip301MovedPermanently, - /** The client should try at the address in the Contact field. If an Expires field is present, the client - * may cache the result for that period of time */ + /// The client should try at the address in the Contact field. If an Expires field is present, the client + /// may cache the result for that period of time Sip302MovedTemporarily, - /** The Contact field details a proxy that must be used to access the requested destination */ + /// The Contact field details a proxy that must be used to access the requested destination Sip305UseProxy, - /** The call failed, but alternatives are detailed in the message body */ + /// The call failed, but alternatives are detailed in the message body Sip380AlternativeService, - /** The request could not be understood due to malformed syntax */ + /// The request could not be understood due to malformed syntax Sip400BadRequest, - /** The request requires user authentication. This response is issued by UASs and registrars */ + /// The request requires user authentication. This response is issued by UASs and registrars Sip401Unauthorized, - /** Reserved for future use */ + /// Reserved for future use Sip402PaymentRequired, - /** The server understood the request, but is refusing to fulfill it */ + /// The server understood the request, but is refusing to fulfill it Sip403Forbidden, - /** The server has definitive information that the user does not exist at the domain specified in the - * Request-URI. This status is also returned if the domain in the Request-URI does not match any of the - * domains handled by the recipient of the request */ + /// The server has definitive information that the user does not exist at the domain specified in the + /// Request-URI. This status is also returned if the domain in the Request-URI does not match any of the + /// domains handled by the recipient of the request Sip404NotFound, - /** The method specified in the Request-Line is understood, but not allowed for the address identified by - * the Request-URI */ + /// The method specified in the Request-Line is understood, but not allowed for the address identified by + /// the Request-URI Sip405MethodNotAllowed, - /** The resource identified by the request is only capable of generating response entities that have content - * characteristics but not acceptable according to the Accept header field sent in the request */ + /// The resource identified by the request is only capable of generating response entities that have content + /// characteristics but not acceptable according to the Accept header field sent in the request Sip406NotAcceptable, - /** The request requires user authentication. This response is issued by proxies */ + /// The request requires user authentication. This response is issued by proxies Sip407ProxyAuthenticationRequired, - /** Couldn't find the user in time. The server could not produce a response within a suitable amount of - * time, for example, if it could not determine the location of the user in time. The client MAY repeat the - * request without modifications at any later time */ + /// Couldn't find the user in time. The server could not produce a response within a suitable amount of + /// time, for example, if it could not determine the location of the user in time. The client MAY repeat the + /// request without modifications at any later time Sip408RequestTimeout, - /** User already registered */ + /// User already registered Sip409Conflict, - /** The user existed once, but is not available here any more */ + /// The user existed once, but is not available here any more Sip410Gone, - /** The server will not accept the request without a valid Content-Length */ + /// The server will not accept the request without a valid Content-Length Sip411LengthRequired, - /** The given precondition has not been met */ + /// The given precondition has not been met Sip412ConditionalRequestFailed, - /** Request body too large */ + /// Request body too large Sip413RequestEntityTooLarge, - /** The server is refusing to service the request because the Request-URI is longer than the server is - * willing to interpret */ + /// The server is refusing to service the request because the Request-URI is longer than the server is + /// willing to interpret Sip414RequestURITooLong, - /** Request body in a format not supported */ + /// Request body in a format not supported Sip415UnsupportedMediaType, - /** Request-URI is unknown to the server */ + /// Request-URI is unknown to the server Sip416UnsupportedURIScheme, - /** There was a resource-priority option tag, but no Resource-Priority header */ + /// There was a resource-priority option tag, but no Resource-Priority header Sip417UnknownResourcePriority, - /** Bad SIP Protocol Extension used, not understood by the server */ + /// Bad SIP Protocol Extension used, not understood by the server Sip420BadExtension, - /** The server needs a specific extension not listed in the Supported header */ + /// The server needs a specific extension not listed in the Supported header Sip421ExtensionRequired, - /** The received request contains a Session-Expires header field with a duration below the minimum timer */ + /// The received request contains a Session-Expires header field with a duration below the minimum timer Sip422SessionIntervalTooSmall, - /** Expiration time of the resource is too short */ + /// Expiration time of the resource is too short Sip423IntervalTooBrief, - /** The request's location content was malformed or otherwise unsatisfactory */ + /// The request's location content was malformed or otherwise unsatisfactory Sip424BadLocationInformation, - /** The server rejected a non-interactive emergency call, indicating that the request was malformed enough - * that no reasonable emergency response to the alert can be determined */ + /// The server rejected a non-interactive emergency call, indicating that the request was malformed enough + /// that no reasonable emergency response to the alert can be determined Sip425BadAlertMessage, - /** The server policy requires an Identity header, and one has not been provided */ + /// The server policy requires an Identity header, and one has not been provided Sip428UseIdentityHeader, - /** The server did not receive a valid Referred-By token on the request */ + /// The server did not receive a valid Referred-By token on the request Sip429ProvideReferrerIdentity, - /** A specific flow to a user agent has failed, although other flows may succeed. This response is intended - * for use between proxy devices, and should not be seen by an endpoint (and if it is seen by one, should be - * treated as a 400 Bad Request response) */ + /// A specific flow to a user agent has failed, although other flows may succeed. This response is intended + /// for use between proxy devices, and should not be seen by an endpoint (and if it is seen by one, should + /// be treated as a 400 Bad Request response) Sip430FlowFailed, - /** The request has been rejected because it was anonymous */ + /// The request has been rejected because it was anonymous Sip433AnonymityDisallowed, - /** The request has an Identity-Info header, and the URI scheme in that header cannot be dereferenced */ + /// The request has an Identity-Info header, and the URI scheme in that header cannot be dereferenced Sip436BadIdentityInfo, - /** The server was unable to validate a certificate for the domain that signed the request */ + /// The server was unable to validate a certificate for the domain that signed the request Sip437UnsupportedCertificate, - /** The server obtained a valid certificate that the request claimed was used to sign the request, but was - * unable to verify that signature */ + /// The server obtained a valid certificate that the request claimed was used to sign the request, but was + /// unable to verify that signature Sip438InvalidIdentityHeader, - /** The first outbound proxy the user is attempting to register through does not support the "outbound" - * feature of RFC 5626, although the registrar does */ + /// The first outbound proxy the user is attempting to register through does not support the "outbound" + /// feature of RFC 5626, although the registrar does Sip439FirstHopLacksOutboundSupport, - /** If a SIP proxy determines a response context has insufficient Incoming Max-Breadth to carry out a - * desired parallel fork, and the proxy is unwilling/unable to compensate by forking serially or sending a - * redirect, that proxy MUST return a 440 response. A client receiving a 440 response can infer that its - * request did not reach all possible destinations */ + /// If a SIP proxy determines a response context has insufficient Incoming Max-Breadth to carry out a + /// desired parallel fork, and the proxy is unwilling/unable to compensate by forking serially or sending a + /// redirect, that proxy MUST return a 440 response. A client receiving a 440 response can infer that its + /// request did not reach all possible destinations Sip440MaxBreadthExceeded, - /** If a SIP UA receives an INFO request associated with an Info Package that the UA has not indicated - * willingness to receive, the UA MUST send a 469 response, which contains a Recv-Info header field with - * Info Packages for which the UA is willing to receive INFO requests */ + /// If a SIP UA receives an INFO request associated with an Info Package that the UA has not indicated + /// willingness to receive, the UA MUST send a 469 response, which contains a Recv-Info header field with + /// Info Packages for which the UA is willing to receive INFO requests Sip469BadInfoPackage, - /** The source of the request did not have the permission of the recipient to make such a request */ + /// The source of the request did not have the permission of the recipient to make such a request Sip470ConsentNeeded, - /** Callee currently unavailable */ + /// Callee currently unavailable Sip480TemporarilyUnavailable, - /** Server received a request that does not match any dialog or transaction */ + /// Server received a request that does not match any dialog or transaction Sip481Call_TransactionDoesNotExist, - /** Server has detected a loop */ + /// Server has detected a loop Sip482LoopDetected, - /** Max-Forwards header has reached the value '0' */ + /// Max-Forwards header has reached the value '0' Sip483TooManyHops, - /** Request-URI incomplete */ + /// Request-URI incomplete Sip484AddressIncomplete, - /** Request-URI is ambiguous */ + /// Request-URI is ambiguous Sip485Ambiguous, - /** Callee is busy */ + /// Callee is busy Sip486BusyHere, - /** Request has terminated by bye or cancel */ + /// Request has terminated by bye or cancel Sip487RequestTerminated, - /** Some aspect of the session description or the Request-URI is not acceptable */ + /// Some aspect of the session description or the Request-URI is not acceptable Sip488NotAcceptableHere, - /** The server did not understand an event package specified in an Event header field */ + /// The server did not understand an event package specified in an Event header field Sip489BadEvent, - /** Server has some pending request from the same dialog */ + /// Server has some pending request from the same dialog Sip491RequestPending, - /** Request contains an encrypted MIME body, which recipient can not decrypt */ + /// Request contains an encrypted MIME body, which recipient can not decrypt Sip493Undecipherable, - /** The server has received a request that requires a negotiated security mechanism, and the response - * contains a list of suitable security mechanisms for the requester to choose between, or a digest - * authentication challenge */ + /// The server has received a request that requires a negotiated security mechanism, and the response + /// contains a list of suitable security mechanisms for the requester to choose between, or a digest + /// authentication challenge Sip494SecurityAgreementRequired, - /** The server could not fulfill the request due to some unexpected condition */ + /// The server could not fulfill the request due to some unexpected condition Sip500ServerInternalError, - /** The server does not have the ability to fulfill the request, such as because it does not recognize the - * request method. (Compare with 405 Method Not Allowed, where the server recognizes the method but does not - * allow or support it.) */ + /// The server does not have the ability to fulfill the request, such as because it does not recognize the + /// request method. (Compare with 405 Method Not Allowed, where the server recognizes the method but does + /// not allow or support it.) Sip501NotImplemented, - /** The server is acting as a gateway or proxy, and received an invalid response from a downstream server - * while attempting to fulfill the request */ + /// The server is acting as a gateway or proxy, and received an invalid response from a downstream server + /// while attempting to fulfill the request Sip502BadGateway, - /** The server is undergoing maintenance or is temporarily overloaded and so cannot process the request. A - * "Retry-After" header field may specify when the client may reattempt its request */ + /// The server is undergoing maintenance or is temporarily overloaded and so cannot process the request. A + /// "Retry-After" header field may specify when the client may reattempt its request Sip503ServiceUnavailable, - /** The server attempted to access another server in attempting to process the request, and did not receive - * a prompt response */ + /// The server attempted to access another server in attempting to process the request, and did not receive + /// a prompt response Sip504ServerTimeout, - /** The SIP protocol version in the request is not supported by the server */ + /// The SIP protocol version in the request is not supported by the server Sip505VersionNotSupported, - /** The request message length is longer than the server can process */ + /// The request message length is longer than the server can process Sip513MessageTooLarge, - /** The server does not support the push notification service identified in a 'pn-provider' SIP URI - * parameter */ + /// The server does not support the push notification service identified in a 'pn-provider' SIP URI + /// parameter Sip555PushNotificationServiceNotSupported, - /** The server is unable or unwilling to meet some constraints specified in the offer */ + /// The server is unable or unwilling to meet some constraints specified in the offer Sip580PreconditionFailure, - /** All possible destinations are busy. Unlike the 486 response, this response indicates the destination - * knows there are no alternative destinations (such as a voicemail server) able to accept the call */ + /// All possible destinations are busy. Unlike the 486 response, this response indicates the destination + /// knows there are no alternative destinations (such as a voicemail server) able to accept the call Sip600BusyEverywhere, - /** The destination does not wish to participate in the call, or cannot do so, and additionally the - * destination knows there are no alternative destinations (such as a voicemail server) willing to accept - * the call */ + /// The destination does not wish to participate in the call, or cannot do so, and additionally the + /// destination knows there are no alternative destinations (such as a voicemail server) willing to accept + /// the call Sip603Decline, - /** The server has authoritative information that the requested user does not exist anywhere */ + /// The server has authoritative information that the requested user does not exist anywhere Sip604DoesNotExistAnywhere, - /** The user's agent was contacted successfully but some aspects of the session description such as the - * requested media, bandwidth, or addressing style were not acceptable */ + /// The user's agent was contacted successfully but some aspects of the session description such as the + /// requested media, bandwidth, or addressing style were not acceptable Sip606NotAcceptable, - /** The called party did not want this call from the calling party. Future attempts from the calling party - * are likely to be similarly rejected */ + /// The called party did not want this call from the calling party. Future attempts from the calling party + /// are likely to be similarly rejected Sip607Unwanted, - /** An intermediary machine or process rejected the call attempt */ + /// An intermediary machine or process rejected the call attempt Sip608Rejected, - /** Unknown SIP status code */ + /// Unknown SIP status code SipStatusCodeUnknown }; diff --git a/Packet++/header/Sll2Layer.h b/Packet++/header/Sll2Layer.h index 79b46a950b..a81c779a0d 100644 --- a/Packet++/header/Sll2Layer.h +++ b/Packet++/header/Sll2Layer.h @@ -14,26 +14,23 @@ namespace pcpp #pragma pack(push, 1) struct sll2_header { - /** Contains an Ethernet protocol type of the next layer */ + /// Contains an Ethernet protocol type of the next layer uint16_t protocol_type; - /** The "Reserved (MBZ)" field is reserved, and must be set to zero */ + /// The "Reserved (MBZ)" field is reserved, and must be set to zero uint16_t reserved; - /** The interface index field is a signed integer in network byte - * order and contains the 1-based index of the interface on which the packet was observed - **/ + /// The interface index field is a signed integer in network byte + /// order and contains the 1-based index of the interface on which the packet was observed uint32_t interface_index; - /** Contains a Linux ARPHRD_ value for the link-layer device type */ + /// Contains a Linux ARPHRD_ value for the link-layer device type uint16_t ARPHRD_type; - /** Specifies whether packet was: specifically sent to us by somebody else (value=0); - * broadcast by somebody else (value=1); multicast, but not broadcast, by somebody else (value=2); - * sent to somebody else by somebody else (value=3); sent by us (value=4) - **/ + /// Specifies whether packet was: specifically sent to us by somebody else (value=0); + /// broadcast by somebody else (value=1); multicast, but not broadcast, by somebody else (value=2); + /// sent to somebody else by somebody else (value=3); sent by us (value=4) uint8_t packet_type; - /** Contains the length of the link-layer address of the sender of the packet. That length could be zero */ + /// Contains the length of the link-layer address of the sender of the packet. That length could be zero uint8_t link_layer_addr_len; - /** Contains the link-layer address of the sender of the packet; the number of bytes of that field that are - * meaningful is specified by the link-layer address length field - **/ + /// Contains the link-layer address of the sender of the packet; the number of bytes of that field that are + /// meaningful is specified by the link-layer address length field uint8_t link_layer_addr[8]; }; #pragma pack(pop) diff --git a/Packet++/header/SllLayer.h b/Packet++/header/SllLayer.h index 092243eecc..f6abb318e5 100644 --- a/Packet++/header/SllLayer.h +++ b/Packet++/header/SllLayer.h @@ -14,20 +14,18 @@ namespace pcpp #pragma pack(push, 1) struct sll_header { - /** Specifies whether packet was: specifically sent to us by somebody else (value=0); - * broadcast by somebody else (value=1); multicast, but not broadcast, by somebody else (value=2); - * sent to somebody else by somebody else (value=3); sent by us (value=4) - **/ + /// Specifies whether packet was: specifically sent to us by somebody else (value=0); + /// broadcast by somebody else (value=1); multicast, but not broadcast, by somebody else (value=2); + /// sent to somebody else by somebody else (value=3); sent by us (value=4) uint16_t packet_type; - /** Contains a Linux ARPHRD_ value for the link-layer device type */ + /// Contains a Linux ARPHRD_ value for the link-layer device type uint16_t ARPHRD_type; - /** Contains the length of the link-layer address of the sender of the packet. That length could be zero */ + /// Contains the length of the link-layer address of the sender of the packet. That length could be zero uint16_t link_layer_addr_len; - /** contains the link-layer address of the sender of the packet; the number of bytes of that field that are - * meaningful is specified by the link-layer address length field - **/ + /// contains the link-layer address of the sender of the packet; the number of bytes of that field that are + /// meaningful is specified by the link-layer address length field uint8_t link_layer_addr[8]; - /** Contains an Ethernet protocol type of the next layer */ + /// Contains an Ethernet protocol type of the next layer uint16_t protocol_type; }; #pragma pack(pop) diff --git a/Packet++/header/SmtpLayer.h b/Packet++/header/SmtpLayer.h index 04dccb047f..871a597233 100644 --- a/Packet++/header/SmtpLayer.h +++ b/Packet++/header/SmtpLayer.h @@ -1,8 +1,8 @@ #ifndef PACKETPP_SMTP_LAYER -# define PACKETPP_SMTP_LAYER +#define PACKETPP_SMTP_LAYER -# include "PayloadLayer.h" -# include "SingleCommandTextProtocol.h" +#include "PayloadLayer.h" +#include "SingleCommandTextProtocol.h" /// @file @@ -172,74 +172,74 @@ namespace pcpp /// Enum for SMTP response codes enum class SmtpStatusCode : int { - /// System status, or system help reply - SYSTEM_STATUS = 211, - /// Help message - HELP_MESSAGE = 214, - /// \ Service ready - SERVICE_READY = 220, - /// \ Service closing transmission channel - SERVICE_CLOSE = 221, - /// Authentication successful - AUTH_SUCCESS = 235, - /// Requested mail action okay, completed - COMPLETED = 250, - /// User not local; will forward to - WILL_FORWARD = 251, - /// Cannot VRFY user, but will accept message and attempt delivery - CANNOT_VERIFY = 252, - /// AUTH input - AUTH_INPUT = 334, - /// Start mail input; end with \.\ - MAIL_INPUT = 354, - /// \ Service not available, closing transmission channel - SERVICE_UNAVAILABLE = 421, - /// A password transition is needed - PASS_NEEDED = 432, - /// Requested mail action not taken: mailbox unavailable (mail busy or temporarily blocked) - MAILBOX_UNAVAILABLE_TEMP = 450, - /// Requested action aborted: local error in processing - ABORT_LOCAL_ERROR = 451, - /// Requested action not taken: insufficient system storage - INSUFFICIENT_STORAGE = 452, - /// Temporary authentication failed - TEMP_AUTH_FAILED = 454, - /// Server unable to accommodate parameters - PARAM_NOT_ACCOMMODATED = 455, - /// Syntax error, command unrecognized - CMD_NOT_RECOGNIZED = 500, - /// Syntax error in parameters or arguments - SYNTAX_ERROR_PARAM = 501, - /// Command not implemented - CMD_NOT_IMPLEMENTED = 502, - /// Bad sequence of commands - CMD_BAD_SEQUENCE = 503, - /// Command parameter not implemented - PARAM_NOT_IMPLEMENTED = 504, - /// Server does not accept mail - MAIL_NOT_ACCEPTED = 521, - /// Encryption needed - ENCRYPT_NEED = 523, - /// Authentication required - AUTH_REQUIRED = 530, - /// Authentication mechanism is too weak - AUTH_TOO_WEAK = 534, - /// Authentication credentials invalid - AUTH_CRED_INVALID = 535, - /// Encryption required for requested authentication mechanism - ENCRYPT_REQUIRED = 538, - /// Requested action not taken: mailbox unavailable - MAILBOX_UNAVAILABLE = 550, - /// User not local; please try - USER_NOT_LOCAL = 551, - /// Requested mail action aborted: exceeded storage allocation - EXCEED_STORAGE = 552, - /// Requested action not taken: mailbox name not allowed - NAME_NOT_ALLOWED = 553, - /// Transaction failed - TRANSACTION_FAIL = 554, - /// Domain does not accept mail - DOMAIN_NOT_ACCEPT = 556 + /// System status, or system help reply + SYSTEM_STATUS = 211, + /// Help message + HELP_MESSAGE = 214, + /// \ Service ready + SERVICE_READY = 220, + /// \ Service closing transmission channel + SERVICE_CLOSE = 221, + /// Authentication successful + AUTH_SUCCESS = 235, + /// Requested mail action okay, completed + COMPLETED = 250, + /// User not local; will forward to + WILL_FORWARD = 251, + /// Cannot VRFY user, but will accept message and attempt delivery + CANNOT_VERIFY = 252, + /// AUTH input + AUTH_INPUT = 334, + /// Start mail input; end with \.\ + MAIL_INPUT = 354, + /// \ Service not available, closing transmission channel + SERVICE_UNAVAILABLE = 421, + /// A password transition is needed + PASS_NEEDED = 432, + /// Requested mail action not taken: mailbox unavailable (mail busy or temporarily blocked) + MAILBOX_UNAVAILABLE_TEMP = 450, + /// Requested action aborted: local error in processing + ABORT_LOCAL_ERROR = 451, + /// Requested action not taken: insufficient system storage + INSUFFICIENT_STORAGE = 452, + /// Temporary authentication failed + TEMP_AUTH_FAILED = 454, + /// Server unable to accommodate parameters + PARAM_NOT_ACCOMMODATED = 455, + /// Syntax error, command unrecognized + CMD_NOT_RECOGNIZED = 500, + /// Syntax error in parameters or arguments + SYNTAX_ERROR_PARAM = 501, + /// Command not implemented + CMD_NOT_IMPLEMENTED = 502, + /// Bad sequence of commands + CMD_BAD_SEQUENCE = 503, + /// Command parameter not implemented + PARAM_NOT_IMPLEMENTED = 504, + /// Server does not accept mail + MAIL_NOT_ACCEPTED = 521, + /// Encryption needed + ENCRYPT_NEED = 523, + /// Authentication required + AUTH_REQUIRED = 530, + /// Authentication mechanism is too weak + AUTH_TOO_WEAK = 534, + /// Authentication credentials invalid + AUTH_CRED_INVALID = 535, + /// Encryption required for requested authentication mechanism + ENCRYPT_REQUIRED = 538, + /// Requested action not taken: mailbox unavailable + MAILBOX_UNAVAILABLE = 550, + /// User not local; please try + USER_NOT_LOCAL = 551, + /// Requested mail action aborted: exceeded storage allocation + EXCEED_STORAGE = 552, + /// Requested action not taken: mailbox name not allowed + NAME_NOT_ALLOWED = 553, + /// Transaction failed + TRANSACTION_FAIL = 554, + /// Domain does not accept mail + DOMAIN_NOT_ACCEPT = 556 }; /// A constructor that creates the layer from an existing packet raw data @@ -291,4 +291,4 @@ namespace pcpp }; } // namespace pcpp -#endif /* PACKETPP_SMTP_LAYER */ +#endif // PACKETPP_SMTP_LAYER diff --git a/Packet++/header/SomeIpLayer.h b/Packet++/header/SomeIpLayer.h index 74d7156fe3..464e55b3aa 100644 --- a/Packet++/header/SomeIpLayer.h +++ b/Packet++/header/SomeIpLayer.h @@ -17,35 +17,35 @@ namespace pcpp /// SOME/IP message types enum class MsgType : uint8_t { - /** A request expecting a response (even void) */ + /// A request expecting a response (even void) REQUEST = 0x00, - /** Acknowledgment for REQUEST(optional) */ + /// Acknowledgment for REQUEST(optional) REQUEST_ACK = 0x40, - /** A fire&forget request */ + /// A fire&forget request REQUEST_NO_RETURN = 0x01, - /** Acknowledgment for REQUEST_NO_RETURN(informational) */ + /// Acknowledgment for REQUEST_NO_RETURN(informational) REQUEST_NO_RETURN_ACK = 0x41, - /** A request of a notification expecting no response */ + /// A request of a notification expecting no response NOTIFICATION = 0x02, - /** Acknowledgment for NOTIFICATION(informational) */ + /// Acknowledgment for NOTIFICATION(informational) NOTIFICATION_ACK = 0x42, - /** The response message */ + /// The response message RESPONSE = 0x80, - /** The Acknowledgment for RESPONSE(informational) */ + /// The Acknowledgment for RESPONSE(informational) RESPONSE_ACK = 0xC0, - /** The response containing an error */ + /// The response containing an error ERRORS = 0x81, - /** Acknowledgment for ERROR(informational) */ + /// Acknowledgment for ERROR(informational) ERROR_ACK = 0xC1, - /** A TP request expecting a response (even void) */ + /// A TP request expecting a response (even void) TP_REQUEST = 0x20, - /** A TP fire&forget request */ + /// A TP fire&forget request TP_REQUEST_NO_RETURN = 0x21, - /** A TP request of a notification/event callback expecting no response */ + /// A TP request of a notification/event callback expecting no response TP_NOTIFICATION = 0x22, - /** The TP response message */ + /// The TP response message TP_RESPONSE = 0xa0, - /** The TP response containing an error */ + /// The TP response containing an error TP_ERROR = 0xa1, }; @@ -54,23 +54,23 @@ namespace pcpp #pragma pack(push, 1) struct someiphdr { - /** Service ID */ + /// Service ID uint16_t serviceID; - /** Method ID. Most significant bit 0 when E2E communication. 1 when SOME/IP event */ + /// Method ID. Most significant bit 0 when E2E communication. 1 when SOME/IP event uint16_t methodID; - /** Length. Also covers payload. Excludes serviceID, methodID and length field itself */ + /// Length. Also covers payload. Excludes serviceID, methodID and length field itself uint32_t length; - /** Client ID */ + /// Client ID uint16_t clientID; - /** Session ID */ + /// Session ID uint16_t sessionID; - /** Protocol Version */ + /// Protocol Version uint8_t protocolVersion; - /** Interface Version */ + /// Interface Version uint8_t interfaceVersion; - /** Message Type */ + /// Message Type uint8_t msgType; - /** Return Code */ + /// Return Code uint8_t returnCode; }; #pragma pack(pop) @@ -279,7 +279,7 @@ namespace pcpp return sizeof(someiphdr); } - /* Using unordered_set since insertion and search should be almost constant time */ + // Using unordered_set since insertion and search should be almost constant time static std::unordered_set m_SomeIpPorts; }; @@ -293,8 +293,8 @@ namespace pcpp #pragma pack(push, 1) struct someiptphdr : someiphdr { - /** Contains the offset and the more segments flag. 28 bit offset field measured in 16 bytes + 3 bit - * reserved + 1 bit more segments flag */ + /// Contains the offset and the more segments flag. 28 bit offset field measured in 16 bytes + 3 bit + /// reserved + 1 bit more segments flag uint32_t offsetAndFlag; }; #pragma pack(pop) diff --git a/Packet++/header/SomeIpSdLayer.h b/Packet++/header/SomeIpSdLayer.h index c364d488a5..c03ed74a47 100644 --- a/Packet++/header/SomeIpSdLayer.h +++ b/Packet++/header/SomeIpSdLayer.h @@ -19,9 +19,9 @@ namespace pcpp /// Types of protocols that can be referenced in SOME/IP-SD enum SomeIpSdProtocolType : uint8_t { - /** TCP */ + /// TCP SD_TCP = 0x06, - /** UDP */ + /// UDP SD_UDP = 0x11 }; @@ -37,23 +37,23 @@ namespace pcpp /// Types of options currently available for the SOME/IP-SD protocol enum class OptionType : uint8_t { - /** Unknown Option Type */ + /// Unknown Option Type Unknown = 0x00, - /** Configuration Option */ + /// Configuration Option ConfigurationString = 0x01, - /** Load Balancing Option */ + /// Load Balancing Option LoadBalancing = 0x02, - /** IPv4 Endpoint Option */ + /// IPv4 Endpoint Option IPv4Endpoint = 0x04, - /** IPv6 Endpoint Option */ + /// IPv6 Endpoint Option IPv6Endpoint = 0x06, - /** IPv4 Multicast Option */ + /// IPv4 Multicast Option IPv4Multicast = 0x14, - /** IPv6 Multicast Option */ + /// IPv6 Multicast Option IPv6Multicast = 0x16, - /** IPv4 SD Endpoint Option */ + /// IPv4 SD Endpoint Option IPv4SdEndpoint = 0x24, - /** IPv6 SD Endpoint Option */ + /// IPv6 SD Endpoint Option IPv6SdEndpoint = 0x26 }; @@ -62,11 +62,11 @@ namespace pcpp #pragma pack(push, 1) struct someipsdhdroptionsbase { - /** Length - excluding the 16 bit Length field and the 8 bit type flag */ + /// Length - excluding the 16 bit Length field and the 8 bit type flag uint16_t length; - /** Type */ + /// Type uint8_t type; - /** Reserved */ + /// Reserved uint8_t reserved; }; #pragma pack(pop) @@ -122,11 +122,11 @@ namespace pcpp /// Types of options which are implemented with this class enum IPv4OptionType { - /** IPv4 Endpoint Option */ + /// IPv4 Endpoint Option IPv4Endpoint, - /** IPv4 Multicast Option */ + /// IPv4 Multicast Option IPv4Multicast, - /** IPv4 SD Endpoint Option */ + /// IPv4 SD Endpoint Option IPv4SdEndpoint, }; @@ -160,14 +160,14 @@ namespace pcpp #pragma pack(push, 1) struct someipsdhdroptionsipv4 : someipsdhdroptionsbase { - /* IPv4-Address field */ + /// IPv4-Address field uint32_t ipv4Address; - /* Reserved */ // cppcheck-suppress duplInheritedMember + /// Reserved uint8_t reserved; - /* Layer 4 Protocol field (L4-Proto) - Either UDP or TCP */ + /// Layer 4 Protocol field (L4-Proto) - Either UDP or TCP SomeIpSdProtocolType l4Protocol; - /* Port number of UDP or TCP */ + /// Port number of UDP or TCP uint16_t portNumber; }; #pragma pack(pop) @@ -183,11 +183,11 @@ namespace pcpp /// Types of options which are implemented with this class enum IPv6OptionType { - /** IPv6 Endpoint Option */ + /// IPv6 Endpoint Option IPv6Endpoint, - /** IPv6 Multicast Option */ + /// IPv6 Multicast Option IPv6Multicast, - /** IPv6 SD Endpoint Option */ + /// IPv6 SD Endpoint Option IPv6SdEndpoint, }; @@ -221,14 +221,14 @@ namespace pcpp #pragma pack(push, 1) struct someipsdhdroptionsipv6 : someipsdhdroptionsbase { - /* IPv6-Address field */ + /// IPv6-Address field uint8_t ipv6Address[16]; - /* Reserved */ // cppcheck-suppress duplInheritedMember + /// Reserved uint8_t reserved; - /* Layer 4 Protocol field (L4-Proto) - Either UDP or TCP */ + /// Layer 4 Protocol field (L4-Proto) - Either UDP or TCP SomeIpSdProtocolType l4Protocol; - /* Port number of UDP or TCP */ + /// Port number of UDP or TCP uint16_t portNumber; }; #pragma pack(pop) @@ -286,9 +286,9 @@ namespace pcpp #pragma pack(push, 1) struct someipsdhdroptionsload : someipsdhdroptionsbase { - /* Priority field */ + /// Priority field uint16_t priority; - /* Weight field */ + /// Weight field uint16_t weight; }; #pragma pack(pop) @@ -304,21 +304,21 @@ namespace pcpp /// Types of entries that can occur in SOME/IP-SD enum class EntryType : uint8_t { - /** Find Service */ + /// Find Service FindService, - /** Offer Service */ + /// Offer Service OfferService, - /** Stop Offer Service */ + /// Stop Offer Service StopOfferService, - /** Subscribe Eventgroup */ + /// Subscribe Eventgroup SubscribeEventgroup, - /** Stop Subscribe Eventgroup */ + /// Stop Subscribe Eventgroup StopSubscribeEventgroup, - /** Subscribe Eventgroup Acknowledgment */ + /// Subscribe Eventgroup Acknowledgment SubscribeEventgroupAck, - /** Subscribe Eventgroup Negative Acknowledgement */ + /// Subscribe Eventgroup Negative Acknowledgement SubscribeEventgroupNack, - /** Unknown Entry Type */ + /// Unknown Entry Type UnknownEntryType }; @@ -327,32 +327,32 @@ namespace pcpp #pragma pack(push, 1) struct someipsdhdrentry { - /** Type */ + /// Type uint8_t type; - /** Index 1st option */ + /// Index 1st option uint8_t indexFirstOption; - /** Index 2nd option */ + /// Index 2nd option uint8_t indexSecondOption; #if (BYTE_ORDER == LITTLE_ENDIAN) uint8_t - /** Numbers of Option #2 (4bit) */ + /// Numbers of Option #2 (4bit) nrOpt2 : 4, - /** Numbers of Option #1 (4bit) */ + /// Numbers of Option #1 (4bit) nrOpt1 : 4; #else uint8_t - /** Numbers of Option #1 (4bit) */ + /// Numbers of Option #1 (4bit) nrOpt1 : 4, - /** Numbers of Option #2 (4bit) */ + /// Numbers of Option #2 (4bit) nrOpt2 : 4; #endif - /** Service ID */ + /// Service ID uint16_t serviceID; - /** Instance ID */ + /// Instance ID uint16_t instanceID; - /** Major Version (8 bit) + TTL (24 bit) */ + /// Major Version (8 bit) + TTL (24 bit) uint32_t majorVersion_ttl; - /** Minor Version (Service Entry Type) or Counter + Eventgroup ID (Eventgroup Entry Type) */ + /// Minor Version (Service Entry Type) or Counter + Eventgroup ID (Eventgroup Entry Type) uint32_t data; }; #pragma pack(pop) @@ -473,13 +473,13 @@ namespace pcpp /// are not unique. enum class TypeInternal : uint8_t { - /** Find Service */ + /// Find Service FindService_Internal = 0x00, - /** Offer Service / Stop Offer Service */ + /// Offer Service / Stop Offer Service OfferService_Internal = 0x01, - /** Subscribe Eventgroup & Stop Subscribe Eventgroup */ + /// Subscribe Eventgroup & Stop Subscribe Eventgroup SubscribeEventgroup_Internal = 0x06, - /** Subscribe Eventgroup Acknowledgment / Negative Acknowledgement */ + /// Subscribe Eventgroup Acknowledgment / Negative Acknowledgement SubscribeEventgroupAck_Internal = 0x07, }; @@ -598,13 +598,13 @@ namespace pcpp #pragma pack(push, 1) struct someipsdhdr : someiphdr { - /** Flags (8 bit) */ + /// Flags (8 bit) uint8_t flags; - /** Reserved1 field (Bits 0-7 of 24-bits reserved field) */ + /// Reserved1 field (Bits 0-7 of 24-bits reserved field) uint8_t reserved1; - /** Reserved2 field (Bits 8-15 of 24-bits reserved field) */ + /// Reserved2 field (Bits 8-15 of 24-bits reserved field) uint8_t reserved2; - /** Reserved3 field (Bits 16-23 of 24-bits reserved field) */ + /// Reserved3 field (Bits 16-23 of 24-bits reserved field) uint8_t reserved3; }; #pragma pack(pop) diff --git a/Packet++/header/TLVData.h b/Packet++/header/TLVData.h index abb6240bf7..b24dd6f708 100644 --- a/Packet++/header/TLVData.h +++ b/Packet++/header/TLVData.h @@ -18,15 +18,15 @@ namespace pcpp template class TLVRecord { protected: - /** A struct representing the TLV construct */ + /// A struct representing the TLV construct #pragma pack(push, 1) struct TLVRawData { - /** Record type */ + /// Record type TRecType recordType; - /** Record length in bytes */ + /// Record length in bytes TRecLen recordLen; - /** Record value (variable size) */ + /// Record value (variable size) uint8_t recordValue[]; }; #pragma pack(pop) diff --git a/Packet++/header/TcpLayer.h b/Packet++/header/TcpLayer.h index 848c62b723..97f733b65e 100644 --- a/Packet++/header/TcpLayer.h +++ b/Packet++/header/TcpLayer.h @@ -19,64 +19,64 @@ namespace pcpp #pragma pack(push, 1) struct tcphdr { - /** Source TCP port */ + /// Source TCP port uint16_t portSrc; - /** Destination TCP port */ + /// Destination TCP port uint16_t portDst; - /** Sequence number */ + /// Sequence number uint32_t sequenceNumber; - /** Acknowledgment number */ + /// Acknowledgment number uint32_t ackNumber; #if (BYTE_ORDER == LITTLE_ENDIAN) uint16_t reserved : 4; - /** Specifies the size of the TCP header in 32-bit words */ + /// Specifies the size of the TCP header in 32-bit words uint16_t dataOffset : 4; - /** FIN flag */ + /// FIN flag uint16_t finFlag : 1; - /** SYN flag */ + /// SYN flag uint16_t synFlag : 1; - /** RST flag */ + /// RST flag uint16_t rstFlag : 1; - /** PSH flag */ + /// PSH flag uint16_t pshFlag : 1; - /** ACK flag */ + /// ACK flag uint16_t ackFlag : 1; - /** URG flag */ + /// URG flag uint16_t urgFlag : 1; - /** ECE flag */ + /// ECE flag uint16_t eceFlag : 1; - /** CWR flag */ + /// CWR flag uint16_t cwrFlag : 1; #elif (BYTE_ORDER == BIG_ENDIAN) - /** Specifies the size of the TCP header in 32-bit words */ + /// Specifies the size of the TCP header in 32-bit words uint16_t dataOffset : 4; - /** Reserved */ + /// Reserved uint16_t reserved : 4; - /** CWR flag */ + /// CWR flag uint16_t cwrFlag : 1; - /** ECE flag */ + /// ECE flag uint16_t eceFlag : 1; - /** URG flag */ + /// URG flag uint16_t urgFlag : 1; - /** ACK flag */ + /// ACK flag uint16_t ackFlag : 1; - /** PSH flag */ + /// PSH flag uint16_t pshFlag : 1; - /** RST flag */ + /// RST flag uint16_t rstFlag : 1; - /** SYN flag */ + /// SYN flag uint16_t synFlag : 1; - /** FIN flag */ + /// FIN flag uint16_t finFlag : 1; #else # error "Endian is not LE nor BE..." #endif - /** The size of the receive window, which specifies the number of window size units (by default, bytes) */ + /// The size of the receive window, which specifies the number of window size units (by default, bytes) uint16_t windowSize; - /** The 16-bit checksum field is used for error-checking of the header and data */ + /// The 16-bit checksum field is used for error-checking of the header and data uint16_t headerChecksum; - /** If the URG flag (@ref tcphdr#urgFlag) is set, then this 16-bit field is an offset from the sequence number - * indicating the last urgent data byte */ + /// If the URG flag (@ref tcphdr#urgFlag) is set, then this 16-bit field is an offset from the sequence number + /// indicating the last urgent data byte uint16_t urgentPointer; }; #pragma pack(pop) @@ -84,160 +84,160 @@ namespace pcpp /// TCP options types enum TcpOptionType : uint8_t { - /** Padding */ + /// Padding PCPP_TCPOPT_NOP = 1, - /** End of options */ + /// End of options PCPP_TCPOPT_EOL = 0, - /** Segment size negotiating */ + /// Segment size negotiating TCPOPT_MSS = 2, - /** Window scaling */ + /// Window scaling PCPP_TCPOPT_WINDOW = 3, - /** SACK Permitted */ + /// SACK Permitted TCPOPT_SACK_PERM = 4, - /** SACK Block */ + /// SACK Block PCPP_TCPOPT_SACK = 5, - /** Echo (obsoleted by option TcpOptionType::PCPP_TCPOPT_TIMESTAMP) */ + /// Echo (obsoleted by option TcpOptionType::PCPP_TCPOPT_TIMESTAMP) TCPOPT_ECHO = 6, - /** Echo Reply (obsoleted by option TcpOptionType::PCPP_TCPOPT_TIMESTAMP) */ + /// Echo Reply (obsoleted by option TcpOptionType::PCPP_TCPOPT_TIMESTAMP) TCPOPT_ECHOREPLY = 7, - /** TCP Timestamps */ + /// TCP Timestamps PCPP_TCPOPT_TIMESTAMP = 8, - /** CC (obsolete) */ + /// CC (obsolete) TCPOPT_CC = 11, - /** CC.NEW (obsolete) */ + /// CC.NEW (obsolete) TCPOPT_CCNEW = 12, - /** CC.ECHO(obsolete) */ + /// CC.ECHO(obsolete) TCPOPT_CCECHO = 13, - /** MD5 Signature Option */ + /// MD5 Signature Option TCPOPT_MD5 = 19, - /** Multipath TCP */ + /// Multipath TCP TCPOPT_MPTCP = 0x1e, - /** SCPS Capabilities */ + /// SCPS Capabilities TCPOPT_SCPS = 20, - /** SCPS SNACK */ + /// SCPS SNACK TCPOPT_SNACK = 21, - /** SCPS Record Boundary */ + /// SCPS Record Boundary TCPOPT_RECBOUND = 22, - /** SCPS Corruption Experienced */ + /// SCPS Corruption Experienced TCPOPT_CORREXP = 23, - /** Quick-Start Response */ + /// Quick-Start Response TCPOPT_QS = 27, - /** User Timeout Option (also, other known unauthorized use) */ + /// User Timeout Option (also, other known unauthorized use) TCPOPT_USER_TO = 28, - /** RFC3692-style Experiment 1 (also improperly used for shipping products) */ + /// RFC3692-style Experiment 1 (also improperly used for shipping products) TCPOPT_EXP_FD = 0xfd, - /** RFC3692-style Experiment 2 (also improperly used for shipping products) */ + /// RFC3692-style Experiment 2 (also improperly used for shipping products) TCPOPT_EXP_FE = 0xfe, - /** Riverbed probe option, non IANA registered option number */ + /// Riverbed probe option, non IANA registered option number TCPOPT_RVBD_PROBE = 76, - /** Riverbed transparency option, non IANA registered option number */ + /// Riverbed transparency option, non IANA registered option number TCPOPT_RVBD_TRPY = 78, - /** Unknown option */ + /// Unknown option TCPOPT_Unknown = 255 }; /// TCP options types enum class TcpOptionEnumType : uint8_t { - /** Padding */ + /// Padding Nop = 1, - /** End of options */ + /// End of options Eol = 0, - /** Segment size negotiating */ + /// Segment size negotiating Mss = 2, - /** Window scaling */ + /// Window scaling Window = 3, - /** SACK Permitted */ + /// SACK Permitted SackPerm = 4, - /** SACK Block */ + /// SACK Block Sack = 5, - /** Echo (obsoleted by option TcpOptionEnumType::Timestamp) */ + /// Echo (obsoleted by option TcpOptionEnumType::Timestamp) Echo = 6, - /** Echo Reply (obsoleted by option TcpOptionEnumType::Timestamp) */ + /// Echo Reply (obsoleted by option TcpOptionEnumType::Timestamp) EchoReply = 7, - /** TCP Timestamps */ + /// TCP Timestamps Timestamp = 8, - /** CC (obsolete) */ + /// CC (obsolete) Cc = 11, - /** CC.NEW (obsolete) */ + /// CC.NEW (obsolete) CcNew = 12, - /** CC.ECHO(obsolete) */ + /// CC.ECHO(obsolete) CcEcho = 13, - /** MD5 Signature Option */ + /// MD5 Signature Option Md5 = 19, - /** Multipath TCP */ + /// Multipath TCP MpTcp = 0x1e, - /** SCPS Capabilities */ + /// SCPS Capabilities Scps = 20, - /** SCPS SNACK */ + /// SCPS SNACK Snack = 21, - /** SCPS Record Boundary */ + /// SCPS Record Boundary RecBound = 22, - /** SCPS Corruption Experienced */ + /// SCPS Corruption Experienced CorrExp = 23, - /** Quick-Start Response */ + /// Quick-Start Response Qs = 27, - /** User Timeout Option (also, other known unauthorized use) */ + /// User Timeout Option (also, other known unauthorized use) UserTo = 28, - /** RFC3692-style Experiment 1 (also improperly used for shipping products) */ + /// RFC3692-style Experiment 1 (also improperly used for shipping products) ExpFd = 0xfd, - /** RFC3692-style Experiment 2 (also improperly used for shipping products) */ + /// RFC3692-style Experiment 2 (also improperly used for shipping products) ExpFe = 0xfe, - /** Riverbed probe option, non IANA registered option number */ + /// Riverbed probe option, non IANA registered option number RvbdProbe = 76, - /** Riverbed transparency option, non IANA registered option number */ + /// Riverbed transparency option, non IANA registered option number RvbdTrpy = 78, - /** Unknown option */ + /// Unknown option Unknown = 255 }; // TCP option lengths - /** pcpp::TcpOptionEnumType::Nop length */ + /// pcpp::TcpOptionEnumType::Nop length #define PCPP_TCPOLEN_NOP 1 - /** pcpp::TcpOptionEnumType::Eol length */ + /// pcpp::TcpOptionEnumType::Eol length #define PCPP_TCPOLEN_EOL 1 - /** pcpp::TcpOptionEnumType::Mss length */ + /// pcpp::TcpOptionEnumType::Mss length #define PCPP_TCPOLEN_MSS 4 - /** pcpp::TcpOptionEnumType::Window length */ + /// pcpp::TcpOptionEnumType::Window length #define PCPP_TCPOLEN_WINDOW 3 - /** pcpp::TcpOptionEnumType::SackPerm length */ + /// pcpp::TcpOptionEnumType::SackPerm length #define PCPP_TCPOLEN_SACK_PERM 2 - /** pcpp::TcpOptionEnumType::Sack length */ + /// pcpp::TcpOptionEnumType::Sack length #define PCPP_TCPOLEN_SACK_MIN 2 - /** pcpp::TcpOptionEnumType::Echo length */ + /// pcpp::TcpOptionEnumType::Echo length #define PCPP_TCPOLEN_ECHO 6 - /** pcpp::TcpOptionEnumType::EchoReply length */ + /// pcpp::TcpOptionEnumType::EchoReply length #define PCPP_TCPOLEN_ECHOREPLY 6 - /** pcpp::TcpOptionEnumType::Timestamp length */ + /// pcpp::TcpOptionEnumType::Timestamp length #define PCPP_TCPOLEN_TIMESTAMP 10 - /** pcpp::TcpOptionEnumType::Cc length */ + /// pcpp::TcpOptionEnumType::Cc length #define PCPP_TCPOLEN_CC 6 - /** pcpp::TcpOptionEnumType::CcNew length */ + /// pcpp::TcpOptionEnumType::CcNew length #define PCPP_TCPOLEN_CCNEW 6 - /** pcpp::TcpOptionEnumType::CcEcho length */ + /// pcpp::TcpOptionEnumType::CcEcho length #define PCPP_TCPOLEN_CCECHO 6 - /** pcpp::TcpOptionEnumType::Md5 length */ + /// pcpp::TcpOptionEnumType::Md5 length #define PCPP_TCPOLEN_MD5 18 - /** pcpp::TcpOptionEnumType::MpTcp length */ + /// pcpp::TcpOptionEnumType::MpTcp length #define PCPP_TCPOLEN_MPTCP_MIN 8 - /** pcpp::TcpOptionEnumType::Scps length */ + /// pcpp::TcpOptionEnumType::Scps length #define PCPP_TCPOLEN_SCPS 4 - /** pcpp::TcpOptionEnumType::Snack length */ + /// pcpp::TcpOptionEnumType::Snack length #define PCPP_TCPOLEN_SNACK 6 - /** pcpp::TcpOptionEnumType::RecBound length */ + /// pcpp::TcpOptionEnumType::RecBound length #define PCPP_TCPOLEN_RECBOUND 2 - /** pcpp::TcpOptionEnumType::CorrExp length */ + /// pcpp::TcpOptionEnumType::CorrExp length #define PCPP_TCPOLEN_CORREXP 2 - /** pcpp::TcpOptionEnumType::Qs length */ + /// pcpp::TcpOptionEnumType::Qs length #define PCPP_TCPOLEN_QS 8 - /** pcpp::TcpOptionEnumType::UserTo length */ + /// pcpp::TcpOptionEnumType::UserTo length #define PCPP_TCPOLEN_USER_TO 4 - /** pcpp::TcpOptionEnumType::RvbdProbe length */ + /// pcpp::TcpOptionEnumType::RvbdProbe length #define PCPP_TCPOLEN_RVBD_PROBE_MIN 3 - /** pcpp::TcpOptionEnumType::RvbdTrpy length */ + /// pcpp::TcpOptionEnumType::RvbdTrpy length #define PCPP_TCPOLEN_RVBD_TRPY_MIN 16 - /** pcpp::TcpOptionEnumType::ExpFd and pcpp::TcpOptionEnumType::ExpFe length */ + /// pcpp::TcpOptionEnumType::ExpFd and pcpp::TcpOptionEnumType::ExpFe length #define PCPP_TCPOLEN_EXP_MIN 2 /// @class TcpOption @@ -342,18 +342,18 @@ namespace pcpp /// An enum to describe NOP and EOL TCP options. Used in one of this class's c'tors enum NopEolOptionTypes : uint8_t { - /** NOP TCP option */ + /// NOP TCP option NOP, - /** EOL TCP option */ + /// EOL TCP option EOL }; /// An enum to describe NOP and EOL TCP options. Used in one of this class's c'tors enum class NopEolOptionEnumType : uint8_t { - /** NOP TCP option */ + /// NOP TCP option Nop, - /** EOL TCP option */ + /// EOL TCP option Eol }; diff --git a/Packet++/header/TcpReassembly.h b/Packet++/header/TcpReassembly.h index 4f3038aed7..f0c3497722 100644 --- a/Packet++/header/TcpReassembly.h +++ b/Packet++/header/TcpReassembly.h @@ -90,23 +90,23 @@ namespace pcpp /// Represents basic TCP/UDP + IP connection data struct ConnectionData { - /** Source IP address */ + /// Source IP address IPAddress srcIP; - /** Destination IP address */ + /// Destination IP address IPAddress dstIP; - /** Source TCP/UDP port */ + /// Source TCP/UDP port uint16_t srcPort; - /** Destination TCP/UDP port */ + /// Destination TCP/UDP port uint16_t dstPort; - /** A 4-byte hash key representing the connection */ + /// A 4-byte hash key representing the connection uint32_t flowKey; - /** Start timestamp of the connection with microsecond precision */ + /// Start timestamp of the connection with microsecond precision timeval startTime; - /** End timestamp of the connection with microsecond precision */ + /// End timestamp of the connection with microsecond precision timeval endTime; - /** Start timestamp of the connection with nanosecond precision */ + /// Start timestamp of the connection with nanosecond precision std::chrono::time_point startTimePrecise; - /** End timestamp of the connection with nanosecond precision */ + /// End timestamp of the connection with nanosecond precision std::chrono::time_point endTimePrecise; /// A c'tor for this struct that basically zeros all members @@ -199,29 +199,25 @@ namespace pcpp /// A structure for configuring the TcpReassembly class struct TcpReassemblyConfiguration { - /** The flag indicating whether to remove the connection data after a connection is closed */ + /// The flag indicating whether to remove the connection data after a connection is closed bool removeConnInfo; - /** How long the closed connections will not be cleaned up. The value is expressed in seconds. If the value is - * set to 0 then TcpReassembly should use the default value. This parameter is only relevant if removeConnInfo - * is equal to true. - */ + /// How long the closed connections will not be cleaned up. The value is expressed in seconds. If the value is + /// set to 0 then TcpReassembly should use the default value. This parameter is only relevant if removeConnInfo + /// is equal to true. uint32_t closedConnectionDelay; - /** The maximum number of items to be cleaned up per one call of purgeClosedConnections. If the value is set to - * 0 then TcpReassembly should use the default value. This parameter is only relevant if removeConnInfo is equal - * to true. - */ + /// The maximum number of items to be cleaned up per one call of purgeClosedConnections. If the value is set to + /// 0 then TcpReassembly should use the default value. This parameter is only relevant if removeConnInfo is + /// equal to true. uint32_t maxNumToClean; - /** The maximum number of fragments with a non-matching sequence-number to store per connection flow before - packets are assumed permanently missed. If the value is 0, TcpReassembly should keep out of order fragments - indefinitely, or until a message from the paired side is seen. - */ + /// The maximum number of fragments with a non-matching sequence-number to store per connection flow before + /// packets are assumed permanently missed. If the value is 0, TcpReassembly should keep out of order fragments + /// indefinitely, or until a message from the paired side is seen. uint32_t maxOutOfOrderFragments; - /** To enable to clear buffer once packet contains data from a different side than the side seen before - */ + /// To enable to clear buffer once packet contains data from a different side than the side seen before bool enableBaseBufferClearCondition; /// A c'tor for this struct @@ -253,9 +249,9 @@ namespace pcpp /// An enum for connection end reasons enum ConnectionEndReason { - /** Connection ended because of FIN or RST packet */ + /// Connection ended because of FIN or RST packet TcpReassemblyConnectionClosedByFIN_RST, - /** Connection ended manually by the user */ + /// Connection ended manually by the user TcpReassemblyConnectionClosedManually }; diff --git a/Packet++/header/TextBasedProtocol.h b/Packet++/header/TextBasedProtocol.h index 932f1f00ac..67e109ca7f 100644 --- a/Packet++/header/TextBasedProtocol.h +++ b/Packet++/header/TextBasedProtocol.h @@ -8,7 +8,7 @@ namespace pcpp { -/** End of header */ +/// End of header #define PCPP_END_OF_TEXT_BASED_PROTOCOL_HEADER "" class TextBasedProtocolMessage; diff --git a/Packet++/header/TpktLayer.h b/Packet++/header/TpktLayer.h index fc5d0bd268..a5ba143861 100644 --- a/Packet++/header/TpktLayer.h +++ b/Packet++/header/TpktLayer.h @@ -14,11 +14,11 @@ namespace pcpp #pragma pack(push, 1) struct tpkthdr { - /** message version */ + /// message version uint8_t version; - /** message reserved */ + /// message reserved uint8_t reserved; - /** message length */ + /// message length uint16_t length; }; #pragma pack(pop) diff --git a/Packet++/header/UdpLayer.h b/Packet++/header/UdpLayer.h index 4e100ef4ea..54446d1626 100644 --- a/Packet++/header/UdpLayer.h +++ b/Packet++/header/UdpLayer.h @@ -13,13 +13,13 @@ namespace pcpp #pragma pack(push, 1) struct udphdr { - /** Source port */ + /// Source port uint16_t portSrc; - /** Destination port */ + /// Destination port uint16_t portDst; - /** Length of header and payload in bytes */ + /// Length of header and payload in bytes uint16_t length; - /** Error-checking of the header and data */ + /// Error-checking of the header and data uint16_t headerChecksum; }; #pragma pack(pop) diff --git a/Packet++/header/VlanLayer.h b/Packet++/header/VlanLayer.h index 52d96d701d..d847c31574 100644 --- a/Packet++/header/VlanLayer.h +++ b/Packet++/header/VlanLayer.h @@ -14,17 +14,15 @@ namespace pcpp #pragma pack(push, 1) struct vlan_header { - /** - @verbatim - 0 1 2 - 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - |Prio |C| VLAN ID | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - @endverbatim - */ - uint16_t vlan; - /** Ethernet type for next layer */ + /// @verbatim + /// 0 1 2 + /// 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 + /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + /// |Prio |C| VLAN ID | + /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + /// @endverbatim + uint16_t vlan; + /// Ethernet type for next layer uint16_t etherType; }; #pragma pack(pop) @@ -61,8 +59,8 @@ namespace pcpp return reinterpret_cast(m_Data); } - /// Get the VLAN ID value. This method differs from vlan_header#vlanID because vlan_header#vlanID is 12 bits long - /// in a 16 bit field. This methods extracts only the 12 bit relevant for the VLAN ID + /// Get the VLAN ID value. This method differs from vlan_header#vlanID because vlan_header#vlanID is 12 bits + /// long in a 16 bit field. This methods extracts only the 12 bit relevant for the VLAN ID /// @return VLAN ID value /// @todo Verify it works in big endian machines as well uint16_t getVlanID() const; diff --git a/Packet++/header/VrrpLayer.h b/Packet++/header/VrrpLayer.h index 6e2e552c1f..bb9b0f25b7 100644 --- a/Packet++/header/VrrpLayer.h +++ b/Packet++/header/VrrpLayer.h @@ -65,37 +65,37 @@ namespace pcpp struct vrrp_header { #if (BYTE_ORDER == LITTLE_ENDIAN) - /** Type */ + /// Type uint8_t type : 4; - /** Version bits */ + /// Version bits uint8_t version : 4; #else - /** Version bits */ + /// Version bits uint8_t version : 4; - /** Type */ + /// Type uint8_t type : 4; #endif - /** The Virtual Router Identifier (VRID) field identifies the virtual router this packet is reporting status - * for*/ + /// The Virtual Router Identifier (VRID) field identifies the virtual router this packet is reporting status + /// for uint8_t vrId; - /** This specifies the sending VRRP router's priority for the virtual router */ + /// This specifies the sending VRRP router's priority for the virtual router uint8_t priority; - /** Specifies how many IPvX addresses are present in this Packet */ + /// Specifies how many IPvX addresses are present in this Packet uint8_t ipAddrCount; - /** This specifies authentication type(v2) or (Max) Advertisement interval (in seconds(v2) or - * centi-seconds(v3)). */ + /// This specifies authentication type(v2) or (Max) Advertisement interval (in seconds(v2) or + /// centi-seconds(v3)). uint16_t authTypeAdvInt; - /** This specifies checksum field that is used to detect data corruption in the VRRP message. - * VRRPv2 uses normal checksum algorithm, while VRRPv3 uses "pseudo-header" checksum algorithm. */ + /// This specifies checksum field that is used to detect data corruption in the VRRP message. + /// VRRPv2 uses normal checksum algorithm, while VRRPv3 uses "pseudo-header" checksum algorithm. uint16_t checksum; - /** This specifies one or more IPvX addresses that are associated with the virtual router. */ + /// This specifies one or more IPvX addresses that are associated with the virtual router. uint8_t* ipAddresses[]; }; @@ -141,23 +141,23 @@ namespace pcpp /// VRRP message types enum VrrpType { - /** Unknown VRRP message */ + /// Unknown VRRP message VrrpType_Unknown = 0, - /** VRRP advertisement message */ + /// VRRP advertisement message VrrpType_Advertisement = 1 }; /// An enum describing VRRP special priority values enum VrrpPriority { - /** Default priority for a backup VRRP router (value of 100) */ + /// Default priority for a backup VRRP router (value of 100) Default, - /** Current Master has stopped participating in VRRP (value of 0) */ + /// Current Master has stopped participating in VRRP (value of 0) Stop, - /** This VRRP router owns the virtual router's IP address(es) (value of 255) */ + /// This VRRP router owns the virtual router's IP address(es) (value of 255) Owner, - /** Other priority */ + /// Other priority Other }; @@ -280,15 +280,15 @@ namespace pcpp /// VRRP v2 authentication types enum class VrrpAuthType : uint8_t { - /** No Authentication */ + /// No Authentication NoAuthentication = 0, - /** Simple Text Password */ + /// Simple Text Password SimpleTextPassword = 1, - /** IP Authentication Header */ + /// IP Authentication Header IPAuthenticationHeader = 2, - /** Cisco VRRP MD5 Authentication */ + /// Cisco VRRP MD5 Authentication MD5 = 3, - /** Other/Unknown Authentication Type */ + /// Other/Unknown Authentication Type Other = 4 }; diff --git a/Packet++/header/VxlanLayer.h b/Packet++/header/VxlanLayer.h index c0421c6b2f..13408c1631 100644 --- a/Packet++/header/VxlanLayer.h +++ b/Packet++/header/VxlanLayer.h @@ -14,51 +14,51 @@ namespace pcpp struct vxlan_header { #if (BYTE_ORDER == LITTLE_ENDIAN) - /** Reserved bits */ + /// Reserved bits uint16_t reserved6_8 : 3; - /** VNI present flag */ + /// VNI present flag uint16_t vniPresentFlag : 1; - /** Reserved bits */ + /// Reserved bits uint16_t reserved2_4 : 3; - /** GBP flag */ + /// GBP flag uint16_t gbpFlag : 1; - /** Reserved bits */ + /// Reserved bits uint16_t reserved14_16 : 3; - /** Policy applied flag */ + /// Policy applied flag uint16_t policyAppliedFlag : 1; - /** Reserved bits */ + /// Reserved bits uint16_t reserved11_12 : 2; - /** Don't learn flag */ + /// Don't learn flag uint16_t dontLearnFlag : 1; - /** Reserved bits */ + /// Reserved bits uint16_t reserved9 : 1; #else - /** Reserved bits */ + /// Reserved bits uint16_t reserved9 : 1; - /** Don't learn flag */ + /// Don't learn flag uint16_t dontLearnFlag : 1; - /** Reserved bits */ + /// Reserved bits uint16_t reserved11_12 : 2; - /** Policy applied flag */ + /// Policy applied flag uint16_t policyAppliedFlag : 1; - /** Reserved bits */ + /// Reserved bits uint16_t reserved14_16 : 3; - /** GBP flag */ + /// GBP flag uint16_t gbpFlag : 1; - /** Reserved bits */ + /// Reserved bits uint16_t reserved2_4 : 3; - /** VNI present flag */ + /// VNI present flag uint16_t vniPresentFlag : 1; - /** Reserved bits */ + /// Reserved bits uint16_t reserved6_8 : 3; #endif - /** Group Policy ID */ + /// Group Policy ID uint16_t groupPolicyID; - /** VXLAN Network ID (VNI) */ + /// VXLAN Network ID (VNI) uint32_t vni : 24; - /** Reserved bits */ + /// Reserved bits uint32_t pad : 8; }; #pragma pack(pop) diff --git a/Packet++/header/WireGuardLayer.h b/Packet++/header/WireGuardLayer.h index 1bd1552277..567187505a 100644 --- a/Packet++/header/WireGuardLayer.h +++ b/Packet++/header/WireGuardLayer.h @@ -20,9 +20,9 @@ namespace pcpp /// Represents the common header for all WireGuard message types struct wg_common_header { - /** Message type field */ + /// Message type field uint8_t messageType; - /** Reserved field (3 bytes) */ + /// Reserved field (3 bytes) uint8_t reserved[3]; }; #pragma pack(pop) @@ -37,15 +37,15 @@ namespace pcpp /// WireGuard message types enum class WireGuardMessageType { - /** Unknown Initiation message */ + /// Unknown Initiation message Unknown = 0, - /** Handshake Initiation message */ + /// Handshake Initiation message HandshakeInitiation = 1, - /** Handshake Response message */ + /// Handshake Response message HandshakeResponse = 2, - /** Cookie Reply message */ + /// Cookie Reply message CookieReply = 3, - /** Transport Data message */ + /// Transport Data message TransportData = 4 }; @@ -131,17 +131,17 @@ namespace pcpp /// Represents the Handshake Initiation message structure typedef struct wg_handshake_initiation : wg_common_header { - /** Sender index */ + /// Sender index uint32_t senderIndex; - /** Initiator's ephemeral public key */ + /// Initiator's ephemeral public key uint8_t initiatorEphemeral[32]; - /** Encrypted initiator's static key */ + /// Encrypted initiator's static key uint8_t encryptedInitiatorStatic[48]; - /** Encrypted timestamp */ + /// Encrypted timestamp uint8_t encryptedTimestamp[28]; - /** MAC1 field */ + /// MAC1 field uint8_t mac1[16]; - /** MAC2 field */ + /// MAC2 field uint8_t mac2[16]; } wg_handshake_initiation; #pragma pack(pop) @@ -227,17 +227,17 @@ namespace pcpp /// Represents the Handshake Response message structure typedef struct wg_handshake_response : wg_common_header { - /** Sender index */ + /// Sender index uint32_t senderIndex; - /** Receiver index */ + /// Receiver index uint32_t receiverIndex; - /** Responder's ephemeral public key */ + /// Responder's ephemeral public key uint8_t responderEphemeral[32]; - /** Encrypted empty field */ + /// Encrypted empty field uint8_t encryptedEmpty[16]; - /** MAC1 field */ + /// MAC1 field uint8_t mac1[16]; - /** MAC2 field */ + /// MAC2 field uint8_t mac2[16]; } wg_handshake_response; #pragma pack(pop) @@ -323,11 +323,11 @@ namespace pcpp /// Represents the Cookie Reply message structure typedef struct wg_cookie_reply : wg_common_header { - /** Receiver index */ + /// Receiver index uint32_t receiverIndex; - /** Nonce field */ + /// Nonce field uint8_t nonce[24]; - /** Encrypted cookie */ + /// Encrypted cookie uint8_t encryptedCookie[32]; } wg_cookie_reply; #pragma pack(pop) @@ -390,11 +390,11 @@ namespace pcpp /// Represents the Transport Data message structure typedef struct wg_transport_data : wg_common_header { - /** Receiver index */ + /// Receiver index uint32_t receiverIndex; - /** Counter field */ + /// Counter field uint64_t counter; - /** Flexible array member for encrypted data */ + /// Flexible array member for encrypted data uint8_t encryptedData[0]; } wg_transport_data; #pragma pack(pop) diff --git a/Packet++/src/IcmpV6Layer.cpp b/Packet++/src/IcmpV6Layer.cpp index 247eee2cca..000031845c 100644 --- a/Packet++/src/IcmpV6Layer.cpp +++ b/Packet++/src/IcmpV6Layer.cpp @@ -75,12 +75,11 @@ namespace pcpp void IcmpV6Layer::calculateChecksum() { - /* Pseudo header of 40 bytes which is composed as follows(in order): - - 16 bytes for the source address - - 16 bytes for the destination address - - 4 bytes big endian payload length(the same value as in the IPv6 header) - - 3 bytes zero + 1 byte nextheader( 58 decimal) big endian - */ + // Pseudo header of 40 bytes which is composed as follows(in order): + // - 16 bytes for the source address + // - 16 bytes for the destination address + // - 4 bytes big endian payload length(the same value as in the IPv6 header) + // - 3 bytes zero + 1 byte nextheader( 58 decimal) big endian getIcmpv6Header()->checksum = 0; @@ -103,7 +102,7 @@ namespace pcpp vec[1].buffer = pseudoHeader; vec[1].len = pseudoHeaderLen; - /* Calculate and write checksum */ + // Calculate and write checksum getIcmpv6Header()->checksum = htobe16(computeChecksum(vec, 2)); } } diff --git a/Packet++/src/NflogLayer.cpp b/Packet++/src/NflogLayer.cpp index 2533a8d660..3dc6f94480 100644 --- a/Packet++/src/NflogLayer.cpp +++ b/Packet++/src/NflogLayer.cpp @@ -9,9 +9,9 @@ namespace pcpp { -/** IPv4 protocol */ +/// IPv4 protocol #define PCPP_WS_NFPROTO_IPV4 2 -/** IPv6 protocol */ +/// IPv6 protocol #define PCPP_WS_NFPROTO_IPV6 10 uint8_t NflogLayer::getFamily() diff --git a/Packet++/src/SSLHandshake.cpp b/Packet++/src/SSLHandshake.cpp index 0517c60b35..d7a0328517 100644 --- a/Packet++/src/SSLHandshake.cpp +++ b/Packet++/src/SSLHandshake.cpp @@ -685,10 +685,10 @@ namespace pcpp return result; } -#define A 54059 /* a prime */ -#define B 76963 /* another prime */ -#define C 86969 /* yet another prime */ -#define FIRST_HASH 37 /* also prime */ +#define A 54059 ///< a prime +#define B 76963 ///< another prime +#define C 86969 ///< yet another prime +#define FIRST_HASH 37 ///< also prime static uint32_t hashString(std::string str) { diff --git a/Packet++/src/SomeIpLayer.cpp b/Packet++/src/SomeIpLayer.cpp index 8149043e18..1c7bdec1c3 100644 --- a/Packet++/src/SomeIpLayer.cpp +++ b/Packet++/src/SomeIpLayer.cpp @@ -45,7 +45,7 @@ namespace pcpp Layer* SomeIpLayer::parseSomeIpLayer(uint8_t* data, size_t dataLen, Layer* prevLayer, Packet* packet) { - /* Ideas taken from wireshark some ip dissector */ + // Ideas taken from wireshark some ip dissector const size_t headerLen = sizeof(someiphdr); if (dataLen < headerLen) return new PayloadLayer(data, dataLen, prevLayer, packet); diff --git a/Packet++/src/SomeIpSdLayer.cpp b/Packet++/src/SomeIpSdLayer.cpp index 907a27cd89..33aa48e819 100644 --- a/Packet++/src/SomeIpSdLayer.cpp +++ b/Packet++/src/SomeIpSdLayer.cpp @@ -39,7 +39,7 @@ namespace pcpp someipsdhdroptionsbase* optionHdr = getSomeIpSdOptionHeader(); optionHdr->type = static_cast(type); - /* Length field is excluding length field itself and uint8_t type field */ + // Length field is excluding length field itself and uint8_t type field optionHdr->length = htobe16((uint16_t)(m_DataLen - sizeof(optionHdr->length) - sizeof(optionHdr->type))); } diff --git a/Packet++/src/VrrpLayer.cpp b/Packet++/src/VrrpLayer.cpp index 5e9be6f6ca..1036d71ea0 100644 --- a/Packet++/src/VrrpLayer.cpp +++ b/Packet++/src/VrrpLayer.cpp @@ -11,9 +11,9 @@ namespace pcpp { -#define VRRP_PRIO_STOP 0 /* priority to stop */ -#define VRRP_PRIO_DEF 100 /* default priority */ -#define VRRP_PRIO_OWNER 255 /* priority of the ip owner */ +#define VRRP_PRIO_STOP 0 ///< priority to stop +#define VRRP_PRIO_DEF 100 ///< default priority +#define VRRP_PRIO_OWNER 255 ///< priority of the ip owner #define VRRP_PACKET_FIX_LEN 8 #define VRRP_PACKET_MAX_IP_ADDRESS_NUM 255