decode: spelling

pull/8828/head
Victor Julien 2 years ago
parent f28459ed78
commit 79d5caacd0

@ -33,7 +33,7 @@
#define ETHERNET_TYPE_PUP 0x0200 /* PUP protocol */
#define ETHERNET_TYPE_IP 0x0800
#define ETHERNET_TYPE_ARP 0x0806
#define ETHERNET_TYPE_BRIDGE 0x6558 /* transparant ethernet bridge (GRE) */
#define ETHERNET_TYPE_BRIDGE 0x6558 /* transparent ethernet bridge (GRE) */
#define ETHERNET_TYPE_REVARP 0x8035
#define ETHERNET_TYPE_EAPOL 0x888e
#define ETHERNET_TYPE_IPV6 0x86dd

@ -445,7 +445,7 @@ const struct DecodeEvents_ DEvents[] = {
ESP_PKT_TOO_SMALL,
},
/* Fragmentation reasembly events. */
/* Fragmentation reassembly events. */
{
"decoder.ipv4.frag_pkt_too_large",
IPV4_FRAG_PKT_TOO_LARGE,

@ -148,12 +148,12 @@ void DecodeGeneveConfig(void)
static inline bool IsValidGeneveVersion(const GeneveHeader *geneve_hdr)
{
const int valid_verisons[] = VALID_GENEVE_VERSIONS;
const int num_versions = sizeof(valid_verisons) / sizeof(int);
const int valid_versions[] = VALID_GENEVE_VERSIONS;
const int num_versions = sizeof(valid_versions) / sizeof(int);
const uint8_t cur_version = GENEVE_VERSION(geneve_hdr);
for (int i = 0; i < num_versions; i++) {
if (valid_verisons[i] == cur_version)
if (valid_versions[i] == cur_version)
return true;
}

@ -1132,7 +1132,7 @@ static int ICMPV6EchoRepTest02(void)
PASS;
}
/**\test icmpv6 packet decoding and setting up of payload_len and payload buufer
/**\test icmpv6 packet decoding and setting up of payload_len and payload buffer
* \retval retval 0 = Error ; 1 = ok
*/
static int ICMPV6PayloadTest01(void)
@ -1556,8 +1556,7 @@ void DecodeICMPV6RegisterTests(void)
#ifdef UNITTESTS
UtRegisterTest("ICMPV6CalculateValidChecksumtest01",
ICMPV6CalculateValidChecksumtest01);
UtRegisterTest("ICMPV6CalculateInValidChecksumtest02",
ICMPV6CalculateInvalidChecksumtest02);
UtRegisterTest("ICMPV6CalculateInvalidChecksumtest02", ICMPV6CalculateInvalidChecksumtest02);
UtRegisterTest("ICMPV6ParamProbTest01 (Valid)", ICMPV6ParamProbTest01);
UtRegisterTest("ICMPV6DestUnreachTest01 (Valid)", ICMPV6DestUnreachTest01);

@ -200,7 +200,7 @@ static int IPV4OptValidateCIPSO(Packet *p, const IPV4Opt *o)
#if 0
/* Domain of Interest (DOI) of 0 is reserved and thus invalid */
/** \todo Aparently a DOI of zero is fine in practice - verify. */
/** \todo Apparently a DOI of zero is fine in practice - verify. */
if (doi == 0) {
ENGINE_SET_EVENT(p,IPV4_OPT_MALFORMED);
return -1;

@ -184,7 +184,7 @@ void DecodeIPV4RegisterTests(void);
/** ----- Inline functions ----- */
/**
* \brief Calculateor validate the checksum for the IP packet
* \brief Calculate or validate the checksum for the IP packet
*
* \param pkt Pointer to the start of the IP packet
* \param hlen Length of the IP header

@ -862,14 +862,12 @@ static int DecodeIPV6RouteTest01 (void)
*/
static int DecodeIPV6HopTest01 (void)
{
uint8_t raw_pkt1[] = {
0x60,0x00,0x00,0x00,0x00,0x20,0x00,0x01,0xfe,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
0x02,0x0f,0xfe,0xff,0xfe,0x98,0x3d,0x01,0xff,0x02,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x3a,0x00,0xff, /* 0xff is a nonsene opt */
0x02,0x00,0x00,0x00,0x00,
0x82,0x00,0x1c,0x6f,0x27,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
uint8_t raw_pkt1[] = { 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x01, 0xfe, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x02, 0x0f, 0xfe, 0xff, 0xfe, 0x98, 0x3d, 0x01, 0xff, 0x02, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x3a, 0x00,
0xff, /* 0xff is a nonsense opt */
0x02, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x1c, 0x6f, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
Packet *p1 = PacketGetFromAlloc();
FAIL_IF(unlikely(p1 == NULL));
ThreadVars tv;

@ -21,13 +21,12 @@
* @{
*/
/**
* \file
*
* \author Victor Julien <victor@inliniac.net>
*
* Decode linkype null:
* Decode linktype null:
* http://www.tcpdump.org/linktypes.html
*/

@ -51,7 +51,7 @@
#define PPP_DECNETCP 0x8027 /* DECnet Control Protocol */
#define PPP_APPLECP 0x8029 /* Appletalk Control Protocol */
#define PPP_IPXCP 0x802b /* Novell IPX Control Protocol */
#define PPP_STIICP 0x8033 /* Strean Protocol Control Protocol */
#define PPP_STIICP 0x8033 /* Stream Protocol Control Protocol */
#define PPP_VINESCP 0x8035 /* Banyan Vines Control Protocol */
#define PPP_IPV6CP 0x8057 /* IPv6 Control Protocol */
#define PPP_MPLSCP 0x8281 /* rfc 3022 */

@ -376,7 +376,7 @@ static int DecodePPPOEtest04 (void)
}
/** DecodePPPOEtest05
* \brief Valid exaple PADO PPPOE packet taken from RFC2516, but too short for given length
* \brief Valid example PADO PPPOE packet taken from RFC2516, but too short for given length
* \retval 0 Expected test value
*/
static int DecodePPPOEtest05 (void)

@ -25,8 +25,7 @@
#ifndef __DECODE_TEMPLATE_H__
#define __DECODE_TEMPLATE_H__
/* Header layout. Keep things like alignment and endianess in
/* Header layout. Keep things like alignment and endianness in
* mind while constructing this. */
typedef struct TemplateHdr_ {

Loading…
Cancel
Save