diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-12-22 20:26:21 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-12-22 20:26:21 +0000 |
commit | 126a5c1bda529fe2787b2acbf9d031e8d80d1139 (patch) | |
tree | 4f9683601cbe6b84b4110f24cf4a8950d54e2ba3 | |
parent | b3c8b9bb2bf8de798441542540ced61da3696ffd (diff) |
Set "pinfo->p2p_dir" if the packet wasn't received promiscuously.
svn path=/trunk/; revision=9412
-rw-r--r-- | packet-sll.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/packet-sll.c b/packet-sll.c index a8787a1f98..0748293332 100644 --- a/packet-sll.c +++ b/packet-sll.c @@ -1,7 +1,7 @@ /* packet-sll.c * Routines for disassembly of packets from Linux "cooked mode" captures * - * $Id: packet-sll.c,v 1.20 2003/10/01 07:11:44 guy Exp $ + * $Id: packet-sll.c,v 1.21 2003/12/22 20:26:21 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -146,6 +146,23 @@ dissect_sll(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) pkttype = tvb_get_ntohs(tvb, 0); + /* + * Set "pinfo->p2p_dir" if the packet wasn't received + * promiscuously. + */ + switch (pkttype) { + + case LINUX_SLL_HOST: + case LINUX_SLL_BROADCAST: + case LINUX_SLL_MULTICAST: + pinfo->p2p_dir = P2P_DIR_RECV; + break; + + case LINUX_SLL_OUTGOING: + pinfo->p2p_dir = P2P_DIR_SENT; + break; + } + if (check_col(pinfo->cinfo, COL_INFO)) col_add_str(pinfo->cinfo, COL_INFO, val_to_str(pkttype, packet_type_vals, "Unknown (%u)")); |