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 /asn1 | |
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 'asn1')
-rw-r--r-- | asn1/atn-ulcs/packet-atn-ulcs-template.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/asn1/atn-ulcs/packet-atn-ulcs-template.c b/asn1/atn-ulcs/packet-atn-ulcs-template.c index 7df449adf0..e2d4a4581c 100644 --- a/asn1/atn-ulcs/packet-atn-ulcs-template.c +++ b/asn1/atn-ulcs/packet-atn-ulcs-template.c @@ -121,6 +121,7 @@ which ATN standard is supported ? #include <epan/packet.h> #include <epan/address.h> #include <epan/conversation.h> +#include <epan/osi-utils.h> #include "packet-ber.h" #include "packet-per.h" #include "packet-atn-ulcs.h" @@ -387,8 +388,8 @@ guint32 get_aircraft_24_bit_address_from_nsap( guint32 adr_prefix =0; /* check NSAP address type*/ - if( (pinfo->src.type != AT_OSI) || - (pinfo->dst.type != AT_OSI)) { + if( (pinfo->src.type != get_osi_address_type()) || + (pinfo->dst.type != get_osi_address_type())) { return ars; } /* 20 octets address length required */ @@ -459,7 +460,7 @@ int check_heur_msg_type(packet_info *pinfo _U_) guint32 adr_prefix =0; /* check NSAP address type*/ - if( (pinfo->src.type != AT_OSI) || (pinfo->dst.type != AT_OSI)) { + if( (pinfo->src.type != get_osi_address_type()) || (pinfo->dst.type != get_osi_address_type())) { return t; } /* check NSAP address length; 20 octets address length required */ |