From Didier Gautheron: move port number from AppleTalk addresses to
separate column, and put in hidden fields for AppleTalk source and destination addresses. svn path=/trunk/; revision=5778
This commit is contained in:
parent
d5cc116c7d
commit
6ecde9ff17
3
AUTHORS
3
AUTHORS
|
@ -1172,6 +1172,9 @@ Didier Gautheron <dgautheron[AT]magic.fr> {
|
|||
"frame.marked" field set on marked frames
|
||||
Don't show progress bar for quick "Find Frame" searches
|
||||
Add "Find Next" and "Find Previous" to repeat searches
|
||||
Move port number from AppleTalk addresses to separate column
|
||||
Put in hidden fields for AppleTalk source and destination
|
||||
addresses
|
||||
}
|
||||
|
||||
Phil Williams <csypbw[AT]comp.leeds.ac.uk> {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* atalk-utils.c
|
||||
* Routines for Appletalk utilities (DDP, currently).
|
||||
*
|
||||
* $Id: atalk-utils.c,v 1.1 2001/03/22 16:24:16 gram Exp $
|
||||
* $Id: atalk-utils.c,v 1.2 2002/06/28 20:13:03 guy Exp $
|
||||
*
|
||||
* Simon Wilkinson <sxw@dcs.ed.ac.uk>
|
||||
*
|
||||
|
@ -40,7 +40,7 @@ atalk_addr_to_str(const struct atalk_ddp_addr *addrp)
|
|||
cur = &str[0][0];
|
||||
}
|
||||
|
||||
sprintf(cur, "%u.%u:%u", addrp->net, addrp->node, addrp->port);
|
||||
sprintf(cur, "%u.%u", addrp->net, addrp->node );
|
||||
return cur;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* atalk-utils.h
|
||||
* Definitions for Appletalk utilities (DDP, currently).
|
||||
*
|
||||
* $Id: atalk-utils.h,v 1.1 2001/03/22 16:24:16 gram Exp $
|
||||
* $Id: atalk-utils.h,v 1.2 2002/06/28 20:13:03 guy Exp $
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -30,7 +30,6 @@
|
|||
struct atalk_ddp_addr {
|
||||
guint16 net;
|
||||
guint8 node;
|
||||
guint8 port;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* column-utils.c
|
||||
* Routines for column utilities.
|
||||
*
|
||||
* $Id: column-utils.c,v 1.13 2002/01/31 08:03:39 guy Exp $
|
||||
* $Id: column-utils.c,v 1.14 2002/06/28 20:13:03 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -464,7 +464,12 @@ col_set_addr(packet_info *pinfo, int col, address *addr, gboolean is_res,
|
|||
strncpy(pinfo->cinfo->col_buf[col], atalk_addr_to_str(&ddp_addr),
|
||||
COL_MAX_LEN);
|
||||
pinfo->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
|
||||
if (is_src)
|
||||
strcpy(pinfo->cinfo->col_expr[col], "ddp.src");
|
||||
else
|
||||
strcpy(pinfo->cinfo->col_expr[col], "ddp.dst");
|
||||
pinfo->cinfo->col_data[col] = pinfo->cinfo->col_buf[col];
|
||||
strcpy(pinfo->cinfo->col_expr_val[col],pinfo->cinfo->col_buf[col]);
|
||||
break;
|
||||
|
||||
case AT_VINES:
|
||||
|
@ -527,6 +532,16 @@ col_set_port(packet_info *pinfo, int col, port_type ptype, guint32 port,
|
|||
pinfo->cinfo->col_expr_val[col][COL_MAX_LEN - 1] = '\0';
|
||||
break;
|
||||
|
||||
case PT_DDP:
|
||||
if (is_src)
|
||||
strcpy(pinfo->cinfo->col_expr[col], "ddp.src.socket");
|
||||
else
|
||||
strcpy(pinfo->cinfo->col_expr[col], "ddp.dst.socket");
|
||||
snprintf(pinfo->cinfo->col_buf[col], COL_MAX_LEN, "%u", port);
|
||||
snprintf(pinfo->cinfo->col_expr_val[col], COL_MAX_LEN, "%u", port);
|
||||
pinfo->cinfo->col_expr_val[col][COL_MAX_LEN - 1] = '\0';
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet_info.h
|
||||
* Definitions for packet info structures and routines
|
||||
*
|
||||
* $Id: packet_info.h,v 1.14 2002/06/04 07:03:55 guy Exp $
|
||||
* $Id: packet_info.h,v 1.15 2002/06/28 20:13:03 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -80,7 +80,8 @@ typedef enum {
|
|||
PT_SCTP, /* SCTP */
|
||||
PT_TCP, /* TCP */
|
||||
PT_UDP, /* UDP */
|
||||
PT_NCP /* NCP connection */
|
||||
PT_NCP, /* NCP connection */
|
||||
PT_DDP /* DDP AppleTalk connection */
|
||||
} port_type;
|
||||
|
||||
#define P2P_DIR_UNKNOWN -1
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for AppleTalk packet disassembly: LLAP, DDP, NBP, ATP, ASP,
|
||||
* RTMP.
|
||||
*
|
||||
* $Id: packet-atalk.c,v 1.76 2002/06/25 02:56:59 tpot Exp $
|
||||
* $Id: packet-atalk.c,v 1.77 2002/06/28 20:13:01 guy Exp $
|
||||
*
|
||||
* Simon Wilkinson <sxw@dcs.ed.ac.uk>
|
||||
*
|
||||
|
@ -70,7 +70,9 @@ static int proto_ddp = -1;
|
|||
static int hf_ddp_hopcount = -1;
|
||||
static int hf_ddp_len = -1;
|
||||
static int hf_ddp_checksum = -1;
|
||||
static int hf_ddp_dst = -1;
|
||||
static int hf_ddp_dst_net = -1;
|
||||
static int hf_ddp_src = -1;
|
||||
static int hf_ddp_src_net = -1;
|
||||
static int hf_ddp_dst_node = -1;
|
||||
static int hf_ddp_src_node = -1;
|
||||
|
@ -1248,22 +1250,29 @@ dissect_ddp_short(tvbuff_t *tvb, packet_info *pinfo, guint8 dnode,
|
|||
|
||||
src.net = 0;
|
||||
src.node = snode;
|
||||
src.port = sport;
|
||||
dst.net = 0;
|
||||
dst.node = dnode;
|
||||
dst.port = dport;
|
||||
SET_ADDRESS(&pinfo->net_src, AT_ATALK, sizeof src, (guint8 *)&src);
|
||||
SET_ADDRESS(&pinfo->src, AT_ATALK, sizeof src, (guint8 *)&src);
|
||||
SET_ADDRESS(&pinfo->net_dst, AT_ATALK, sizeof dst, (guint8 *)&dst);
|
||||
SET_ADDRESS(&pinfo->dst, AT_ATALK, sizeof dst, (guint8 *)&dst);
|
||||
|
||||
pinfo->ptype = PT_DDP;
|
||||
pinfo->destport = dport;
|
||||
pinfo->srcport = sport;
|
||||
|
||||
if (check_col(pinfo->cinfo, COL_INFO)) {
|
||||
col_add_str(pinfo->cinfo, COL_INFO,
|
||||
val_to_str(type, op_vals, "Unknown DDP protocol (%02x)"));
|
||||
}
|
||||
if (tree)
|
||||
if (tree) {
|
||||
proto_tree_add_string_hidden(ddp_tree, hf_ddp_src, tvb,
|
||||
4, 3, atalk_addr_to_str(&src));
|
||||
proto_tree_add_string_hidden(ddp_tree, hf_ddp_dst, tvb,
|
||||
6, 3, atalk_addr_to_str(&dst));
|
||||
|
||||
proto_tree_add_uint(ddp_tree, hf_ddp_type, tvb, 4, 1, type);
|
||||
|
||||
}
|
||||
new_tvb = tvb_new_subset(tvb, DDP_SHORT_HEADER_SIZE, -1, -1);
|
||||
|
||||
if (!dissector_try_port(ddp_dissector_table, type, new_tvb, pinfo, tree))
|
||||
|
@ -1292,15 +1301,17 @@ dissect_ddp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
src.net = ddp.snet;
|
||||
src.node = ddp.snode;
|
||||
src.port = ddp.sport;
|
||||
dst.net = ddp.dnet;
|
||||
dst.node = ddp.dnode;
|
||||
dst.port = ddp.dport;
|
||||
SET_ADDRESS(&pinfo->net_src, AT_ATALK, sizeof src, (guint8 *)&src);
|
||||
SET_ADDRESS(&pinfo->src, AT_ATALK, sizeof src, (guint8 *)&src);
|
||||
SET_ADDRESS(&pinfo->net_dst, AT_ATALK, sizeof dst, (guint8 *)&dst);
|
||||
SET_ADDRESS(&pinfo->dst, AT_ATALK, sizeof dst, (guint8 *)&dst);
|
||||
|
||||
pinfo->ptype = PT_DDP;
|
||||
pinfo->destport = ddp.dport;
|
||||
pinfo->srcport = ddp.sport;
|
||||
|
||||
if (check_col(pinfo->cinfo, COL_INFO))
|
||||
col_add_str(pinfo->cinfo, COL_INFO,
|
||||
val_to_str(ddp.type, op_vals, "Unknown DDP protocol (%02x)"));
|
||||
|
@ -1309,6 +1320,12 @@ dissect_ddp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
ti = proto_tree_add_item(tree, proto_ddp, tvb, 0, DDP_HEADER_SIZE,
|
||||
FALSE);
|
||||
ddp_tree = proto_item_add_subtree(ti, ett_ddp);
|
||||
|
||||
proto_tree_add_string_hidden(ddp_tree, hf_ddp_src, tvb,
|
||||
4, 3, atalk_addr_to_str(&src));
|
||||
proto_tree_add_string_hidden(ddp_tree, hf_ddp_dst, tvb,
|
||||
6, 3, atalk_addr_to_str(&dst));
|
||||
|
||||
proto_tree_add_uint(ddp_tree, hf_ddp_hopcount, tvb, 0, 1,
|
||||
ddp_hops(ddp.hops_len));
|
||||
proto_tree_add_uint(ddp_tree, hf_ddp_len, tvb, 0, 2,
|
||||
|
@ -1485,10 +1502,18 @@ proto_register_atalk(void)
|
|||
{ "Checksum", "ddp.checksum", FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
"", HFILL }},
|
||||
|
||||
{ &hf_ddp_dst,
|
||||
{ "Destination address", "ddp.dst", FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
"", HFILL }},
|
||||
|
||||
{ &hf_ddp_dst_net,
|
||||
{ "Destination Net", "ddp.dst.net", FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
"", HFILL }},
|
||||
|
||||
{ &hf_ddp_src,
|
||||
{ "Source address", "ddp.src", FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
"", HFILL }},
|
||||
|
||||
{ &hf_ddp_src_net,
|
||||
{ "Source Net", "ddp.src.net", FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
"", HFILL }},
|
||||
|
|
Loading…
Reference in New Issue