1
0
mirror of https://github.com/nmap/nmap.git synced 2026-02-13 17:06:34 +00:00

Spellcheck: common misspellings in the entire source tree

This commit is contained in:
dmiller
2014-02-21 21:10:51 +00:00
parent 3f5e909e8f
commit ddcfa8cc90
38 changed files with 52 additions and 52 deletions

View File

@@ -427,7 +427,7 @@ int HopByHopHeader::addOption(u8 type, u8 len, const u8 *data){
/* If the current length of the extension header is not a multiple of 8 octets,
* this method adds the neccessary padding (either PadN or Pad1 options)*/
* this method adds the necessary padding (either PadN or Pad1 options)*/
int HopByHopHeader::addPadding(){
u8 zeroes[8]={0,0,0,0,0,0,0,0};
int required_octets=8-(this->length%8);

View File

@@ -1029,7 +1029,7 @@ u32 ICMPv4Header::getOutputLinkMTU() const {
} /* End of getOutputLinkMTU() */
/* Miscellanious *************************************************************/
/* Miscellaneous *************************************************************/
/** Returns the standard ICMP header length for the supplied ICMP message type.
* @warning Return value corresponds strictly to the ICMP header, this is,
* the minimum length of the ICMP header, variable length payload is never

View File

@@ -665,7 +665,7 @@ int IPv4Header::setOpts(const char *txt){
int IPv4Header::setOpts(u8 *opts_buff, u32 opts_len){
if(opts_buff==NULL || opts_len==0)
return OP_FAILURE;
assert(opts_len<=MAX_IP_OPTIONS_LEN); /* Max lenght for IP options */
assert(opts_len<=MAX_IP_OPTIONS_LEN); /* Max length for IP options */
memcpy(this->h.options, opts_buff, opts_len);
this->ipoptlen=opts_len;
this->length += opts_len;

View File

@@ -130,7 +130,7 @@
#include "NetworkLayerElement.h"
#define IP_RF 0x8000 /* Reserved fragment flag */
#define IP_DF 0x4000 /* Dont fragment flag */
#define IP_DF 0x4000 /* Don't fragment flag */
#define IP_MF 0x2000 /* More fragments flag */
#define IP_OFFMASK 0x1fff /* Mask for fragmenting bits */
#define IP_HEADER_LEN 20 /* Length of the standard header */
@@ -213,7 +213,7 @@ class IPv4Header : public NetworkLayerElement {
int setTOS(u8 v);
u8 getTOS() const;
/* Total lenght of the datagram */
/* Total length of the datagram */
int setTotalLength();
int setTotalLength(u16 l);
u16 getTotalLength() const;

View File

@@ -253,7 +253,7 @@ class PacketElement {
} /* End of getBinaryBuffer() */
/** Returns the lenght of this PacketElement + the length of all the
/** Returns the length of this PacketElement + the length of all the
* PacketElements that are next to it (are linked trough the "next"
* attribute). So for example, if we have IPv4Header p1, linked to
* a TCPHeader p2, representing a simple TCP SYN with no options,

View File

@@ -169,7 +169,7 @@ int RoutingHeader::storeRecvData(const u8 *buf, size_t len){
this->length=0;
return OP_FAILURE;
}else{
/* Store the first 4 bytes, so we can access lenght and routing type */
/* Store the first 4 bytes, so we can access length and routing type */
memcpy(&(this->h), buf, 4);
/* Our behaviour is different depending on the routing type. */

View File

@@ -338,26 +338,26 @@ int UDPHeader::setTotalLength(){
* here because UDP is supposed to be independent of IPv4, IPv6 or
* whatever other network layer protocol is used to carry the UDP datagrams.*/
if ((mylen+otherslen) > 65535 || (mylen+otherslen)<8 ){
printf("UDPHeader::setTotalLenght(): Invalid length.\n");
printf("UDPHeader::setTotalLength(): Invalid length.\n");
return OP_FAILURE;
}
h.uh_ulen=htons( mylen+otherslen );
return OP_SUCCESS;
} /* End of setTotalLenght() */
} /* End of setTotalLength() */
/** @warning Supplied value MUST be in HOST byte order */
int UDPHeader::setTotalLength(u16 l){
this->h.uh_ulen=htons(l);
return OP_SUCCESS;
} /* End of setTotalLenght() */
} /* End of setTotalLength() */
/** @warning Returned value is in HOST byte order */
u16 UDPHeader::getTotalLength() const {
return ntohs(this->h.uh_ulen);
} /* End of getTotalLenght() */
} /* End of getTotalLength() */