Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] How to get the packet 's number in my company protocol ?

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Tue, 12 Apr 2016 19:52:14 -0700
On Apr 12, 2016, at 7:29 PM, 季红 <jihong_seu@xxxxxxx> wrote:

> But the struct packet_info did not own the filed number !  What can I do?  

You can use the *correct* name for the field:

	printf("[%s: %d], packet seq:[%d]\n", __FILE__, __LINE__, pinfo->num);

or, if you're using Wireshark 2.0 or 1.12 or something other than the current master branch:

	printf("[%s: %d], packet seq:[%d]\n", __FILE__, __LINE__, pinfo->fd->num);