Skip to content

Commit

Permalink
Merge pull request #531 from GabrielGanne/typos
Browse files Browse the repository at this point in the history
fix typos throughout the repository
  • Loading branch information
fklassen authored Dec 27, 2018
2 parents 2d87447 + e1d044f commit 0fc5a8f
Show file tree
Hide file tree
Showing 56 changed files with 98 additions and 98 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ AC_ARG_WITH(libpcap,
# and was created to address portability issues. Unfortunately, the script is not updated properly
# outside of the base distribution. Examples: PF_RING requires 'pthreads', 'numa' and 'rt', but
# this is not reflect that in the script. OS X Xcode 10.11 SDK creates its own very broken
# 'pcap-config' script that only occassionally works for dynamic defintions, and defintely
# 'pcap-config' script that only occasionally works for dynamic definitions, and defintely
# does not work for static.
#
# The ability to enable this script exists for corner cases where libpcap distributions starts
Expand Down
6 changes: 3 additions & 3 deletions docs/TODO
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ GENERAL:

+ Re-organize source tree

+ tcpdump decoder should print packets syncronously w/ the main process
+ tcpdump decoder should print packets synchronously w/ the main process

+ Better use of GNU Autotools

Expand All @@ -37,7 +37,7 @@ GENERAL:
- Detect system version of libopts b/c we need a recent version

+ Generalize packet editing and printing code so it can be shipped as a
seperate library and plugged into tcpreplay/tcprewrite/flowreplay/etc
separate library and plugged into tcpreplay/tcprewrite/flowreplay/etc

+ See about removing libnet_init() from all binaries other then tcprewrite
so we don't have to run as root:
Expand Down Expand Up @@ -101,7 +101,7 @@ TCPREWRITE:
that tcpreplay can be more optimized
? perhaps use libnetdude?
? make into a library?
+ definately put it into a seperate binary (tcprewrite)
+ definitely put it into a separate binary (tcprewrite)

- Add the ability to modify packet data via regex(es) in tcprewrite
- Should support pcre
Expand Down
2 changes: 1 addition & 1 deletion doxygen.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ SHOW_DIRECTORIES = YES
# version control system). Doxygen will invoke the program by executing (via
# popen()) the command <command> <input-file>, where <command> is the value of
# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
# provided by doxygen. Whatever the progam writes to standard output
# provided by doxygen. Whatever the program writes to standard output
# is used as the file version. See the manual for examples.

FILE_VERSION_FILTER =
Expand Down
4 changes: 2 additions & 2 deletions src/bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ do_bridge_unidirectional(tcpbridge_opt_t *options, tcpedit_t *tcpedit)

/**
* main loop for bridging in both directions. Since we dealing with two handles
* we need to poll() on them which isn't the most efficent
* we need to poll() on them which isn't the most efficient
*/
static void
do_bridge_bidirectional(tcpbridge_opt_t *options, tcpedit_t *tcpedit)
Expand Down Expand Up @@ -245,7 +245,7 @@ do_bridge(tcpbridge_opt_t *options, tcpedit_t *tcpedit)

/**
* This is the callback we use with pcap_dispatch to process
* each packet recieved by libpcap on the two interfaces.
* each packet received by libpcap on the two interfaces.
* Need to return > 0 to denote success
*/
static int
Expand Down
2 changes: 1 addition & 1 deletion src/common/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

/*
* CACHEVERSION History:
* 01 - Inital release. 1 bit of data/packet (primary or secondary nic)
* 01 - Initial release. 1 bit of data/packet (primary or secondary nic)
* 02 - 2 bits of data/packet (drop/send & primary or secondary nic)
* 03 - Write integers in network-byte order
* 04 - Increase num_packets from 32 to 64 bit integer
Expand Down
2 changes: 1 addition & 1 deletion src/common/fakepcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

/*
* This file impliments missing libpcap functions which only exist in really
* This file implements missing libpcap functions which only exist in really
* recent versions of libpcap. We assume the user has at least 0.6, so anything
* after that needs to be re-implimented here unless we want to start
* requiring a newer version
Expand Down
2 changes: 1 addition & 1 deletion src/common/fakepcapnav.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* along with the Tcpreplay Suite. If not, see <http://www.gnu.org/licenses/>.
*/

/* This file impliments a fake, non-functioning version of the libpcapnav
/* This file implements a fake, non-functioning version of the libpcapnav
* API based on libpcap. It's solely here for people who don't have
* libpcapnav installed on their system, and to keep the code maintainable.
*/
Expand Down
6 changes: 3 additions & 3 deletions src/common/get.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ get_ipv4(const u_char *pktdata, int datalen, int datalink, u_char **newbuff)
ip_hdr = *newbuff;
} else {

/* we don't have to do a memcpy if l2_len lands on a boundry */
/* we don't have to do a memcpy if l2_len lands on a boundary */
ip_hdr = (pktdata + l2_len);
}
#else
Expand Down Expand Up @@ -332,7 +332,7 @@ get_ipv6(const u_char *pktdata, int datalen, int datalink, u_char **newbuff)
ip6_hdr = *newbuff;
} else {

/* we don't have to do a memcpy if l2_len lands on a boundry */
/* we don't have to do a memcpy if l2_len lands on a boundary */
ip6_hdr = (pktdata + l2_len);
}
#else
Expand Down Expand Up @@ -438,7 +438,7 @@ get_layer4_v6(const ipv6_hdr_t *ip6_hdr, const int len)


/**
* returns the next payload or header of the current extention header
* returns the next payload or header of the current extension header
* returns NULL for none/ESP.
*/
void *
Expand Down
2 changes: 1 addition & 1 deletion src/common/netmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ sendpacket_open_netmap(const char *device, char *errbuf, void *arg) {
* The nmreq structure must have the NETMAP_API version for the running machine.
* However the binary may have been compiled on a different machine than the
* running machine. Discover the true netmap API version, and be careful to call
* fuctions that are available on all netmap versions.
* functions that are available on all netmap versions.
*/
if (sp->netmap_version >= 10) {
switch (*port) {
Expand Down
6 changes: 3 additions & 3 deletions src/common/sendpacket.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

/* sendpacket.[ch] is my attempt to write a universal packet injection
* API for BPF, libpcap, libdnet, and Linux's PF_PACKET. I got sick
* and tired dealing with libnet bugs and its lack of active maintenence,
* and tired dealing with libnet bugs and its lack of active maintenance,
* but unfortunately, libpcap frame injection support is relatively new
* and not everyone uses Linux, so I decided to support all four as
* best as possible. If your platform/OS/hardware supports an additional
Expand All @@ -37,7 +37,7 @@
* Right now, one big problem with the pcap_* methods is that libpcap
* doesn't provide a reliable method of getting the MAC address of
* an interface (required for tcpbridge).
* You can use PF_PACKET or BPF to get that, but if your system suports
* You can use PF_PACKET or BPF to get that, but if your system supports
* those, might as well inject directly without going through another
* level of indirection.
*
Expand Down Expand Up @@ -1008,7 +1008,7 @@ get_iface_index(int fd, const char *device, char *errbuf) {
}

/**
* get's the hardware address via Linux's PF packet interface
* gets the hardware address via Linux's PF packet interface
*/
static struct tcpr_ether_addr *
sendpacket_get_hwaddr_pf(sendpacket_t *sp)
Expand Down
2 changes: 1 addition & 1 deletion src/common/tcpdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ tcpdump_print(tcpdump_t *tcpdump, struct pcap_pkthdr *pkthdr, const u_char *data

res = poll(&poller, 1, TCPDUMP_POLL_TIMEOUT);
if (res < 0)
errx(-1, "Error out to fd %d during poll() to read frome tcpdump\n%s",
errx(-1, "Error out to fd %d during poll() to read from tcpdump\n%s",
PARENT_READ_FD, strerror(errno));

if (res == 0)
Expand Down
2 changes: 1 addition & 1 deletion src/common/txring.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ txring_put(txring_t *txp, const void * data, size_t length)
first_loop = 0;
}

/* check if we've runned over all ring */
/* check if we've ran over all ring */
if ((txp->tx_index == start_index) && !first_loop) {
errno = ENOBUFS;
return -1;
Expand Down
2 changes: 1 addition & 1 deletion src/common/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ read_hexstring(const char *l2string, u_char *hex, const int hexlen)

memset(hex, '\0', hexlen);

/* data is hex, comma seperated, byte by byte */
/* data is hex, comma separated, byte by byte */

/* get the first byte */
l2byte = strtok_r(string, ",", &token);
Expand Down
2 changes: 1 addition & 1 deletion src/defines.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ typedef enum tcpprep_mode_e {
#endif
#endif

/* convert IPv6 Extention Header Len value to bytes */
/* convert IPv6 Extension Header Len value to bytes */
#define IPV6_EXTLEN_TO_BYTES(x) ((x * 4) + 8)

#ifndef HAVE_UINT8_T
Expand Down
2 changes: 1 addition & 1 deletion src/fragroute/bget.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
configured to the needs of an application. BGET is efficient in
both the time needed to allocate and release buffers and in the
memory overhead required for buffer pool management. It
automatically consolidates contiguous space to minimise
automatically consolidates contiguous space to minimize
fragmentation. BGET is configured by compile-time definitions,
Major options include:
Expand Down
2 changes: 1 addition & 1 deletion src/fragroute/mod_ip_frag.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ ip_frag_apply(void *d, struct pktq *pktq)
{
struct pkt *pkt;

/* Select eth protocol via first packet in que: */
/* Select eth protocol via first packet in queue: */
pkt = TAILQ_FIRST(pktq);
if (pkt != TAILQ_END(pktq)) {
uint16_t eth_type = htons(pkt->pkt_eth->eth_type);
Expand Down
2 changes: 1 addition & 1 deletion src/send_packets.c
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ get_next_packet(tcpreplay_t *ctx, pcap_t *pcap, struct pcap_pkthdr *pkthdr, int
pktdata = safe_pcap_next(pcap, pkthdr);
}

/* this get's casted to a const on the way out */
/* this gets casted to a const on the way out */
return pktdata;
}

Expand Down
2 changes: 1 addition & 1 deletion src/tcpedit/dlt.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ dltrequires(tcpedit_t *tcpedit, int dlt)
case DLT_EN10MB:
/* case DLT_USER:
case DLT_VLAN: */
/* we have everthing we need in the original packet */
/* we have everything we need in the original packet */
break;

case DLT_NULL:
Expand Down
6 changes: 3 additions & 3 deletions src/tcpedit/edit_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ static int ipv6_header_length(ipv6_hdr_t const * ip6_hdr, int pkt_len);
/**
* this code re-calcs the IP and Layer 4 checksums
* the IMPORTANT THING is that the Layer 4 header
* is contiguious in memory after *ip_hdr we're actually
* is contiguous in memory after *ip_hdr we're actually
* writing to the layer 4 header via the ip_hdr ptr.
* (Yes, this sucks, but that's the way libnet works, and
* I was too lazy to re-invent the wheel.
* Returns 0 on sucess, -1 on error
* Returns 0 on success, -1 on error
*/
int
fix_ipv4_checksums(tcpedit_t *tcpedit, struct pcap_pkthdr *pkthdr, ipv4_hdr_t *ip_hdr)
Expand Down Expand Up @@ -1054,7 +1054,7 @@ randomize_iparp(tcpedit_t *tcpedit, struct pcap_pkthdr *pkthdr,
/**
* rewrite IP address (arp)
* uses -a to rewrite (map) one subnet onto another subnet
* pointer must point to the WHOLE and CONTIGOUS memory buffer
* pointer must point to the WHOLE and CONTIGUOUS memory buffer
* because the arp_hdr_t doesn't have the space for the IP/MAC
* addresses
* return 0 if no change, 1 or 2 if changed
Expand Down
4 changes: 2 additions & 2 deletions src/tcpedit/parse_args.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@


/**
* returns 0 for sucess w/o errors
* returns 1 for sucess w/ warnings
* returns 0 for success w/o errors
* returns 1 for success w/ warnings
* returns -1 for error
*/
int
Expand Down
4 changes: 2 additions & 2 deletions src/tcpedit/plugins/dlt_en10mb/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# add your .c files to libtcpedit_a_SOURCES
# add your .h files to noinst_HEADERS
# add any other files (like documentation, notes, etc) to EXTRA_DIST
# add your dependancy information (see comment below)
# add your dependency information (see comment below)

libtcpedit_a_SOURCES += \
%reldir%/en10mb.c \
Expand All @@ -18,7 +18,7 @@ noinst_HEADERS += \

EXTRA_DIST += %reldir%/en10mb_opts.def

# dependancies for your plugin source code. Edit as necessary
# dependencies for your plugin source code. Edit as necessary
en10mb.c: \
$(TCPEDIT_PLUGINS_DEPS) \
%reldir%/en10mb.h \
Expand Down
2 changes: 1 addition & 1 deletion src/tcpedit/plugins/dlt_en10mb/en10mb.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ dlt_en10mb_register(tcpeditdlt_t *ctx)


/*
* Initializer function. This function is called only once, if and only iif
* Initializer function. This function is called only once, if and only if
* this plugin will be utilized. Remember, if you need to keep track of any state,
* store it in your plugin->config, not a global!
* Returns: TCPEDIT_ERROR | TCPEDIT_OK | TCPEDIT_WARN
Expand Down
4 changes: 2 additions & 2 deletions src/tcpedit/plugins/dlt_hdlc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# add your .c files to libtcpedit_a_SOURCES
# add your .h files to noinst_HEADERS
# add any other files (like documentation, notes, etc) to EXTRA_DIST
# add your dependancy information (see comment below)
# add your dependency information (see comment below)

libtcpedit_a_SOURCES += \
%reldir%/hdlc.c \
Expand All @@ -17,7 +17,7 @@ noinst_HEADERS += \

EXTRA_DIST += %reldir%/hdlc_opts.def

# dependancies for your plugin source code. Edit as necessary
# dependencies for your plugin source code. Edit as necessary
hdlc.c: \
$(TCPEDIT_PLUGINS_DEPS) \
%reldir%/hdlc.h \
Expand Down
2 changes: 1 addition & 1 deletion src/tcpedit/plugins/dlt_hdlc/hdlc.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ dlt_hdlc_register(tcpeditdlt_t *ctx)


/*
* Initializer function. This function is called only once, if and only iif
* Initializer function. This function is called only once, if and only if
* this plugin will be utilized. Remember, if you need to keep track of any state,
* store it in your plugin->config, not a global!
* Returns: TCPEDIT_ERROR | TCPEDIT_OK | TCPEDIT_WARN
Expand Down
2 changes: 1 addition & 1 deletion src/tcpedit/plugins/dlt_hdlc/hdlc_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "hdlc_api.h"

/**
* \breif Set the HDLC control value
* \brief Set the HDLC control value
*
* Reasonable values are 0-255
*/
Expand Down
4 changes: 2 additions & 2 deletions src/tcpedit/plugins/dlt_ieee80211/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# add your .c files to libtcpedit_a_SOURCES
# add your .h files to noinst_HEADERS
# add any other files (like documentation, notes, etc) to EXTRA_DIST
# add your dependancy information (see comment below)
# add your dependency information (see comment below)

libtcpedit_a_SOURCES += \
%reldir%/ieee80211.c \
Expand All @@ -17,7 +17,7 @@ noinst_HEADERS += \

EXTRA_DIST += %reldir%/ieee80211_opts.def

# dependancies for your plugin source code. Edit as necessary
# dependencies for your plugin source code. Edit as necessary
ieee80211.c: \
$(TCPEDIT_PLUGINS_DEPS) \
%reldir%/ieee80211_hdr.c \
Expand Down
2 changes: 1 addition & 1 deletion src/tcpedit/plugins/dlt_ieee80211/ieee80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ dlt_ieee80211_register(tcpeditdlt_t *ctx)


/*
* Initializer function. This function is called only once, if and only iif
* Initializer function. This function is called only once, if and only if
* this plugin will be utilized. Remember, if you need to keep track of any state,
* store it in your plugin->config, not a global!
* Returns: TCPEDIT_ERROR | TCPEDIT_OK | TCPEDIT_WARN
Expand Down
4 changes: 2 additions & 2 deletions src/tcpedit/plugins/dlt_jnpr_ether/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# add your .c files to libtcpedit_a_SOURCES
# add your .h files to noinst_HEADERS
# add any other files (like documentation, notes, etc) to EXTRA_DIST
# add your dependancy information (see comment below)
# add your dependency information (see comment below)

libtcpedit_a_SOURCES += \
%reldir%/jnpr_ether.c \
Expand All @@ -17,7 +17,7 @@ noinst_HEADERS += \

EXTRA_DIST += %reldir%/jnpr_ether_opts.def

# dependancies for your plugin source code. Edit as necessary
# dependencies for your plugin source code. Edit as necessary
jnpr_ether.c: \
$(TCPEDIT_PLUGINS_DEPS) \
%reldir%/jnpr_ether.h \
Expand Down
2 changes: 1 addition & 1 deletion src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ dlt_jnpr_ether_register(tcpeditdlt_t *ctx)


/*
* Initializer function. This function is called only once, if and only iif
* Initializer function. This function is called only once, if and only if
* this plugin will be utilized. Remember, if you need to keep track of any state,
* store it in your plugin->config, not a global!
* Returns: TCPEDIT_ERROR | TCPEDIT_OK | TCPEDIT_WARN
Expand Down
4 changes: 2 additions & 2 deletions src/tcpedit/plugins/dlt_linuxsll/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# add your .c files to libtcpedit_a_SOURCES
# add your .h files to noinst_HEADERS
# add any other files (like documentation, notes, etc) to EXTRA_DIST
# add your dependancy information (see comment below)
# add your dependency information (see comment below)

libtcpedit_a_SOURCES += %reldir%/linuxsll.c

Expand All @@ -14,7 +14,7 @@ noinst_HEADERS += \

EXTRA_DIST += %reldir%/linuxsll_opts.def

# dependancies for your plugin source code. Edit as necessary
# dependencies for your plugin source code. Edit as necessary
linuxsll.c: \
$(TCPEDIT_PLUGINS_DEPS) \
%reldir%/../../tcpedit_api.h \
Expand Down
Loading

0 comments on commit 0fc5a8f

Please sign in to comment.