This wiki has been migrated to and is now deprecated. Please use that site instead.

Development Tips

Here you will find various tips useful while development and debugging.

Breakpoint on a specific packet number

Often you know, that you have a bug/problem in your dissector, which can be found only in a specific packet.

Let's say you know packet number 1234 has a bug, so you can add the following to your code:

{{{ if(pinfo->fd->num == 1234) {

} }}}

and simply set a breakpoint to the printf call.

Of course you will need access to pinfo, but this should be the case in any dissector.

Don't forget to remove this later, after you've found your bug :-)