[Wireshark-dev] updating the developer's guide

2012-06-21 Thread Ed Beroset
I recently changed laptop computers (running Windows) and had to 
reconfigure everything to be able to once again rebuild Wireshark. 
Since it had been a while, I referred to the developer's guide, but that 
didn't quite fit what I wanted to do, which was to configure so that I 
could build with either 32- or 64-bit versions using VC++ 2010 Express 
Edition.


I thought I remembered that we had said that that version was going to 
become the new default, but the documentation only describes the 2008 EE 
version (and 32-bit only).  If my recollection is correct, I'd like to 
update the docbook source step-by-step instructions for Quick Start to 
accurately describe the new version.  Any thoughts on that?


Ed
___
Sent via:Wireshark-dev mailing list 
Archives:http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe


[Wireshark-announce] Wireshark 1.8.0 is now available

2012-06-21 Thread Wireshark announcements
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I'm proud to announce the release of Wireshark 1.8.0.

What is Wireshark?

   Wireshark is the world's most popular network protocol analyzer.
   It is used for troubleshooting, analysis, development and
   education.

What's New

  Bug Fixes

   The following bugs have been fixed:

 o When saving the displayed packets, packets which are
   dependencies (e.g., due to reassembly) of the displayed
   packets are included in the list of saved packets (Bug 3315).

 o Rearranging columns in preferences doesn't work on 64-bit
   Windows. (Bug 6077)

  New and Updated Features

   The following features are new (or have been significantly
   updated) since version 1.6:

 o Wireshark supports capturing from multiple interfaces at once.

 o You can now add, edit, and save packet and capture file
   annotations.

 o Wireshark, TShark, and their associated utilities now save
   files using the pcap-ng file format by default. (Your copy of
   Wireshark might still use the pcap file format if pcap-ng is
   disabled in your preferences.)

 o Decryption key management for IEEE 802.11, IPsec, and ISAKMP
   is easier.

 o OID resolution is now supported on 64-bit Windows.

 o The "Save As" menu item has been split into "Save As", which
   lets you save a file using a different filename and "Export
   Specified Packets", which lets you have more control over
   which packets are saved.

 o TCP fast retransmissions are now indicated as an expert info
   note, rather than a warning, just as TCP retransmissions are.

 o TCP window updates are no longer colorized as "Bad TCP".

 o TShark's command-line options have changed. The previously
   undocumented -P option is now -2 option for performing a
   two-pass analysis; the former -S option is now the -P option
   for printing packets even if writing to a file, and the -S
   option is now used to specify a different line separator
   between packets.

 o GeoIP IPv6 databases are now supported.

  New Protocol Support

   Aastra Signalling Protocol (AASP), ActiveMQ OpenWire, Bandwidth
   Reservation Protocol (BRP), Bazaar, Binary Floor Control Protocol,
   BitTorrent DHT, C12.22, CANopen, CIP Motion, CIP Safety, Cisco
   FabricPath MiM, DMX Channel Data, DMX SIP, DMX Test, DMX Text,
   DMX, DVB Application Information Table, DVB Bouquet Association
   Table, DVB Event Information Table, DVB MultiProtocol
   Encapsulation (DVB-MPE), DVB Network Information Table, DVB
   Service Description Table, DVB Time and Date Table, DVB Time
   Offset Table, DVB/ETSI IP Data Cast (IPDC) Electronic Service
   Guide (ESG), ECP VDP, EIA-709.1 (LonTalk), EIA-852 (CN/IP), ELCOM,
   Ericsson A-bis OML (OM 2000), Ericsson HDLC, Ericsson Proprietary
   PCAP, ETSI CAT, ETV-AM Data, ETV-AM EISS Section, Flight Message
   Transfer Protocol (FMTP), Gadu-Gadu, GEO-Mobile Radio (1) BCCH,
   GEO-Mobile Radio (1) Common, GEO-Mobile Radio (1) DTAP, GEO-Mobile
   Radio (1) Radio Resource, Gluster Callback, Gluster CLI, Gluster
   Dump, Gluster Portmap, GlusterD, GlusterFS Callback, GlusterFS
   Handshake, GlusterFS, GSM A-bis OML, GSM CBCH, GSM Cell Broadcast
   Service, GSM SIM, H.248.2, Hadoop Distributed File System (HDFS),
   HART/IP, Hazelcast, HDFS Data, High bandwidth Digital Content
   Protection (HDCP), High-availability Seamless Redundancy (HSR),
   HomePlug AV, HSR/PRP, IEEE 1722.1, ISO 7816, ixveriwave, Kismet
   drone/server protocol, KristalliNet, LCS-AP, Link Access
   Procedure, Satellite channel (LAPSat), LLRP, LTE Positioning
   Protocol A (LPPa), LTE Positioning Protocol, M3 Application
   Protocol (M3AP), MAC Address Acquisition Protocol, MBMS
   synchronisation protocol, Microsoft Credential Security Support
   Provider (CredSSP), MoldUDP, MoldUDP64, MPEG Conditional Access,
   MPEG descriptors, MPEG DSM-CC, MPEG Program Association Table
   (PAT), MPEG Program Map Table, MPEG Section, MPLS Packet Loss and
   Delay Measurement, MPLS-TP Protection State Coordination, Multiple
   VLAN Registration Protocol (MRVP), Netfilter LOG, NOE, NXP MiFare,
   NXP PN532, Open IPTV Forum openSAFETY, Performance Co-Pilot (PCP),
   PPI Sensor, RDP, RTP-MIDI, SBc Application Part (SBc-AP),
   SDH/SONET, Solaris IP over InfiniBand, Sony FeliCa, T.124, UA
   (Universal Alcatel), UA3G, UASIP, UAUDP, USB Integrated Circuit
   Card Interface Device Class (CCID), V5 Data Link Layer (V5DL), V5
   Envelope Function (V5EF), Virtual eXtensible Local Area Network
   (VXLAN), VSS-Monitoring, Vuze DHT, WaveAgent, WebSocket, WSE
   Remote Ethernet, XMCP, YAMI

  Updated Protocol Support

   Too many protocols have been updated to list here.

  New and Updated Capture File Support

   Aethra Telecommunications' PC108, Catapult DCT2000, Citrix
   NetScaler, Cisco Secure IDS IPLog, Endace ERF, Gammu DCT3, Generic
   MIME, IBM iSeries, InfoVista 5View, Ixia IxVeriW

[Wireshark-dev] Wireshark 1.8.0 is now available

2012-06-21 Thread Gerald Combs
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I'm proud to announce the release of Wireshark 1.8.0.

What is Wireshark?

   Wireshark is the world's most popular network protocol analyzer.
   It is used for troubleshooting, analysis, development and
   education.

What's New

  Bug Fixes

   The following bugs have been fixed:

 o When saving the displayed packets, packets which are
   dependencies (e.g., due to reassembly) of the displayed
   packets are included in the list of saved packets (Bug 3315).

 o Rearranging columns in preferences doesn't work on 64-bit
   Windows. (Bug 6077)

  New and Updated Features

   The following features are new (or have been significantly
   updated) since version 1.6:

 o Wireshark supports capturing from multiple interfaces at once.

 o You can now add, edit, and save packet and capture file
   annotations.

 o Wireshark, TShark, and their associated utilities now save
   files using the pcap-ng file format by default. (Your copy of
   Wireshark might still use the pcap file format if pcap-ng is
   disabled in your preferences.)

 o Decryption key management for IEEE 802.11, IPsec, and ISAKMP
   is easier.

 o OID resolution is now supported on 64-bit Windows.

 o The "Save As" menu item has been split into "Save As", which
   lets you save a file using a different filename and "Export
   Specified Packets", which lets you have more control over
   which packets are saved.

 o TCP fast retransmissions are now indicated as an expert info
   note, rather than a warning, just as TCP retransmissions are.

 o TCP window updates are no longer colorized as "Bad TCP".

 o TShark's command-line options have changed. The previously
   undocumented -P option is now -2 option for performing a
   two-pass analysis; the former -S option is now the -P option
   for printing packets even if writing to a file, and the -S
   option is now used to specify a different line separator
   between packets.

 o GeoIP IPv6 databases are now supported.

  New Protocol Support

   Aastra Signalling Protocol (AASP), ActiveMQ OpenWire, Bandwidth
   Reservation Protocol (BRP), Bazaar, Binary Floor Control Protocol,
   BitTorrent DHT, C12.22, CANopen, CIP Motion, CIP Safety, Cisco
   FabricPath MiM, DMX Channel Data, DMX SIP, DMX Test, DMX Text,
   DMX, DVB Application Information Table, DVB Bouquet Association
   Table, DVB Event Information Table, DVB MultiProtocol
   Encapsulation (DVB-MPE), DVB Network Information Table, DVB
   Service Description Table, DVB Time and Date Table, DVB Time
   Offset Table, DVB/ETSI IP Data Cast (IPDC) Electronic Service
   Guide (ESG), ECP VDP, EIA-709.1 (LonTalk), EIA-852 (CN/IP), ELCOM,
   Ericsson A-bis OML (OM 2000), Ericsson HDLC, Ericsson Proprietary
   PCAP, ETSI CAT, ETV-AM Data, ETV-AM EISS Section, Flight Message
   Transfer Protocol (FMTP), Gadu-Gadu, GEO-Mobile Radio (1) BCCH,
   GEO-Mobile Radio (1) Common, GEO-Mobile Radio (1) DTAP, GEO-Mobile
   Radio (1) Radio Resource, Gluster Callback, Gluster CLI, Gluster
   Dump, Gluster Portmap, GlusterD, GlusterFS Callback, GlusterFS
   Handshake, GlusterFS, GSM A-bis OML, GSM CBCH, GSM Cell Broadcast
   Service, GSM SIM, H.248.2, Hadoop Distributed File System (HDFS),
   HART/IP, Hazelcast, HDFS Data, High bandwidth Digital Content
   Protection (HDCP), High-availability Seamless Redundancy (HSR),
   HomePlug AV, HSR/PRP, IEEE 1722.1, ISO 7816, ixveriwave, Kismet
   drone/server protocol, KristalliNet, LCS-AP, Link Access
   Procedure, Satellite channel (LAPSat), LLRP, LTE Positioning
   Protocol A (LPPa), LTE Positioning Protocol, M3 Application
   Protocol (M3AP), MAC Address Acquisition Protocol, MBMS
   synchronisation protocol, Microsoft Credential Security Support
   Provider (CredSSP), MoldUDP, MoldUDP64, MPEG Conditional Access,
   MPEG descriptors, MPEG DSM-CC, MPEG Program Association Table
   (PAT), MPEG Program Map Table, MPEG Section, MPLS Packet Loss and
   Delay Measurement, MPLS-TP Protection State Coordination, Multiple
   VLAN Registration Protocol (MRVP), Netfilter LOG, NOE, NXP MiFare,
   NXP PN532, Open IPTV Forum openSAFETY, Performance Co-Pilot (PCP),
   PPI Sensor, RDP, RTP-MIDI, SBc Application Part (SBc-AP),
   SDH/SONET, Solaris IP over InfiniBand, Sony FeliCa, T.124, UA
   (Universal Alcatel), UA3G, UASIP, UAUDP, USB Integrated Circuit
   Card Interface Device Class (CCID), V5 Data Link Layer (V5DL), V5
   Envelope Function (V5EF), Virtual eXtensible Local Area Network
   (VXLAN), VSS-Monitoring, Vuze DHT, WaveAgent, WebSocket, WSE
   Remote Ethernet, XMCP, YAMI

  Updated Protocol Support

   Too many protocols have been updated to list here.

  New and Updated Capture File Support

   Aethra Telecommunications' PC108, Catapult DCT2000, Citrix
   NetScaler, Cisco Secure IDS IPLog, Endace ERF, Gammu DCT3, Generic
   MIME, IBM iSeries, InfoVista 5View, Ixia IxVeriW

Re: [Wireshark-dev] Style question passing boolean parameters

2012-06-21 Thread Guy Harris

On Jun 19, 2012, at 10:12 PM, Joerg Mayer wrote:

> The following commit retriggered an allergic reaction to controlling function
> behaviour via booleans:
> 
>if (cf_save_packets(&cfile, file_name8->str, filetype, 
> FALSE/*compressed */, FALSE/*discard_comments */, FALSE/* dont_reopen */) != 
> CF_OK) {
> 
> To me, this is sort of unreadable without the comments and ugly looking with
> the comments. My favourite nightmare in this regard in wireshark source is
> dissect_ieee80211_common which has 4 boolean parameters and no comments 
> anywhere
> where it is called.
> 
> What ways are there to fix this? Is replacing the boolean types by an enum 
> with
> speaking elements a valid solution?

It's one.

Another would be to pass a single flags argument, e.g.

   if (cf_save_packets(&cfile, file_name8->str, filetype, 
NOT_COMPRESSED|DONT_DISCARD_COMMENTS|DONT_REOPEN) != CF_OK) {

(with some of the flag values #defined to be 0, so that, regardless of the 
value of the flag, the value is indicated in the call).

Fewer arguments means, in a call, either fewer pushes onto the stack or fewer 
registers required for passing parameters.  I'm not sure whether it's 
significantly more expensive (or more expensive at all) to test a single bit in 
a flags word than to test a Boolean variable on various architectures.
___
Sent via:Wireshark-dev mailing list 
Archives:http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe


Re: [Wireshark-dev] MSVC 2008 - ENOTSUP not declared

2012-06-21 Thread Jeff Morriss

Pontus Fuchs wrote:



On 2012-06-21 17:16, Jeff Morriss wrote:
Hmm, I should have investigated a little further before sending the 
email.


ws80211_toolbar_new() is testing for a ENOTSUP return from 
ws80211_init() which never returns ENOTSUP.  Does one of the error 
returns from that function mean "Wireless support not enabled"?  Maybe 
the test (which results in that message instead of just "Failed to 
initialize ws80211") should go away?




Actually looking as the source I now see that my suggestion was incorrect.

ENOTSUP is what the linux kernel returns if the kernel lacks wireless 
support. I assumed it was ws80211_utils.c that returned ENOTSUP in the 
#else-code that was compiled when libnl is missing.


I'll try to fix this asap.


Yeah, I just noticed that the original version (in the patch attached to 
bug 6973) could return ENOTSUP; I removed the (now no longer used) code 
in r43430.

___
Sent via:Wireshark-dev mailing list 
Archives:http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe


Re: [Wireshark-dev] MSVC 2008 - ENOTSUP not declared

2012-06-21 Thread Pontus Fuchs



On 2012-06-21 17:16, Jeff Morriss wrote:
Hmm, I should have investigated a little further before sending the 
email.


ws80211_toolbar_new() is testing for a ENOTSUP return from 
ws80211_init() which never returns ENOTSUP.  Does one of the error 
returns from that function mean "Wireless support not enabled"?  Maybe 
the test (which results in that message instead of just "Failed to 
initialize ws80211") should go away?




Actually looking as the source I now see that my suggestion was incorrect.

ENOTSUP is what the linux kernel returns if the kernel lacks wireless 
support. I assumed it was ws80211_utils.c that returned ENOTSUP in the 
#else-code that was compiled when libnl is missing.


I'll try to fix this asap.

Cheers,

Pontus

___
Sent via:Wireshark-dev mailing list 
Archives:http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe


Re: [Wireshark-dev] WIRESHARK_RUN_FROM_BUILD_DIRECTORY for in-source CMake build

2012-06-21 Thread Guy Harris

On Jun 21, 2012, at 6:25 AM, Jeff Morriss wrote:

> There's code in epan/filesystem.c that is able to detect (based on the 
> presence of the .libs directory) that we're being run from an autotools-based 
> build directory (thus making the environment variable not necessary).  No 
> such code (yet) exists for cmake.  Or Windows, for that matter...

In the case of Windows, the right way to run the built executables is from the 
wireshark-gtk2 directory.

A while ago, there was some discussion suggesting that we should with auto* 
(and presumably CMake) do as we do with MSVC++ nmake, and "install" the built 
executables and data files in a separate directory as part of the build process 
to provide a way to run from the build directory (so that you don't have to 
install the built Wireshark package in order to test it).  I *think* the issue 
that provoked the discussion was out-of-source-tree builds, but other issues 
favoring that may have come up during the discussion.

___
Sent via:Wireshark-dev mailing list 
Archives:http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe


Re: [Wireshark-dev] MSVC 2008 - ENOTSUP not declared

2012-06-21 Thread Jeff Morriss

Hmm, I should have investigated a little further before sending the email.

ws80211_toolbar_new() is testing for a ENOTSUP return from 
ws80211_init() which never returns ENOTSUP.  Does one of the error 
returns from that function mean "Wireless support not enabled"?  Maybe 
the test (which results in that message instead of just "Failed to 
initialize ws80211") should go away?


Pontus Fuchs wrote:

Hi,

Change it to ENOENT. Caller needs update too.

Cheers,

Pontus

Den 21 jun 2012 16:25 skrev "Jeff Morriss" >:


The current trunk doesn't compile on my MSVC-2008-using laptop
because ENOTSUP is not defined (but it's used in
ui/gtk/main_80211_toolbar.c). Searching the 'net indicates that the
2010 version added a bunch of errno values that weren't previously
there.

What to do?

___
Sent via:Wireshark-dev mailing list 
Archives:http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe


Re: [Wireshark-dev] MSVC 2008 - ENOTSUP not declared

2012-06-21 Thread Richard Sharpe
On Thu, Jun 21, 2012 at 7:55 AM, Pontus Fuchs  wrote:
> Hi,
>
> Change it to ENOENT. Caller needs update too.

That is a very bad idea, IMO, because ENOENT means something different
than ENOTSUP.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)
___
Sent via:Wireshark-dev mailing list 
Archives:http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe

Re: [Wireshark-dev] MSVC 2008 - ENOTSUP not declared

2012-06-21 Thread Pontus Fuchs
Hi,

Change it to ENOENT. Caller needs update too.

Cheers,

Pontus
Den 21 jun 2012 16:25 skrev "Jeff Morriss" :

> The current trunk doesn't compile on my MSVC-2008-using laptop because
> ENOTSUP is not defined (but it's used in ui/gtk/main_80211_toolbar.c).
> Searching the 'net indicates that the 2010 version added a bunch of errno
> values that weren't previously there.
>
> What to do?
> __**__**
> ___
> Sent via:Wireshark-dev mailing list 
> Archives:
> http://www.wireshark.org/**lists/wireshark-dev
> Unsubscribe: 
> https://wireshark.org/mailman/**options/wireshark-dev
>
> mailto:wireshark-dev-request@**wireshark.org
> ?subject=**unsubscribe
>
___
Sent via:Wireshark-dev mailing list 
Archives:http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe

Re: [Wireshark-dev] MSVC 2008 - ENOTSUP not declared

2012-06-21 Thread Richard Sharpe
On Thu, Jun 21, 2012 at 7:25 AM, Jeff Morriss  wrote:
> The current trunk doesn't compile on my MSVC-2008-using laptop because
> ENOTSUP is not defined (but it's used in ui/gtk/main_80211_toolbar.c).
> Searching the 'net indicates that the 2010 version added a bunch of errno
> values that weren't previously there.
>
> What to do?

Add tests and define them ourselves if not already defined?

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)
___
Sent via:Wireshark-dev mailing list 
Archives:http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe

[Wireshark-dev] MSVC 2008 - ENOTSUP not declared

2012-06-21 Thread Jeff Morriss
The current trunk doesn't compile on my MSVC-2008-using laptop because 
ENOTSUP is not defined (but it's used in ui/gtk/main_80211_toolbar.c). 
Searching the 'net indicates that the 2010 version added a bunch of 
errno values that weren't previously there.


What to do?
___
Sent via:Wireshark-dev mailing list 
Archives:http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe


Re: [Wireshark-dev] TCP Graphs and thousands separators ...

2012-06-21 Thread Richard Sharpe
On Thu, Jun 21, 2012 at 7:02 AM, Jeff Morriss  wrote:
> Richard Sharpe wrote:
>> On Wed, Jun 20, 2012 at 9:22 PM, Richard Sharpe
>>  wrote:
>>> Hi folks,
>>>
>>> I have noticed some complaining about the lack of thousands separators
>>> on the ticks, especially on the vertical axis. Certainly, I find it a
>>> pain.
>>>
>>> The following patch might fix the problem. I don't currently have a
>>> capture that I can check this with. Perhaps tomorrow I will remember
>>> to bring one how that shows more than three digits ...
>>>
>>> [rsharpe@localhost wireshark]$ svn diff ui/gtk/tcp_graph.c
>>> Index: ui/gtk/tcp_graph.c
>>> ===
>>> --- ui/gtk/tcp_graph.c  (revision 43186)
>>> +++ ui/gtk/tcp_graph.c  (working copy)
>>> @@ -2767,7 +2767,7 @@
>>>break;
>>>y = y - floor (y);
>>>}
>>> -   g_snprintf (str, sizeof(str), "%.*f", rdigits, label);
>>> +   g_snprintf (str, sizeof(str), "%'*f", rdigits, label);
>>>switch (dir) {
>>>case AXIS_HORIZONTAL:
>>> layout = 
>>> gtk_widget_create_pango_layout(axis->g->drawing_area,
>>>
>>
>> Nope. I was wrong. This does it. Can someone commit it? Do I have to
>> create a bug?:
>>
>> Index: ui/gtk/io_stat.c
>> ===
>> --- ui/gtk/io_stat.c  (revision 43186)
>> +++ ui/gtk/io_stat.c  (working copy)
>> @@ -962,14 +962,14 @@
>>   if(draw_y_as_time){
>>   print_time_scale_string(label_string, 
>> 15, value, value, TRUE);
>>   } else {
>> - g_snprintf(label_string, 15, "%d", 
>> value);
>> + g_snprintf(label_string, 15, "%'d", 
>> value);
>>   }
>>   } else {
>>   value = (max_y/10)*i;
>>   if(draw_y_as_time){
>>   print_time_scale_string(label_string, 
>> 15, value, max_y, FALSE);
>>   } else {
>> - g_snprintf(label_string, 15, "%d", 
>> value);
>> + g_snprintf(label_string, 15, "%'d", 
>> value);
>>   }
>>   }
>
> Bugs are always better, and I see you opened bug 7389 for this.
>
> But: a quick search for "printf apostrophe portable" brought me here:
>
> http://www.velocityreviews.com/forums/t442370-portability-issues-with-flag-in-printf.html
>
> which indicates that using the apostrophe isn't really portable.

Yes, I had noticed the portability issues, but I think they can be
solved. The utility of the separators is high enough, it seems to me,
that some additional #ifdefs to deal with this issue is worth it.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)
___
Sent via:Wireshark-dev mailing list 
Archives:http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe

Re: [Wireshark-dev] TCP Graphs and thousands separators ...

2012-06-21 Thread Jeff Morriss
Richard Sharpe wrote:
> On Wed, Jun 20, 2012 at 9:22 PM, Richard Sharpe
>  wrote:
>> Hi folks,
>>
>> I have noticed some complaining about the lack of thousands separators
>> on the ticks, especially on the vertical axis. Certainly, I find it a
>> pain.
>>
>> The following patch might fix the problem. I don't currently have a
>> capture that I can check this with. Perhaps tomorrow I will remember
>> to bring one how that shows more than three digits ...
>>
>> [rsharpe@localhost wireshark]$ svn diff ui/gtk/tcp_graph.c
>> Index: ui/gtk/tcp_graph.c
>> ===
>> --- ui/gtk/tcp_graph.c  (revision 43186)
>> +++ ui/gtk/tcp_graph.c  (working copy)
>> @@ -2767,7 +2767,7 @@
>>break;
>>y = y - floor (y);
>>}
>> -   g_snprintf (str, sizeof(str), "%.*f", rdigits, label);
>> +   g_snprintf (str, sizeof(str), "%'*f", rdigits, label);
>>switch (dir) {
>>case AXIS_HORIZONTAL:
>> layout = 
>> gtk_widget_create_pango_layout(axis->g->drawing_area,
>>
> 
> Nope. I was wrong. This does it. Can someone commit it? Do I have to
> create a bug?:
> 
> Index: ui/gtk/io_stat.c
> ===
> --- ui/gtk/io_stat.c  (revision 43186)
> +++ ui/gtk/io_stat.c  (working copy)
> @@ -962,14 +962,14 @@
>   if(draw_y_as_time){
>   print_time_scale_string(label_string, 
> 15, value, value, TRUE);
>   } else {
> - g_snprintf(label_string, 15, "%d", 
> value);
> + g_snprintf(label_string, 15, "%'d", 
> value);
>   }
>   } else {
>   value = (max_y/10)*i;
>   if(draw_y_as_time){
>   print_time_scale_string(label_string, 
> 15, value, max_y, FALSE);
>   } else {
> - g_snprintf(label_string, 15, "%d", 
> value);
> + g_snprintf(label_string, 15, "%'d", 
> value);
>   }
>   }

Bugs are always better, and I see you opened bug 7389 for this.

But: a quick search for "printf apostrophe portable" brought me here:

http://www.velocityreviews.com/forums/t442370-portability-issues-with-flag-in-printf.html

which indicates that using the apostrophe isn't really portable.

Folllow-ups to the bug.
___
Sent via:Wireshark-dev mailing list 
Archives:http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe


Re: [Wireshark-dev] WIRESHARK_RUN_FROM_BUILD_DIRECTORY for in-source CMake build

2012-06-21 Thread Jeff Morriss

Tony Trinh wrote:
When I query the list of RADIUS fields from tshark, I see a different 
number of results as shown below.


*in-source CMake build (tshark run from top-level source directory):*

$ ./tshark -G fields | grep 'radius\.' | wc -l
  89

$ WIRESHARK_RUN_FROM_BUILD_DIRECTORY=1 ./tshark -G fields | grep
'radius\.' | wc -l
  8613

*out-of-source CMake build (tshark run from build directory):*

$ ./tshark -G fields | grep 'radius\.' | wc -l
  8613


*autotools build (tshark run from top-level source directory):*

$ ./tshark -G fields | grep 'radius\.' | wc -l
  8613

Why is the environment variable WIRESHARK_RUN_FROM_BUILD_DIRECTORY 
necessary for the in-source CMake build but not in any other case?


There's code in epan/filesystem.c that is able to detect (based on the 
presence of the .libs directory) that we're being run from an 
autotools-based build directory (thus making the environment variable 
not necessary).  No such code (yet) exists for cmake.  Or Windows, for 
that matter...

___
Sent via:Wireshark-dev mailing list 
Archives:http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe