diff options
author | Bill Meier <wmeier@newsguy.com> | 2013-11-08 17:17:57 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2013-11-08 17:17:57 +0000 |
commit | 5a0809c718374e0162afb1fc1df8497f942d18fc (patch) | |
tree | fc7c486e0f93038e1f473a6bf60fc76a8610b782 | |
parent | 6159e98cd38ba8afa4e6587b75dfd82250357fd1 (diff) |
(Trivial) whitespace cleanup (mostly trailing whitespace).
svn path=/trunk/; revision=53172
-rw-r--r-- | wiretap/5views.c | 4 | ||||
-rw-r--r-- | wiretap/atm.c | 2 | ||||
-rw-r--r-- | wiretap/camins.c | 12 | ||||
-rw-r--r-- | wiretap/catapult_dct2000.c | 2 | ||||
-rw-r--r-- | wiretap/daintree-sna.c | 16 | ||||
-rw-r--r-- | wiretap/daintree-sna.h | 2 | ||||
-rw-r--r-- | wiretap/erf.c | 8 | ||||
-rw-r--r-- | wiretap/erf.h | 2 | ||||
-rw-r--r-- | wiretap/eyesdn.c | 24 | ||||
-rw-r--r-- | wiretap/file_access.c | 4 | ||||
-rw-r--r-- | wiretap/iseries.c | 4 | ||||
-rw-r--r-- | wiretap/k12.c | 4 | ||||
-rw-r--r-- | wiretap/lanalyzer.c | 2 | ||||
-rw-r--r-- | wiretap/libpcap.h | 4 | ||||
-rw-r--r-- | wiretap/mime_file.c | 2 | ||||
-rw-r--r-- | wiretap/mp2t.c | 2 | ||||
-rw-r--r-- | wiretap/mpeg.c | 12 | ||||
-rw-r--r-- | wiretap/netmon.c | 2 | ||||
-rw-r--r-- | wiretap/netscaler.c | 2 | ||||
-rw-r--r-- | wiretap/netscreen.c | 14 | ||||
-rw-r--r-- | wiretap/nettl.c | 6 | ||||
-rw-r--r-- | wiretap/network_instruments.c | 4 | ||||
-rw-r--r-- | wiretap/network_instruments.h | 2 | ||||
-rw-r--r-- | wiretap/netxray.c | 4 | ||||
-rw-r--r-- | wiretap/packetlogger.h | 2 | ||||
-rw-r--r-- | wiretap/peektagged.c | 2 | ||||
-rw-r--r-- | wiretap/visual.c | 32 | ||||
-rw-r--r-- | wiretap/wtap.c | 2 |
28 files changed, 89 insertions, 89 deletions
diff --git a/wiretap/5views.c b/wiretap/5views.c index 5e665a8e90..10a5ecc86c 100644 --- a/wiretap/5views.c +++ b/wiretap/5views.c @@ -348,7 +348,7 @@ gboolean _5views_dump_open(wtap_dumper *wdh, int *err) haven't yet written any packets. As we'll have to rewrite the header when we've written out all the packets, we just skip over the header for now. */ - if (wtap_dump_file_seek(wdh, sizeof(t_5VW_Capture_Header), SEEK_SET, err) == -1) + if (wtap_dump_file_seek(wdh, sizeof(t_5VW_Capture_Header), SEEK_SET, err) == -1) return FALSE; /* This is a 5Views file */ @@ -404,7 +404,7 @@ static gboolean _5views_dump_close(wtap_dumper *wdh, int *err) _5views_dump_t *_5views = (_5views_dump_t *)wdh->priv; t_5VW_Capture_Header file_hdr; - if (wtap_dump_file_seek(wdh, 0, SEEK_SET, err) == -1) + if (wtap_dump_file_seek(wdh, 0, SEEK_SET, err) == -1) return FALSE; /* fill in the Info_Header */ diff --git a/wiretap/atm.c b/wiretap/atm.c index 97d406bdfa..b9053e3f1f 100644 --- a/wiretap/atm.c +++ b/wiretap/atm.c @@ -72,7 +72,7 @@ atm_guess_traffic_type(const guint8 *pd, guint32 len, * guessing based on the contents, if we have enough data * to guess. */ - + if (len >= 3) { if (pd[0] == 0xaa && pd[1] == 0xaa && pd[2] == 0x03) { /* diff --git a/wiretap/camins.c b/wiretap/camins.c index 7163201420..c143567f71 100644 --- a/wiretap/camins.c +++ b/wiretap/camins.c @@ -86,7 +86,7 @@ typedef enum { SIZE_HAVE_NONE, SIZE_HAVE_LOW, SIZE_HAVE_HIGH, - SIZE_HAVE_ALL + SIZE_HAVE_ALL } size_read_t; #define RESET_STAT_VALS \ @@ -124,7 +124,7 @@ read_block(FILE_T fh, guint8 *buf, guint16 buf_len, int *err, gchar **err_info) } return FALSE; } - + return TRUE; } @@ -200,7 +200,7 @@ find_next_pkt_dat_type_len(FILE_T fh, static gint read_packet_data(FILE_T fh, guint8 dat_trans_type, guint8 *buf, guint16 dat_len, int *err, gchar **err_info) -{ +{ guint8 *p; guint8 block[2]; guint16 bytes_count = 0; @@ -224,7 +224,7 @@ read_packet_data(FILE_T fh, guint8 dat_trans_type, guint8 *buf, guint16 dat_len, else if (IS_TRANS_SIZE(block[1])) { /* go back before the size transaction block the next packet should be able to pick up this block */ - if (-1 == file_seek(fh, -(gint64)sizeof(block), SEEK_CUR, err)) + if (-1 == file_seek(fh, -(gint64)sizeof(block), SEEK_CUR, err)) return -1; break; } @@ -232,7 +232,7 @@ read_packet_data(FILE_T fh, guint8 dat_trans_type, guint8 *buf, guint16 dat_len, return bytes_count; } - + /* create a DVB-CI pseudo header return its length or -1 for error */ @@ -257,7 +257,7 @@ create_pseudo_hdr(guint8 *buf, guint8 dat_trans_type, guint16 dat_len) return DVB_CI_PSEUDO_HDR_LEN; } - + static gboolean camins_read_packet(FILE_T fh, struct wtap_pkthdr *phdr, Buffer *buf, int *err, gchar **err_info) diff --git a/wiretap/catapult_dct2000.c b/wiretap/catapult_dct2000.c index 605d60d2a3..756671554e 100644 --- a/wiretap/catapult_dct2000.c +++ b/wiretap/catapult_dct2000.c @@ -1231,7 +1231,7 @@ parse_line(gchar *linebuff, gint line_length, g_strlcpy(protocol_name, "sprint", MAX_PROTOCOL_NAME); } } - + if (!(*is_sprint)) { /* Now skip ahead to find start of data (marked by '$') */ for (; (linebuff[n] != '$') && (linebuff[n] != '\'') && (n+1 < line_length); n++); diff --git a/wiretap/daintree-sna.c b/wiretap/daintree-sna.c index a13eea01f7..f35e3cedc9 100644 --- a/wiretap/daintree-sna.c +++ b/wiretap/daintree-sna.c @@ -9,10 +9,10 @@ * By Gerald Combs <gerald@wireshark.org> * Copyright 1998 Gerald Combs * - * Started with packetlogger.c as a template, but little packetlogger code - * remains. Borrowed many snippets from dbs-etherwatch.c, the + * Started with packetlogger.c as a template, but little packetlogger code + * remains. Borrowed many snippets from dbs-etherwatch.c, the * daintree_sna_process_hex_data function having the largest chunk. - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 @@ -29,7 +29,7 @@ * USA. */ -/* This module reads capture files saved by Daintree's Sensor Network Analyzer. +/* This module reads capture files saved by Daintree's Sensor Network Analyzer. * Daintree captures are plain text files with a two line header, * followed by packet records, one per line, with whitespace separated fields * consisting of: packet number, time, bytes of capture data, capture data, @@ -37,7 +37,7 @@ */ /* Example capture file: - + #Format=4 # SNA v2.2.0.4 SUS:20090709 ACT:819705 1 1233783799.326400 10 030809ffffffff07ffff 42 1 -69 25 2 0 1 32767 @@ -96,7 +96,7 @@ static gboolean daintree_sna_process_hex_data(struct wtap_pkthdr *phdr, int daintree_sna_open(wtap *wth, int *err, gchar **err_info) { char readLine[DAINTREE_MAX_LINE_SIZE]; - guint i; + guint i; /* get first line of file header */ if (file_gets(readLine, DAINTREE_MAX_LINE_SIZE, wth->fh)==NULL) { @@ -111,7 +111,7 @@ int daintree_sna_open(wtap *wth, int *err, gchar **err_info) while (i < DAINTREE_MAGIC_TEXT_SIZE) { if (readLine[i] != daintree_magic_text[i]) return 0; /* not daintree format */ i++; - } + } /* read second header line */ if (file_gets(readLine, DAINTREE_MAX_LINE_SIZE, wth->fh)==NULL) { @@ -164,7 +164,7 @@ daintree_sna_read(wtap *wth, int *err, gchar **err_info, gint64 *data_offset) readData, err, err_info); } -/* Read the capture file randomly +/* Read the capture file randomly * Wireshark opens the capture file for random access when displaying user-selected packets */ static gboolean daintree_sna_seek_read(wtap *wth, gint64 seek_off, struct wtap_pkthdr *phdr, diff --git a/wiretap/daintree-sna.h b/wiretap/daintree-sna.h index 0b10d30a74..9f6e947574 100644 --- a/wiretap/daintree-sna.h +++ b/wiretap/daintree-sna.h @@ -20,7 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. - * + * */ #ifndef __DAINTREE_SNA_H__ diff --git a/wiretap/erf.c b/wiretap/erf.c index 6e7c782b00..238809390c 100644 --- a/wiretap/erf.c +++ b/wiretap/erf.c @@ -607,10 +607,10 @@ static gboolean erf_dump( if(!wtap_dump_file_write(wdh, pd, phdr->caplen, err)) return FALSE; wdh->bytes_dumped += phdr->caplen; - /*XXX: this pads the record to its original length, which is fine in most - * cases. However with >MAX_ERF_EHDR unnecessary padding will be added, and - * if the record was truncated this will be incorrectly treated as payload. - * More than 8 extension headers is unusual though, only the first 8 are + /*XXX: this pads the record to its original length, which is fine in most + * cases. However with >MAX_ERF_EHDR unnecessary padding will be added, and + * if the record was truncated this will be incorrectly treated as payload. + * More than 8 extension headers is unusual though, only the first 8 are * written out anyway and fixing properly would require major refactor.*/ while(wdh->bytes_dumped < alignbytes){ if(!wtap_dump_file_write(wdh, "", 1, err)) return FALSE; diff --git a/wiretap/erf.h b/wiretap/erf.h index 4953e5b221..42d16f862e 100644 --- a/wiretap/erf.h +++ b/wiretap/erf.h @@ -96,7 +96,7 @@ typedef struct erf_eth_hdr { guint16 eth; } erf_eth_header_t; -union erf_subhdr { +union erf_subhdr { struct erf_mc_hdr mc_hdr; struct erf_eth_hdr eth_hdr; }; diff --git a/wiretap/eyesdn.c b/wiretap/eyesdn.c index 0afd272881..ace3502a85 100644 --- a/wiretap/eyesdn.c +++ b/wiretap/eyesdn.c @@ -34,10 +34,10 @@ /* This module reads the output of the EyeSDN USB S0/E1 ISDN probes * They store HDLC frames of D and B channels in a binary format * The fileformat is - * + * * 1-6 Byte: EyeSDN - Magic * 7-n Byte: Frames - * + * * Each Frame starts with the 0xff Flag byte * - Bytes 0-2: timestamp (usec in network byte order) * - Bytes 3-7: timestamp (40bits sec since 1970 in network byte order) @@ -45,7 +45,7 @@ * - Byte 9: Sender Bit 0(0 NT, 1 TE), Protocol in Bits 7:1, see enum * - Byte 10-11: frame size in bytes * - Byte 12-n: Frame Payload - * + * * All multibyte values are represented in network byte order * The frame is terminated with a flag character (0xff) * bytes 0xff within a frame are escaped using the 0xfe escape character @@ -203,14 +203,14 @@ read_eyesdn_rec(FILE_T fh, struct wtap_pkthdr *phdr, Buffer *buf, int *err, *err = WTAP_ERR_SHORT_READ; return FALSE; } - + /* extract information from header */ usecs = pntoh24(&hdr[0]); -#ifdef TV64BITS +#ifdef TV64BITS secs = hdr[3]; -#else +#else secs = 0; -#endif +#endif secs = (secs << 8) | hdr[4]; secs = (secs << 8) | hdr[5]; secs = (secs << 8) | hdr[6]; @@ -239,7 +239,7 @@ read_eyesdn_rec(FILE_T fh, struct wtap_pkthdr *phdr, Buffer *buf, int *err, pseudo_header->l1event.uton = (direction & 1); break; - case EYESDN_ENCAP_LAPB: /* X.25 via LAPB */ + case EYESDN_ENCAP_LAPB: /* X.25 via LAPB */ phdr->pkt_encap = WTAP_ENCAP_LAPB; pseudo_header->x25.flags = (direction & 1) ? 0 : 0x80; break; @@ -280,7 +280,7 @@ read_eyesdn_rec(FILE_T fh, struct wtap_pkthdr *phdr, Buffer *buf, int *err, case EYESDN_ENCAP_MTP2: /* SS7 frames */ pseudo_header->mtp2.sent = direction & 1; pseudo_header->mtp2.annex_a_used = MTP2_ANNEX_A_USED_UNKNOWN; - pseudo_header->mtp2.link_number = channel; + pseudo_header->mtp2.link_number = channel; phdr->pkt_encap = WTAP_ENCAP_MTP2_WITH_PHDR; break; @@ -350,7 +350,7 @@ esc_write(wtap_dumper *wdh, const guint8 *buf, int len, int *err) int i; guint8 byte; static const guint8 esc = 0xfe; - + for(i=0; i<len; i++) { byte=buf[i]; if(byte == 0xff || byte == 0xfe) { @@ -460,7 +460,7 @@ static gboolean eyesdn_dump(wtap_dumper *wdh, case WTAP_ENCAP_BACNET_MS_TP_WITH_PHDR: protocol=EYESDN_ENCAP_BACNET; break; - + case WTAP_ENCAP_V5_EF: protocol=EYESDN_ENCAP_V5_EF; break; @@ -481,7 +481,7 @@ static gboolean eyesdn_dump(wtap_dumper *wdh, buf[8] = (guint8) channel; buf[9] = (guint8) (origin?1:0) + (protocol << 1); phtons(&buf[10], size); - + /* start flag */ if (!wtap_dump_file_write(wdh, &start_flag, sizeof start_flag, err)) return FALSE; diff --git a/wiretap/file_access.c b/wiretap/file_access.c index ee5eb747a2..9a5993853b 100644 --- a/wiretap/file_access.c +++ b/wiretap/file_access.c @@ -1864,7 +1864,7 @@ gint64 wtap_dump_file_seek(wtap_dumper *wdh, gint64 offset, int whence, int *err } else { return 0; - } + } } } gint64 wtap_dump_file_tell(wtap_dumper *wdh, int *err) @@ -1883,6 +1883,6 @@ gint64 wtap_dump_file_tell(wtap_dumper *wdh, int *err) } else { return rval; - } + } } } diff --git a/wiretap/iseries.c b/wiretap/iseries.c index fafb4393c0..d25dd06425 100644 --- a/wiretap/iseries.c +++ b/wiretap/iseries.c @@ -247,7 +247,7 @@ iseries_open (wtap * wth, int *err, gchar ** err_info) } wth->file_encap = WTAP_ENCAP_ETHERNET; - wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_ISERIES; + wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_ISERIES; wth->snapshot_length = 0; wth->subtype_read = iseries_read; wth->subtype_seek_read = iseries_seek_read; @@ -287,7 +287,7 @@ iseries_open (wtap * wth, int *err, gchar ** err_info) } wth->file_encap = WTAP_ENCAP_ETHERNET; - wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_ISERIES; + wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_ISERIES; wth->snapshot_length = 0; wth->subtype_read = iseries_read; wth->subtype_seek_read = iseries_seek_read; diff --git a/wiretap/k12.c b/wiretap/k12.c index 8bca690346..df5bdb14e1 100644 --- a/wiretap/k12.c +++ b/wiretap/k12.c @@ -979,7 +979,7 @@ static gboolean k12_dump_close(wtap_dumper *wdh, int *err) { if (! wtap_dump_file_write(wdh, k12_eof, 2, err)) return FALSE; - if (wtap_dump_file_seek(wdh, 8, SEEK_SET, err) == -1) + if (wtap_dump_file_seek(wdh, 8, SEEK_SET, err) == -1) return FALSE; d.u = g_htonl(k12->file_len); @@ -1003,7 +1003,7 @@ gboolean k12_dump_open(wtap_dumper *wdh, int *err) { return FALSE; } - if (wtap_dump_file_seek(wdh, 0x200, SEEK_SET, err) == -1) + if (wtap_dump_file_seek(wdh, 0x200, SEEK_SET, err) == -1) return FALSE; wdh->subtype_write = k12_dump; diff --git a/wiretap/lanalyzer.c b/wiretap/lanalyzer.c index 5c4b9002f4..4e7104c6d1 100644 --- a/wiretap/lanalyzer.c +++ b/wiretap/lanalyzer.c @@ -786,7 +786,7 @@ gboolean lanalyzer_dump_open(wtap_dumper *wdh, int *err) + sizeof (LA_CyclicInformationFake) + LA_IndexRecordSize; - if (wtap_dump_file_seek(wdh, jump, SEEK_SET, err) == -1) + if (wtap_dump_file_seek(wdh, jump, SEEK_SET, err) == -1) return FALSE; wdh->bytes_dumped = jump; diff --git a/wiretap/libpcap.h b/wiretap/libpcap.h index c029829acc..b0ac45f7a0 100644 --- a/wiretap/libpcap.h +++ b/wiretap/libpcap.h @@ -41,10 +41,10 @@ http://ftp.sunet.se/pub/os/Linux/ip-routing/lbl-tools/ - applied; PCAP_SWAPPED_MODIFIED_MAGIC is the byte-swapped version. + applied; PCAP_SWAPPED_MODIFIED_MAGIC is the byte-swapped version. PCAP_NSEC_MAGIC is for Ulf Lamping's modified "libpcap" format, - which uses the same common file format as PCAP_MAGIC, but the + which uses the same common file format as PCAP_MAGIC, but the timestamps are saved in nanosecond resolution instead of microseconds. PCAP_SWAPPED_NSEC_MAGIC is a byte-swapped version of that. */ #define PCAP_MAGIC 0xa1b2c3d4 diff --git a/wiretap/mime_file.c b/wiretap/mime_file.c index 64449e5639..a9703c3909 100644 --- a/wiretap/mime_file.c +++ b/wiretap/mime_file.c @@ -175,7 +175,7 @@ mime_file_open(wtap *wth, int *err, gchar **err_info) } if (bytes_read == 0) return 0; - + found_file = FALSE; for (i = 0; i < N_MAGIC_TYPES; i++) { if ((guint) bytes_read >= magic_files[i].magic_len && !memcmp(magic_buf, magic_files[i].magic, MIN(magic_files[i].magic_len, (guint) bytes_read))) { diff --git a/wiretap/mp2t.c b/wiretap/mp2t.c index 345aae6b94..2df745b9e1 100644 --- a/wiretap/mp2t.c +++ b/wiretap/mp2t.c @@ -62,7 +62,7 @@ typedef struct { } mp2t_filetype_t; static gboolean -mp2t_read_packet(mp2t_filetype_t *mp2t, FILE_T fh, gint64 offset, +mp2t_read_packet(mp2t_filetype_t *mp2t, FILE_T fh, gint64 offset, struct wtap_pkthdr *phdr, Buffer *buf, int *err, gchar **err_info) { diff --git a/wiretap/mpeg.c b/wiretap/mpeg.c index 2f93292f44..7a33985063 100644 --- a/wiretap/mpeg.c +++ b/wiretap/mpeg.c @@ -51,7 +51,7 @@ typedef struct { time_t t0; } mpeg_t; -static int +static int mpeg_resync(wtap *wth, int *err, gchar **err_info _U_) { gint64 offset = file_tell(wth->fh); @@ -72,7 +72,7 @@ mpeg_resync(wtap *wth, int *err, gchar **err_info _U_) return count; } -static int +static int mpeg_read_header(wtap *wth, int *err, gchar **err_info, guint32 *n) { int bytes_read; @@ -93,7 +93,7 @@ mpeg_read_header(wtap *wth, int *err, gchar **err_info, guint32 *n) #define SCRHZ 27000000 -static gboolean +static gboolean mpeg_read(wtap *wth, int *err, gchar **err_info, gint64 *data_offset) { mpeg_t *mpeg = (mpeg_t *)wth->priv; @@ -239,14 +239,14 @@ struct _mpeg_magic { { 0, NULL } }; -int +int mpeg_open(wtap *wth, int *err, gchar **err_info) { int bytes_read; char magic_buf[16]; struct _mpeg_magic* m; mpeg_t *mpeg; - + errno = WTAP_ERR_CANT_READ; bytes_read = file_read(magic_buf, sizeof magic_buf, wth->fh); if (bytes_read != (int) sizeof magic_buf) { @@ -260,7 +260,7 @@ mpeg_open(wtap *wth, int *err, gchar **err_info) if (memcmp(magic_buf, m->match, m->len) == 0) goto good_magic; } - + return 0; good_magic: diff --git a/wiretap/netmon.c b/wiretap/netmon.c index bc30ef136b..b23ba625d0 100644 --- a/wiretap/netmon.c +++ b/wiretap/netmon.c @@ -992,7 +992,7 @@ gboolean netmon_dump_open(wtap_dumper *wdh, int *err) haven't yet written any packets. As we'll have to rewrite the header when we've written out all the packets, we just skip over the header for now. */ - if (wtap_dump_file_seek(wdh, CAPTUREFILE_HEADER_SIZE, SEEK_SET, err) == -1) + if (wtap_dump_file_seek(wdh, CAPTUREFILE_HEADER_SIZE, SEEK_SET, err) == -1) return FALSE; wdh->subtype_write = netmon_dump; diff --git a/wiretap/netscaler.c b/wiretap/netscaler.c index ad5039294e..4e53ab6e93 100644 --- a/wiretap/netscaler.c +++ b/wiretap/netscaler.c @@ -515,7 +515,7 @@ typedef struct nspr_pktracepart_v26 #define TRACE_V26_REC_LEN_OFF(phdr,enumprefix,structprefix,structname) \ TRACE_V25_REC_LEN_OFF(phdr,enumprefix,structprefix,structname)\ __TNO(phdr,enumprefix,structprefix,structname,ns_activity,ns_activity)\ - + TRACE_V10_REC_LEN_OFF(NULL,v10_part,pp,pktracepart_v10) TRACE_V10_REC_LEN_OFF(NULL,v10_full,fp,pktracefull_v10) TRACE_V20_REC_LEN_OFF(NULL,v20_part,pp,pktracepart_v20) diff --git a/wiretap/netscreen.c b/wiretap/netscreen.c index e3970ee40d..947cc8a533 100644 --- a/wiretap/netscreen.c +++ b/wiretap/netscreen.c @@ -88,7 +88,7 @@ static int parse_single_hex_dump_line(char* rec, guint8 *buf, static gboolean info_line(const gchar *line) { int i=NETSCREEN_SPACES_ON_INFO_LINE; - + while (i-- > 0) { if (isspace((guchar)*line)) { line++; @@ -187,7 +187,7 @@ int netscreen_open(wtap *wth, int *err, gchar **err_info) wth->subtype_read = netscreen_read; wth->subtype_seek_read = netscreen_seek_read; wth->tsprecision = WTAP_FILE_TSPREC_DSEC; - + return 1; } @@ -273,7 +273,7 @@ netscreen_seek_read(wtap *wth, gint64 seek_off, } /* Parses a packet record header. There are a few possible formats: - * + * * XXX list extra formats here! 6843828.0: trust(o) len=98:00121ebbd132->00600868d659/0800 192.168.1.1 -> 192.168.1.10/6 @@ -354,11 +354,11 @@ parse_netscreen_hex_dump(FILE_T fh, int pkt_len, const char *cap_int, if (*p == '\0') { break; } - + n = parse_single_hex_dump_line(p, pd, offset); /* the smallest packet has a length of 6 bytes, if - * the first hex-data is less then check whether + * the first hex-data is less then check whether * it is a info-line and act accordingly */ if (offset == 0 && n < 6) { @@ -385,7 +385,7 @@ parse_netscreen_hex_dump(FILE_T fh, int pkt_len, const char *cap_int, /* Adjust the offset to the data that was just added to the buffer */ offset += n; - /* If there was more hex-data than was announced in the len=x + /* If there was more hex-data than was announced in the len=x * header, then then there must be an error in the file */ if(offset > pkt_len) { @@ -411,7 +411,7 @@ parse_netscreen_hex_dump(FILE_T fh, int pkt_len, const char *cap_int, */ g_snprintf(dststr, 13, "%02x%02x%02x%02x%02x%02x", pd[0], pd[1], pd[2], pd[3], pd[4], pd[5]); - if (strncmp(dststr, cap_dst, 12) == 0) + if (strncmp(dststr, cap_dst, 12) == 0) phdr->pkt_encap = WTAP_ENCAP_ETHERNET; else phdr->pkt_encap = WTAP_ENCAP_PPP; diff --git a/wiretap/nettl.c b/wiretap/nettl.c index 07f9282863..6c0d9e11c2 100644 --- a/wiretap/nettl.c +++ b/wiretap/nettl.c @@ -523,7 +523,7 @@ nettl_read_rec(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr, Buffer *buf, return FALSE; } - length = pntohs(&drv_eth_hdr.length); + length = pntohs(&drv_eth_hdr.length); caplen = pntohs(&drv_eth_hdr.caplen); /* * XXX - is there a length field that would give the length @@ -785,7 +785,7 @@ static gboolean nettl_dump(wtap_dumper *wdh, case WTAP_ENCAP_TOKEN_RING: rec_hdr.subsys = g_htons(NETTL_SUBSYS_PCI_TR); break; -/* +#if 0 case WTAP_ENCAP_NETTL_X25: rec_hdr.caplen = g_htonl(phdr->caplen + 24); rec_hdr.length = g_htonl(phdr->len + 24); @@ -795,7 +795,7 @@ static gboolean nettl_dump(wtap_dumper *wdh, rec_hdr.pid = g_htonl(pseudo_header->nettl.pid); rec_hdr.uid = g_htons(pseudo_header->nettl.uid); break; -*/ +#endif default: /* found one we don't support */ *err = WTAP_ERR_UNSUPPORTED_ENCAP; diff --git a/wiretap/network_instruments.c b/wiretap/network_instruments.c index eff7fa1bd4..58494cc66b 100644 --- a/wiretap/network_instruments.c +++ b/wiretap/network_instruments.c @@ -103,7 +103,7 @@ static gboolean observer_read(wtap *wth, int *err, gchar **err_info, static gboolean observer_seek_read(wtap *wth, gint64 seek_off, struct wtap_pkthdr *phdr, Buffer *buf, int length, int *err, gchar **err_info); -static int read_packet_header(FILE_T fh, union wtap_pseudo_header *pseudo_header, +static int read_packet_header(FILE_T fh, union wtap_pseudo_header *pseudo_header, packet_entry_header *packet_header, int *err, gchar **err_info); static gboolean process_packet_header(wtap *wth, packet_entry_header *packet_header, struct wtap_pkthdr *phdr, int *err, @@ -343,7 +343,7 @@ static gboolean observer_seek_read(wtap *wth, gint64 seek_off, } static int -read_packet_header(FILE_T fh, union wtap_pseudo_header *pseudo_header, +read_packet_header(FILE_T fh, union wtap_pseudo_header *pseudo_header, packet_entry_header *packet_header, int *err, gchar **err_info) { int offset; diff --git a/wiretap/network_instruments.h b/wiretap/network_instruments.h index a89e2a63ba..ac17108874 100644 --- a/wiretap/network_instruments.h +++ b/wiretap/network_instruments.h @@ -30,7 +30,7 @@ int network_instruments_dump_can_write_encap(int encap); gboolean network_instruments_dump_open(wtap_dumper *wdh, int *err); /* - * In v15 the high_byte was added to allow a larger offset This was done by + * In v15 the high_byte was added to allow a larger offset This was done by * reducing the size of observer_version by 1 byte. Since version strings are * only 30 characters the high_byte will always be 0 in previous versions. */ diff --git a/wiretap/netxray.c b/wiretap/netxray.c index 4dae5932cc..c83c7664e5 100644 --- a/wiretap/netxray.c +++ b/wiretap/netxray.c @@ -1495,7 +1495,7 @@ gboolean netxray_dump_open_1_1(wtap_dumper *wdh, int *err) haven't yet written any packets. As we'll have to rewrite the header when we've written out all the packets, we just skip over the header for now. */ - if (wtap_dump_file_seek(wdh, CAPTUREFILE_HEADER_SIZE, SEEK_SET, err) == -1) + if (wtap_dump_file_seek(wdh, CAPTUREFILE_HEADER_SIZE, SEEK_SET, err) == -1) return FALSE; wdh->bytes_dumped += CAPTUREFILE_HEADER_SIZE; @@ -1655,7 +1655,7 @@ gboolean netxray_dump_open_2_0(wtap_dumper *wdh, int *err) haven't yet written any packets. As we'll have to rewrite the header when we've written out all the packets, we just skip over the header for now. */ - if (wtap_dump_file_seek(wdh, CAPTUREFILE_HEADER_SIZE, SEEK_SET, err) == -1) + if (wtap_dump_file_seek(wdh, CAPTUREFILE_HEADER_SIZE, SEEK_SET, err) == -1) return FALSE; wdh->bytes_dumped += CAPTUREFILE_HEADER_SIZE; diff --git a/wiretap/packetlogger.h b/wiretap/packetlogger.h index a150c9ecf6..76369da4f4 100644 --- a/wiretap/packetlogger.h +++ b/wiretap/packetlogger.h @@ -20,7 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. - * + * */ #ifndef __PACKETLOGGER_H__ diff --git a/wiretap/peektagged.c b/wiretap/peektagged.c index 53677d92e7..d61925191f 100644 --- a/wiretap/peektagged.c +++ b/wiretap/peektagged.c @@ -438,7 +438,7 @@ peektagged_read_packet(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr, hdr_info.length = pletohl(&tag_value[2]); saw_length = TRUE; break; - + case TAG_PEEKTAGGED_TIMESTAMP_LOWER: if (saw_timestamp_lower) { *err = WTAP_ERR_BAD_FILE; diff --git a/wiretap/visual.c b/wiretap/visual.c index c0bf4d3ee2..12e4c06c8e 100644 --- a/wiretap/visual.c +++ b/wiretap/visual.c @@ -39,11 +39,11 @@ * The first packet index is (4 * num_pkts) octets from the end of the file * and the last index is in the last four octets of the file. * - * All integer and time values are stored in little-endian format, except for + * All integer and time values are stored in little-endian format, except for * the ATM Packet Header, which is stored in network byte order. * - * [ File Header ] - * + * [ File Header ] + * * * [ Packet Header 1 ] [(opt) ATM Packet Header] [ Data ] * ... @@ -106,7 +106,7 @@ struct visual_pkt_hdr /* This structure is used to extract information */ struct visual_atm_hdr { - guint16 vpi; /* 4 bits of zeros; 12 bits of ATM VPI */ + guint16 vpi; /* 4 bits of zeros; 12 bits of ATM VPI */ guint16 vci; /* ATM VCI */ guint8 info; /* 4 bits version; 3 bits unused-zero; 1 bit direction */ guint8 category; /* indicates type of traffic. 4 bits of status + 4 bits of type */ @@ -363,7 +363,7 @@ visual_read_packet(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr, usecs = (guint32)(t - secs*1000000); phdr->ts.secs = secs; phdr->ts.nsecs = usecs * 1000; - + phdr->len = pletohs(&vpkt_hdr.orig_len); packet_status = pletohl(&vpkt_hdr.status); @@ -404,7 +404,7 @@ visual_read_packet(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr, set the FCS length to 0? */ phdr->pseudo_header.eth.fcs_len = -1; break; - + case WTAP_ENCAP_CHDLC_WITH_PHDR: /* This has a 2-byte FCS. */ if (phdr->len < 2) @@ -473,8 +473,8 @@ visual_read_packet(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr, } return FALSE; } - - /* Remove ATM header from length of included bytes in capture, as + + /* Remove ATM header from length of included bytes in capture, as this header was appended by the processor doing the packet reassembly, and was not transmitted across the wire */ packet_size -= (guint32)sizeof vatm_hdr; @@ -487,10 +487,10 @@ visual_read_packet(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr, /* Next two items not supported. Defaulting to zero */ phdr->pseudo_header.atm.aal5t_u2u = 0; phdr->pseudo_header.atm.aal5t_chksum = 0; - + /* Flags appear only to convey that packet is a raw cell. Set to 0 */ - phdr->pseudo_header.atm.flags = 0; - + phdr->pseudo_header.atm.flags = 0; + /* Not supported. Defaulting to zero */ phdr->pseudo_header.atm.aal2_cid = 0; @@ -503,17 +503,17 @@ visual_read_packet(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr, case VN_AAL2: phdr->pseudo_header.atm.aal = AAL_2; break; - + case VN_AAL34: phdr->pseudo_header.atm.aal = AAL_3_4; break; - + case VN_AAL5: phdr->pseudo_header.atm.aal = AAL_5; phdr->pseudo_header.atm.type = TRAF_LLCMX; phdr->pseudo_header.atm.aal5t_len = pntohl(&vatm_hdr.data_length); break; - + case VN_OAM: /* Marking next 3 as OAM versus unknown */ case VN_O191: @@ -530,7 +530,7 @@ visual_read_packet(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr, phdr->pseudo_header.atm.vpi = pntohs(&vatm_hdr.vpi) & 0x0FFF; phdr->pseudo_header.atm.vci = pntohs(&vatm_hdr.vci); phdr->pseudo_header.atm.cells = pntohs(&vatm_hdr.cell_count); - + /* Using bit value of 1 (DCE -> DTE) to indicate From Network */ phdr->pseudo_header.atm.channel = vatm_hdr.info & FROM_NETWORK; break; @@ -665,7 +665,7 @@ gboolean visual_dump_open(wtap_dumper *wdh, int *err) /* All of the fields in the file header aren't known yet so just skip over it for now. It will be created after all of the packets have been written. */ - if (wtap_dump_file_seek(wdh, CAPTUREFILE_HEADER_SIZE, SEEK_SET, err) == -1) + if (wtap_dump_file_seek(wdh, CAPTUREFILE_HEADER_SIZE, SEEK_SET, err) == -1) return FALSE; return TRUE; diff --git a/wiretap/wtap.c b/wiretap/wtap.c index bf9981a84c..4b9a32677a 100644 --- a/wiretap/wtap.c +++ b/wiretap/wtap.c @@ -578,7 +578,7 @@ static struct encap_type_info encap_table_base[] = { /* WTAP_ENCAP_BACNET_MS_TP_WITH_PHDR */ { "BACnet MS/TP with Directional Info", "bacnet-ms-tp-with-direction" }, - + /* WTAP_ENCAP_IXVERIWAVE */ { "IxVeriWave header and stats block", "ixveriwave" }, |