Ethereal-dev: Re: [Ethereal-dev] reconizing direction

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Fri, 9 Dec 2005 17:24:08 +0100 (CET)
On Fri, 9 Dec 2005, [iso-8859-1] Lars D?rner wrote:

> Hello.
>
> I guess my problem is a simple one but I got no idea how do solve it.
> I?m writing on a dissector for an internal protocol.
> The Problem is the PDU?s have the same type number for server -> client
> as for client -> server.
>
> I know Ethereal realizes the directions but how can I get hand on it?
> I just want to know a variable, a function or an other way to check the
> direction of the package.

see packet_info.h
#define P2P_DIR_UNKNOWN   -1
#define P2P_DIR_SENT      0
#define P2P_DIR_RECV      1

values are found in pinfo->p2p_dir

Thanx,
Jaap