Wireshark-bugs: [Wireshark-bugs] [Bug 1882] Use more meaningful temp file: /tmp/wireshark.<iface

Date: Mon, 15 Nov 2010 14:02:52 -0800 (PST)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1882

Chris Maynard <christopher.maynard@xxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #5447|review_for_checkin?         |
               Flag|                            |
   Attachment #5447|0                           |1
        is obsolete|                            |
   Attachment #5470|                            |review_for_checkin?
               Flag|                            |

--- Comment #6 from Chris Maynard <christopher.maynard@xxxxxxxxx> 2010-11-15 14:02:45 PST ---
Created an attachment (id=5470)
 --> (https://bugs.wireshark.org/bugzilla/attachment.cgi?id=5470)
Add interface to temp file name.

OK, I modified dumpcap's capture_loop_open_output() to pass in the interface
name as part of the prefix to the create_tempfile() routine.  If we're running
on Windows, I isolate only the UUID part of the name.  So now instead of
passing in "wireshark" as the prefix, we'll pass in "wireshark_<iface>" ...
where <iface> is the interface name we're capturing from or the UUID part of
the interface name if running on Windows.

Unless I'm missing something, I think dumpcap is really the only place that
needs to be modified as the only other places where we call create_tempfile()
from have nothing to do with capturing, but merging files (file.c with prefix =
"wireshark") or other miscellaneous uses in gtk/:

file_import_dlg.c: prefix = "import"
follow_stream.c:   prefix = "wshprint"
follow_tcp.c:      prefix = "follow"
iax2_analysis.c:   prefix = "wireshark_iax2_f" or "wireshark_iax2_r"
rtp_analysis.c:    prefix = "wireshark_rtp_f" or "wireshark_rtp_r"

Note that even with isolating the UUID, the
wireshark_UUID_YYYYmmddHHMMSS_XXXXXX template will still create rather long
tempfile names on Windows.  For example:

wireshark_7798FBA2-0E70-403F-BFD4-76F44AFB62FD_20101115163052_a04512

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.