diff options
author | Michael Mann <mmann78@netscape.net> | 2015-02-07 22:15:55 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-02-09 01:12:01 +0000 |
commit | 4497bb48fd3439474049f7c5e86b4ffa1df35828 (patch) | |
tree | f325f4a4ea7bfa485644527bc126cf6d7e216fc7 /epan/sna-utils.h | |
parent | 3b81c360ded5b81d9affe324435f358590220341 (diff) |
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>
Diffstat (limited to 'epan/sna-utils.h')
-rw-r--r-- | epan/sna-utils.h | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/epan/sna-utils.h b/epan/sna-utils.h deleted file mode 100644 index 16a37248c1..0000000000 --- a/epan/sna-utils.h +++ /dev/null @@ -1,39 +0,0 @@ -/* sna-utils.h - * Definitions for SNA dissection. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef __SNA_UTILS__ -#define __SNA_UTILS__ - -#include <glib.h> -#include <stdio.h> - -/* - * Structure used to represent an FID Type 4 address; gives the layout of the - * data pointed to by an AT_SNA "address" structure if the size is - * SNA_FID_TYPE_4_ADDR_LEN. - */ -#define SNA_FID_TYPE_4_ADDR_LEN 6 -struct sna_fid_type_4_addr { - guint32 saf; - guint16 ef; -}; - -extern gchar *sna_fid_to_str(const address *addr); -extern void sna_fid_to_str_buf(const address *addr, gchar *buf, int buf_len); - -#endif |