Commit Graph

72 Commits

Author SHA1 Message Date
Michael Mann acc018b8d1 Allow create_tempfile to support a suffix.
Ping-Bug: 10203
Change-Id: Ifa24870d711449b87e9839dd46af614e4aa28fde
Reviewed-on: https://code.wireshark.org/review/15608
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2016-06-01 06:24:05 +00:00
Michael Mann 81d65ccec6 Add wtap_optionblock_set_option_string_format
Also add a length parameter to wtap_optionblock_set_option_string

Change-Id: I8c7bbc48aa96b5c2a91ab9a17980928d6894f1ee
Reviewed-on: https://code.wireshark.org/review/15505
Reviewed-by: Anthony Coddington <anthony.coddington@endace.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-22 23:39:14 +00:00
João Valverde 3db13a7fc9 Link version code statically again
This allows keeping the code-sharing with the static linking.

This "fixes" a hypothetical ABI mismatch with wsutil and avoids pulling more
external dependencies to wsutil than strictly necessary.

A nice side-effect is that libwsutil no longer depends on version.h.

Follow up to f95976eefc.

Change-Id: I8f0d6a557ab3f7ce6f0e2c269124c89f29d6ad23
Reviewed-on: https://code.wireshark.org/review/15002
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-04-21 18:59:56 +00:00
Guy Harris b43108acb2 Fix "2nd byte of optional tags bitmap" flag values.
The presence bits field isn't made up of multiple bytes, it's a single
32-bit field, so move the bit values up 8 bits so they don't collide
with the values from the first byte.

Prevents a crash with at least one 32.423 file.

Change-Id: I804e76a5b8844f1f3894a43af7fd8bbe9fa7447c
Reviewed-on: https://code.wireshark.org/review/14943
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-04-17 00:52:43 +00:00
AndersBroman 4b4c7a76c3 [Nettrace] Add parsing of some HSS records.
Change-Id: I7c2f6ebdb20f90533ee008e1b4557ef27d4672dc
Reviewed-on: https://code.wireshark.org/review/14708
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-03-31 10:59:06 +00:00
Michael Mann 08d49ff2e0 Making wiretap option blocks more generic.
This was inspired by https://code.wireshark.org/review/9729/, but takes it in a different direction where all options are put into an array, regardless of whether they are "standard" or "custom".  It should be easier to add "custom" options in this design. Some, but not all blocks have been converted.
Descriptions of some of the block options have been moved from wtap.h to pcapng.h as it seems to be the one that implements the description of the blocks.

Also what could be added/refactored is registering block behavior.

Change-Id: I3dffa38f0bb088f98749a4f97a3b7655baa4aa6a
Reviewed-on: https://code.wireshark.org/review/13667
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-23 00:39:38 +00:00
Guy Harris b7dc773127 Assorted cleanups.
Fix indentation.

Just directly assign values to elements in the packet buffer; no need to
convert them to numbers and note the value as a comment.

Give more detail in the comment for null-terminating buffers.  Terminate
packet_buf[] once we're finished reading into it, to make it a bit
clearer what's being done.

Make the magic number buffer 513 bytes, so we have 512 bytes plus a
terminating null.

Change-Id: Ie182d93393cc55835b24075e908393c386c85c24
Reviewed-on: https://code.wireshark.org/review/13250
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-13 04:11:08 +00:00
AndersBroman 140aad08e0 nettrace_3gpp_32_423 Protect from buffer overun.
Bug: 11982
Change-Id: Ib704d9128ab6427751edbf3a33f4b8fd14902562
Reviewed-on: https://code.wireshark.org/review/13233
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-13 03:48:05 +00:00
João Valverde e2d5089cb9 Scan pcapng change time to unsigned
Fixes warning:

  nettrace_3gpp_32_423.c:813:4: warning: format '%u' expects argument
  of type 'unsigned int *', but argument 3 has type 'int *' [-Wformat=]

Change-Id: I4bfcc19ecac115d5aa2e222dfed8ea8b0b450d71
Reviewed-on: https://code.wireshark.org/review/12211
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-26 22:27:18 +00:00
Guy Harris 30f46b61bb Add a check for the day of the month.
Also, fix the month check ("month" is in the range 1 through 12, not 0
through 11), and if neither sscanf() gets the right number of fields,
fail immediately.

Change-Id: I3f0da49e969c020c292facb843b9741116647302
Reviewed-on: https://code.wireshark.org/review/12170
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-26 08:02:45 +00:00
Guy Harris b9b6f3f68e Most fields in an ISO 8601 date/time are unsigned.
Add some bounds checks while we're at it.

Change-Id: I19804aee10496fd68f95a27865f8f455d3abbe9f
Reviewed-on: https://code.wireshark.org/review/12166
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-26 03:01:36 +00:00
AndersBroman e65507d575 [Nettrace] Port can have 5 characters.
Change-Id: Id09967378165b23358b4787e6ab96db42c41d2fd
Reviewed-on: https://code.wireshark.org/review/11288
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-10-26 17:20:37 +00:00
Alexis La Goutte 7a8adadbbe Nettrace 3GPP 32.423: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I721bb77fd95f02cd6795c09e780622575d031920
Reviewed-on: https://code.wireshark.org/review/11282
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-10-26 17:13:58 +00:00
AndersBroman 6f6ab7be19 [Nettrace] Add parsing of IP addresses and ports.
Change-Id: I4e2988edd9b5f75f7b104c8daddd1510bf1fc722
Reviewed-on: https://code.wireshark.org/review/11209
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-10-23 07:14:18 +00:00
AndersBroman 115fff197a [Nettrace] Parse timestamps and add to individual packets.
Change-Id: I4a84f19011ef0e02836c84dff665b6fcadbf59ae
Reviewed-on: https://code.wireshark.org/review/11180
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-10-20 18:02:50 +00:00
Hadriel Kaplan fab0e59c70 Fix memory leaks of dumper SHB and IDB infos
Change-Id: I6b81d3e853d503c6a81f9793957b48ab34c6808c
Reviewed-on: https://code.wireshark.org/review/10156
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-21 04:55:20 +00:00
Bill Meier a051961d93 [wiretap/nettrace_3gpp_32_423] Add editor modelines
Change-Id: Ie2b9da2b3a08d18fc913a00cf076aa881a583552
Reviewed-on: https://code.wireshark.org/review/9949
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-08-09 19:01:26 +00:00
Hadriel Kaplan 910438b17f Pcapng: support Name Resolution Block options
Make pcapng decode options in an NRB during read, and store the comment
option, and write it back out as well. Also make it handle plugin handlers
for unknown options in received NRB(s).

Change-Id: I81863ef8d85cb1c8b5ba6673ba0e562efe77714f
Reviewed-on: https://code.wireshark.org/review/9723
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-06 03:32:13 +00:00
Luke Mewburn 000ce64172 nettrace3gpp324423: fix name consistency
Improve consistency when referring to 3GPP TS 32.423:
- The standard name is "3GPP TS 32.423" (with "TS", and "." separator).
- Fix typo in number series ("32" not "34").
- The standard refers to "Trace", not "Nettrace".

Change-Id: If9994b9c6de69b6e1bdfc6679fbaabe698971949
Reviewed-on: https://code.wireshark.org/review/9795
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-27 06:31:57 +00:00
Alexis La Goutte 70be586a82 nettrace 3GPP: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: Ie94165a45d9af23eee6e4d6406ad6fba4de785c0
Reviewed-on: https://code.wireshark.org/review/8281
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-04 06:01:13 +00:00
AndersBroman 45a5a1a4b4 [nettrace_3gpp_32_423] Fix nettrace_3gpp_32_423.c:292: warning:
declaration of 'random' shadows a global declaration.

Change-Id: I2dde89a3f0e5abb3b8acc3c7d09e1a0d53a6c0f7
Reviewed-on: https://code.wireshark.org/review/8245
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-30 12:19:55 +00:00
AndersBroman 2d8b4a233e Add the abillity to read 3GPP trace records with format accoding to
TS 32 423(XML)

Change-Id: I37895ec35797089a32c7d1695e735046d6aa979e
Reviewed-on: https://code.wireshark.org/review/8237
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-30 10:52:01 +00:00