aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ldap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-11-04 00:45:54 -0800
committerGuy Harris <guy@alum.mit.edu>2015-11-04 08:46:30 +0000
commitff9f9fc43162f3271e8335aae9b03175a0f2e7ee (patch)
tree2a6db2a90c4a6229e1c902be890bdb52bf58f219 /epan/dissectors/packet-ldap.c
parent321934f2ff9665f62a8ad4b2b554b457c79fd610 (diff)
Don't include "file.h" if you don't need it.
It ends up dragging in libwireshark headers, which programs not linking with libwireshark shouldn't do. In particular, including <epan/address.h> causes some functions that refer to libwireshark functions to be defined if the compiler doesn't handle "static inline" the way GCC does, and you end up requiring libwireshark even though you shouldn't require it. Move plurality() to wsutil/str_util.h, so that non-libwireshark code can get it without include epan/packet.h. Fix includes as necessary. Change-Id: Ie4819719da4c2b349f61445112aa419e99b977d3 Reviewed-on: https://code.wireshark.org/review/11545 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-ldap.c')
-rw-r--r--epan/dissectors/packet-ldap.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c
index a3b43f0028..3a414cc33a 100644
--- a/epan/dissectors/packet-ldap.c
+++ b/epan/dissectors/packet-ldap.c
@@ -102,6 +102,7 @@
#include <epan/asn1.h>
#include <epan/expert.h>
#include <epan/uat.h>
+#include <wsutil/str_util.h>
#include "packet-frame.h"
#include "packet-tcp.h"
#include "packet-windows-common.h"
@@ -344,7 +345,7 @@ static int hf_ldap_graceAuthNsRemaining = -1; /* INTEGER_0_maxInt */
static int hf_ldap_error = -1; /* T_error */
/*--- End of included file: packet-ldap-hf.c ---*/
-#line 194 "../../asn1/ldap/packet-ldap-template.c"
+#line 195 "../../asn1/ldap/packet-ldap-template.c"
/* Initialize the subtree pointers */
static gint ett_ldap = -1;
@@ -416,7 +417,7 @@ static gint ett_ldap_PasswordPolicyResponseValue = -1;
static gint ett_ldap_T_warning = -1;
/*--- End of included file: packet-ldap-ett.c ---*/
-#line 206 "../../asn1/ldap/packet-ldap-template.c"
+#line 207 "../../asn1/ldap/packet-ldap-template.c"
static expert_field ei_ldap_exceeded_filter_length = EI_INIT;
static expert_field ei_ldap_too_many_filter_elements = EI_INIT;
@@ -3836,7 +3837,7 @@ static int dissect_PasswordPolicyResponseValue_PDU(tvbuff_t *tvb _U_, packet_inf
/*--- End of included file: packet-ldap-fn.c ---*/
-#line 921 "../../asn1/ldap/packet-ldap-template.c"
+#line 922 "../../asn1/ldap/packet-ldap-template.c"
static int dissect_LDAPMessage_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ldap_conv_info_t *ldap_info) {
int offset = 0;
@@ -5699,7 +5700,7 @@ void proto_register_ldap(void) {
NULL, HFILL }},
/*--- End of included file: packet-ldap-hfarr.c ---*/
-#line 2215 "../../asn1/ldap/packet-ldap-template.c"
+#line 2216 "../../asn1/ldap/packet-ldap-template.c"
};
/* List of subtrees */
@@ -5773,7 +5774,7 @@ void proto_register_ldap(void) {
&ett_ldap_T_warning,
/*--- End of included file: packet-ldap-ettarr.c ---*/
-#line 2229 "../../asn1/ldap/packet-ldap-template.c"
+#line 2230 "../../asn1/ldap/packet-ldap-template.c"
};
/* UAT for header fields */
static uat_field_t custom_attribute_types_uat_fields[] = {
@@ -5940,7 +5941,7 @@ proto_reg_handoff_ldap(void)
/*--- End of included file: packet-ldap-dis-tab.c ---*/
-#line 2379 "../../asn1/ldap/packet-ldap-template.c"
+#line 2380 "../../asn1/ldap/packet-ldap-template.c"
}