Wireshark-dev: Re: [Wireshark-dev] Meaning of packet_info.p2p_dir ?
From: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
Date: Fri, 19 Jun 2009 12:25:28 -0400


Michael Lum wrote:
Hello,

is there a fixed meaning of packet_info.p2p_dir for all protocols?

What is that value supposed to mean?

Well, I don't know if it's the same for all protocols, but it's usually set to one of these defines:

epan/packet_info.h:#define P2P_DIR_UNKNOWN      -1
epan/packet_info.h:#define P2P_DIR_SENT 0
epan/packet_info.h:#define P2P_DIR_RECV 1
epan/packet_info.h:#define P2P_DIR_UL   0
epan/packet_info.h:#define P2P_DIR_DL   1

It's useful in protocols when you know you're the sender or the receiver (and that makes a difference when dissecting).