Commit Graph

23 Commits

Author SHA1 Message Date
Guy Harris 167ab3a98c In Wireshark and TShark, run dumpcap to get interface lists and lists of
link-layer header types for interfaces; if special privileges are
necessary to open capture devices, Wireshark and TShark shouldn't have
those privileges, but dumpcap should.

svn path=/trunk/; revision=32104
2010-03-04 01:12:04 +00:00
Anders Broman 1d5c24d068 Fix indentation.
svn path=/trunk/; revision=31966
2010-02-23 16:24:13 +00:00
Guy Harris 710ffd067b strtol() returns a long, as the name suggests; assign its return value
to a long, and check whether it fits in a gint before returning it as a
gint.

svn path=/trunk/; revision=25418
2008-06-03 23:51:39 +00:00
Guy Harris 2ad3cb9bba Include <stdlib.h> to declare strtol().
svn path=/trunk/; revision=25417
2008-06-03 23:35:40 +00:00
Stig Bjørlykke 561f66c1b8 Added an option to set default link-layer header type for each interface.
Set linktype history for each interface so we don't mix them.
Fixed some indents.

svn path=/trunk/; revision=25411
2008-06-02 17:45:03 +00:00
Stig Bjørlykke b205017b3e Display the interface comment if defined.
On non-win32 also display the interface name.

svn path=/trunk/; revision=25114
2008-04-18 14:29:54 +00:00
Stig Bjørlykke f3747bf637 Hide hidden devices in "Capture Interfaces" dialog.
Added a function to check for hidden devices, which also work correctly
for plumbed devices on solaris.

svn path=/trunk/; revision=24231
2008-01-31 16:47:05 +00:00
Tomas Kukosa 08bbd29c71 Support for RPCAP features in GUI (from Boris Misenov, see Bug 1366)
- retrieving the list of remote PCAP interfaces
  - password authentication support
  - UDP data fransfer
  - packet sampling (available in WinPcap 4.x)
  etc.

fix problem if non-default rpcap port is used

svn path=/trunk/; revision=23750
2007-12-04 11:19:29 +00:00
Ulf Lamping 99d60cce59 first steps to support MSVC 2008 Express Edition
svn path=/trunk/; revision=23691
2007-11-30 22:01:05 +00:00
Jeff Morriss ef2c84025c Don't call get_interface_descriptive_name() on a NULL iface: fixes a segfault when doing Statistics->Summary when you didn't capture anything (but rather read in a file)
svn path=/trunk/; revision=22788
2007-09-04 22:13:26 +00:00
Stephen Fisher 711c1eea6d Fix for bug #1801 (http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1801)
Don't get to the point where we may do a strcmp() with a null value.


svn path=/trunk/; revision=22697
2007-08-28 02:13:51 +00:00
Guy Harris b1c3877e22 Add a comment explaining why get_interface_descriptive_name() shouldn't
be, for example, called once a second while a capture is in progress.

svn path=/trunk/; revision=22643
2007-08-24 19:14:38 +00:00
Jeff Morriss 8043464c24 gcc 4 doesn't like my macro for getting the interface description: it says there's an invalid lvalue in it. I don't see what's wrong with it, but replace the macro with a function. Also: don't include the .xpm files in gtk/main.c if we're building without PCAP (as they're not used in that configuration).
svn path=/trunk/; revision=22588
2007-08-22 18:56:20 +00:00
Jeff Morriss 2f77efce7d Fix bug http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1757 :
Try to call get_interface_descriptive_name() as little as possible (storing
the result in capture_opts) to avoid a performance hit during live capture
(especially if you have lots of interfaces) and to avoid leaking memory.

One issue with this is that capture_opts.c cannot (without adding significant
dependencies) set the iface_descr so readers of that field (only gtk/main.c
and tshark.c) use a macro to (set if not already set and) get the value of
that field.

svn path=/trunk/; revision=22587
2007-08-22 16:30:16 +00:00
Guy Harris cc22748169 Have the routines to get interface lists take a pointer to a "gchar *"
as an argument, and, on an error, if they have an error message, have
them set that "gchar *" to point to a g_malloc()ed string containing the
error message, rather than taking a pointer to a buffer for that message
as an argument.  That's more like what's done in Wiretap, and doesn't
impose an upper limit on the lengths of those error messages.  If that
pointer is null, don't allocate the message string and return it.

Have that error message already have the "cant_get" processing applied
to it, so nobody other than those routines need to call the "cant_get"
routines to process the error messages.

Have get_airpcap_interface_list() explicitly set "*err" to the
appropriate error code.

Clean up indentation.

svn path=/trunk/; revision=20521
2007-01-21 23:45:36 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Ulf Lamping 79053183c5 remove dependencies to pcap.h, so getting an idea what needs to be done by dumpcap in addition to the things already done now
various dumpcap related code cleanup: mainly #include's and capture engine related stuff

svn path=/trunk/; revision=17327
2006-02-17 02:18:48 +00:00
Guy Harris eaee2b68c5 Constify a bunch of arguments and variables, to squelch compiler
warnings.

Include "wiretap/libpcap.h" in "capture_loop.h", to get its declarations
of data structures for headers in libpcap files.  This lets us remove
the includes of "wiretap/libpcap.h from files including
"capture_loop.h".

Make "log_func_ignore()" in "tethereal.c" static, and declare some of
its arguments unused.  Also get rid of an unused variable.

Include <pcap.h> before including "wiretap/wtap-capture.h", to declare
"struct pcap_pkthdr".

svn path=/trunk/; revision=16791
2005-12-14 07:29:38 +00:00
Ulf Lamping ec87b13d49 make get_if_name() parameter if_text const, it's not changed inside
svn path=/trunk/; revision=16785
2005-12-13 22:33:55 +00:00
Ulf Lamping 7e3a24418c rename pcap-....c/.h files to capture-pcap-....c/.h
this way, the capture prefix will "logically" group the files together and file browsers will also group them

we may want to move the files into a subdir capture later

svn path=/trunk/; revision=16691
2005-12-06 00:07:13 +00:00
Ulf Lamping 5115a265a9 fix some minor bugs with the current interface name:
-always show descriptive string in combo box
-correct the initialization, so cancelling the option dialog won't make trouble

svn path=/trunk/; revision=14144
2005-04-19 22:32:52 +00:00
Lars Roland f3294ee49a change nmake makefiles in /trunk and /trunk/epan so that
object code for libethereal.dll isn't generated by the
makefile in /trunk.

Having no code in /trunk linked into libethereal.dll
anymore, the definition of the macro _NEED_VAR_IMPORT_
can be moved from various source files in /trunk to /trunk/Makefile.nmake .
So do that, too.

svn path=/trunk/; revision=13389
2005-02-13 00:10:15 +00:00
Guy Harris 43869b46a8 Rename capture_combo_utils.{c,h} to capture_ui_utils.{c,h}, as the code
in there is for UI functions including, but not limited to, the combo
box in capture dialogs.

svn path=/trunk/; revision=13061
2005-01-16 02:56:28 +00:00