(Trivial) whitespace cleanup (mostly trailing whitespace).

svn path=/trunk/; revision=53172
This commit is contained in:
Bill Meier 2013-11-08 17:17:57 +00:00
parent 6159e98cd3
commit 5a0809c718
28 changed files with 89 additions and 89 deletions

View File

@ -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 */

View File

@ -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) {
/*

View File

@ -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)

View File

@ -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++);

View File

@ -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,

View File

@ -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__

View File

@ -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;

View File

@ -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;
};

View File

@ -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;

View File

@ -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;
}
}
}
}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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))) {

View File

@ -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)
{

View File

@ -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:

View File

@ -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;

View File

@ -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)

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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.
*/

View File

@ -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;

View File

@ -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__

View File

@ -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;

View File

@ -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;

View File

@ -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" },