The attached is the complete file showconversations.c. It contains the changes recommended by Guy,
1. Replace the atoi and atol with sprintf equiv's.
2. Display of TCP port numbers with Decimal values instead of Hex.
3. Created defines for IP, TCP, and IPX packet types.
I did not change the functionality of findstring() since it does a little more then strstr(). I will look into changing this when I get some more time.
Thanks for the comments...
Greg
>>> Guy Harris <guy@xxxxxxxxxxxx> 8/18/2003 4:57:00 PM >>>
On Monday, August 11, 2003, at 3:15 PM, Greg Morris wrote:
> The attached files are of the current CVS on 8-6-03. I have built and > tested on Windows platforms with GTK 1.3.
Unfortunately, it doesn't build on Mac OS X, and probably won't build on a number of other UNIX-flavored OSes, as they lack "itoa()" and "ltoa()". Use "sprintf()", instead.
Also, you might want to show TCP port numbers as unsigned decimal rather than hex.
In addition:
we use "strstr()" in several dissectors, so it can be used elsewhere - see if that can be used instead of "stringfind()";
you should probably use various enum and #define values rather than raw numerical values when checking "pi.src.type", "pi.ipproto", and "pi.ptype";
"c_char" and "i" are unused in "show_proto_selection()";
you should include <string.h> to declare "strcat()", "strlen()", etc..
|