Commit Graph

24 Commits

Author SHA1 Message Date
Moshe Kaplan a523135202 epan: Add header files to Doxygen
Add @file markers for epan
headers so that Doxygen will
generate documentation for them.
2021-11-30 08:46:49 +00:00
Evan Huus 8b194a924f osi: avoid global memory scopes
Add scope arguments to the OSI helper methods which allocate buffers to
avoid the use of the global wmem_packet_scope().
2021-09-14 19:05:11 +00:00
Guy Harris 101b692569 Fix incorrect formatting of NSAP area addresses/address prefixes.
If the area address/address prefix is 13 octets long, use the 13th
octet, not the 21st octet; the latter is *not* part of the area
address/address prefix, and might either not be in the packet or might
be some random other part of the packet.

Add/expand comments while we're at it.

Bug: 14744
Change-Id: I7b90318a72a49b67d8ec17952add528185fd064b
Reviewed-on: https://code.wireshark.org/review/27848
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-27 18:56:41 +00:00
Dario Lombardo 55c68ee69c epan: use SPDX indentifiers.
Skipping dissectors dir for now.

Change-Id: I717b66bfbc7cc81b83f8c2cbc011fcad643796aa
Reviewed-on: https://code.wireshark.org/review/25694
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08 19:29:45 +00:00
Guy Harris 02f74e47ed Fix some dissection errors.
"XXX supported" for a metric type is a Boolean, not an int; add it as
such.

Add the value of the item without the extra bits.

The length of an address prefix is in semi-octets (nibbles/hex digits),
not in octets.

Change-Id: I642f0dab5030f7609e89f45cf2cff15cd74dfbda
Reviewed-on: https://code.wireshark.org/review/20819
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-03-31 21:48:25 +00:00
Guy Harris c5d7183a32 Fix comments.
Change-Id: Iac768dd2f06ce081a7b82c58c225f2674f3f1174
Reviewed-on: https://code.wireshark.org/review/20815
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-03-31 17:58:57 +00:00
Guy Harris fb97e82cbe Distinguish between the two flavors of ITU-T AFIs.
As ISO 8348/X.213 Annex A says:

A.5.2.1.2 Format and allocation of the IDI

A specific combination of IDI format and DSP abstract syntax is
associated with each allocated AFI value, as summarized for use in
individual addresses in Table A.4 (the corresponding AFI values for use
in group addresses is found via Table A.2).  Two AFI values are
associated with each combination that involves a variable-length IDI
format.  In each case, both of the AFI values identify the same
combination of IDI format and DSP abstract syntax.  The numerically
lower AFI value is used when the first significant digit in the IDI is
non-zero.  The numerically greater AFI value is used when the first
significant digit in the IDI is zero.

and A.5.3 talks further about this.

Change-Id: I3fdad04064451b3c891731dc8f107bc57586eb84
Reviewed-on: https://code.wireshark.org/review/20802
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-03-31 00:50:09 +00:00
Guy Harris aa6dcf9cd3 Add a bunch of #defines for OSI NSAP AFI values, and use them.
Have the ISUP value_string for those AFI values show "decimal" and
"binary" indicators.

Update some references.

Change-Id: I07797455f5ffa5fa9cd4e0702a6f5db831054937
Reviewed-on: https://code.wireshark.org/review/20798
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-03-30 22:00:53 +00:00
Guy Harris 8bf0a57ce1 Make some routines static.
Change-Id: I04860f058345cb633ab379c83dcfc24b6cf1a846
Reviewed-on: https://code.wireshark.org/review/20797
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-03-30 19:41:13 +00:00
Michael Mann 14697b8aee Pass tvb and offset into print_nsap_net() and print_area() to "hide" the tvb_get_ptr call that dissectors are using.
Change-Id: Ibc5a51be462d431b85b34cac7a358d736ec7b9db
Reviewed-on: https://code.wireshark.org/review/7422
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-27 07:37:40 +00:00
Michael Mann 4497bb48fd Add address type registration.
Now address types are setup just like field types and must be registered with a structure that provides its string representation (and more things in the future).  Address types that are limited to a single dissector are registered by the dissector.  More "common" ones are globally registered.  There are still a few that really belong in a dissector, but have other dependencies currently not accounted for in the address type support.

Many of the "address to string" conversions that involved g_sprintf have be changed to use more "performance friendly" methods (some at the cost of needing to_str-int.h)

Leaving all comments regarding this "solution" in address_to_str.c in until all have been implemented

Change-Id: I494f413e016b22859c44675def11135f228796e0
Reviewed-on: https://code.wireshark.org/review/7019
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-09 01:12:01 +00:00
Michael Mann 0ad15f88cc Replace the last of ep_alloc and ep_alloc0 with wmem equivalent.
Change-Id: I0338d0acda5e4b9957aad4825ca2cfd6fa506ead
Reviewed-on: https://code.wireshark.org/review/6596
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-17 23:23:06 +00:00
Alexis La Goutte cf3b238a6b OSI util: Add modelines info
Change-Id: I15e44f2f10b80b7c7ce78ce84b748ce8ec7a2eff
Reviewed-on: https://code.wireshark.org/review/3890
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-28 11:34:19 +00:00
Guy Harris 16b26b8e5f Put the system ID in the top-level items for neighbors.
Add a tvb_print_system_id() routine, and use that in various ISIS
dissectors, while we're at it.

Change-Id: I31b6b9ea8faf2b4849f974ec7ed27fbdd14b91ef
Reviewed-on: https://code.wireshark.org/review/1145
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-14 22:43:25 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Ronnie Sahlberg a34e7e3d03 removal of even more sprintf
svn path=/trunk/; revision=15457
2005-08-20 02:33:33 +00:00
Guy Harris 8a8b883450 Set the svn:eol-style property on all text files to "native", so that
they have LF at the end of the line on UN*X and CR/LF on Windows;
hopefully this means that if a CR/LF version is checked in on Windows,
the CRs will be stripped so that they show up only when checked out on
Windows, not on UN*X.

svn path=/trunk/; revision=11400
2004-07-18 00:24:25 +00:00
Guy Harris d9c401c74c Create an "address_to_str_buf()" routine, called by "address_to_str()",
which fills in a caller-supplied buffer.

Create "_buf()" versions of various "to_str" routines for various
address types, and create a routine to map SNA FIDs to strings, and use
them to finish up "address_to_str_buf()".

Get rid of the declaration of "sna_fid_type_4_addr_to_str()" in
"packet-sna.h", as that routine has been swallowed up in
"sna_fid_to_str()".

svn path=/trunk/; revision=8260
2003-08-26 01:00:30 +00:00
Jörg Mayer 48be4e530d Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6116
2002-08-28 20:41:00 +00:00
Guy Harris 393b1b3e8d Don't use "u_int" and "u_char", as they're not defined in <sys/types.h>
on Windows, so we'd have to drag in <winsock.h> to define them.

svn path=/trunk/; revision=3246
2001-04-02 10:41:19 +00:00
Ed Warnicke 21d1ad6375 Moved some ipv6 definitions from packet-ipv6.h to epan/ipv6-utils.h.
Fixed some typos.

svn path=/trunk/; revision=3230
2001-04-01 07:06:24 +00:00
Ed Warnicke 90f7f6184d Moved some definitions and functions from packet-osi.{c,h} to
epan/osi-utils.{c,h} to bring all of the epan dependencies into epan.

svn path=/trunk/; revision=3226
2001-04-01 05:48:15 +00:00