Clean up indentation.

svn path=/trunk/; revision=4362
This commit is contained in:
Guy Harris 2001-12-08 21:03:41 +00:00
parent d4959b176e
commit c6ac943216
2 changed files with 35 additions and 34 deletions

View File

@ -1,7 +1,7 @@
/* packet.c
* Routines for packet disassembly
*
* $Id: packet.c,v 1.52 2001/12/08 06:41:47 guy Exp $
* $Id: packet.c,v 1.53 2001/12/08 21:00:42 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -152,24 +152,24 @@ init_all_protocols(void)
/* Creates the top-most tvbuff and calls dissect_frame() */
void
dissect_packet(epan_dissect_t *edt, union wtap_pseudo_header *pseudo_header,
const u_char *pd, frame_data *fd)
const u_char *pd, frame_data *fd)
{
edt->pi.dl_src.type = AT_NONE;
edt->pi.dl_dst.type = AT_NONE;
edt->pi.net_src.type = AT_NONE;
edt->pi.net_dst.type = AT_NONE;
edt->pi.src.type = AT_NONE;
edt->pi.dst.type = AT_NONE;
edt->pi.ethertype = 0;
edt->pi.ipproto = 0;
edt->pi.ipxptype = 0;
edt->pi.in_error_pkt = FALSE;
edt->pi.ptype = PT_NONE;
edt->pi.srcport = 0;
edt->pi.destport = 0;
edt->pi.current_proto = "<Missing Protocol Name>";
edt->pi.p2p_dir = P2P_DIR_UNKNOWN;
edt->pi.private_data = NULL;
edt->pi.dl_src.type = AT_NONE;
edt->pi.dl_dst.type = AT_NONE;
edt->pi.net_src.type = AT_NONE;
edt->pi.net_dst.type = AT_NONE;
edt->pi.src.type = AT_NONE;
edt->pi.dst.type = AT_NONE;
edt->pi.ethertype = 0;
edt->pi.ipproto = 0;
edt->pi.ipxptype = 0;
edt->pi.in_error_pkt = FALSE;
edt->pi.ptype = PT_NONE;
edt->pi.srcport = 0;
edt->pi.destport = 0;
edt->pi.current_proto = "<Missing Protocol Name>";
edt->pi.p2p_dir = P2P_DIR_UNKNOWN;
edt->pi.private_data = NULL;
edt->pi.fd = fd;
edt->pi.pseudo_header = pseudo_header;
@ -178,7 +178,7 @@ dissect_packet(epan_dissect_t *edt, union wtap_pseudo_header *pseudo_header,
TRY {
edt->tvb = tvb_new_real_data(pd, fd->cap_len, fd->pkt_len, "Frame");
/* Add this tvbuffer into the data_src list */
/* Add this tvbuffer into the data_src list */
fd->data_src = g_slist_append( fd->data_src, edt->tvb);
}
CATCH(BoundsError) {

View File

@ -2,12 +2,11 @@
*
* Top-most dissector. Decides dissector based on Wiretap Encapsulation Type.
*
* $Id: packet-frame.c,v 1.13 2001/12/08 06:41:41 guy Exp $
* $Id: packet-frame.c,v 1.14 2001/12/08 21:03:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* By Gerald Combs <gerald@ethereal.com>
* Copyright 2000 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -124,11 +123,12 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
0, 0, pinfo->p2p_dir);
}
if (show_file_off) {
proto_tree_add_int_format(fh_tree, hf_frame_file_off, tvb,
0, 0, pinfo->fd->file_off, "File Offset: %ld (0x%lx)",
pinfo->fd->file_off, pinfo->fd->file_off);
}
if (show_file_off) {
proto_tree_add_int_format(fh_tree, hf_frame_file_off, tvb,
0, 0, pinfo->fd->file_off,
"File Offset: %ld (0x%lx)",
pinfo->fd->file_off, pinfo->fd->file_off);
}
}
@ -200,7 +200,7 @@ proto_register_frame(void)
static gint *ett[] = {
&ett_frame,
};
module_t *frame_module;
module_t *frame_module;
wtap_encap_dissector_table = register_dissector_table("wtap_encap",
"Wiretap encapsulation type", FT_UINT32, BASE_DEC);
@ -223,13 +223,14 @@ proto_register_frame(void)
proto_set_cant_disable(proto_short);
proto_set_cant_disable(proto_malformed);
/* Our preferences */
frame_module = prefs_register_protocol(proto_frame, NULL);
prefs_register_bool_preference(frame_module, "show_file_off",
"Show File Offset", "Show File Offset", &show_file_off);
/* Our preferences */
frame_module = prefs_register_protocol(proto_frame, NULL);
prefs_register_bool_preference(frame_module, "show_file_off",
"Show File Offset", "Show File Offset", &show_file_off);
}
void
proto_reg_handoff_frame(void){
data_handle = find_dissector("data");
proto_reg_handoff_frame(void)
{
data_handle = find_dissector("data");
}