diff options
author | Laurent Deniel <laurent.deniel@free.fr> | 1999-07-31 11:21:06 +0000 |
---|---|---|
committer | Laurent Deniel <laurent.deniel@free.fr> | 1999-07-31 11:21:06 +0000 |
commit | 98ebf4ee0af188f97a8f1e612df8f0eac8e17b91 (patch) | |
tree | 4e472236f8ec61437722e46ff6a8f84c69cdc499 /follow.c | |
parent | 60d150011afefaa5f7dcae85b3620a914de5b3d6 (diff) | |
download | wireshark-98ebf4ee0af188f97a8f1e612df8f0eac8e17b91.tar.gz wireshark-98ebf4ee0af188f97a8f1e612df8f0eac8e17b91.tar.bz2 wireshark-98ebf4ee0af188f97a8f1e612df8f0eac8e17b91.zip |
Remove srcip and destip from packet_info since it is not safe to affect
string pointer from the result of ip_to_str (statically allocated string).
Use the ip_src and the new field ip_dst in follow.c to build a correct
string display filter.
svn path=/trunk/; revision=408
Diffstat (limited to 'follow.c')
-rw-r--r-- | follow.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1,6 +1,6 @@ /* follow.c * - * $Id: follow.c,v 1.12 1999/07/17 04:19:02 gram Exp $ + * $Id: follow.c,v 1.13 1999/07/31 11:21:05 deniel Exp $ * * Copyright 1998 Mike Hall <mlh@io.com> * @@ -62,8 +62,11 @@ build_follow_filter( packet_info *pi ) { char* buf = malloc(1024); if( pi->ipproto == 6 ) { /* TCP */ - sprintf( buf, "(ip.addr eq %s and ip.addr eq %s) and (tcp.port eq %d and tcp.port eq %d)", - pi->srcip, pi->destip, pi->srcport, pi->destport ); + sprintf( buf, + "(ip.addr eq %s and ip.addr eq %s) and (tcp.port eq %d and tcp.port eq %d)", + ip_to_str( (guint8 *) &pi->ip_src), + ip_to_str( (guint8 *) &pi->ip_dst), + pi->srcport, pi->destport ); } else { free( buf ); |