aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2013-06-25 22:02:20 +0000
committerJeff Morriss <jeff.morriss.ws@gmail.com>2013-06-25 22:02:20 +0000
commita441793cba1e5cb7567e08990e82bfb94f6764df (patch)
tree0b687809e250d7c4ef0445105e6e413b9fbf849b /epan
parent847fbeefdbf5ce18c00a2fa8a48e3095b641283f (diff)
Move a couple of time-related modules into wsutil.
A bunch of files didn't really need to include these header files so remove the include line rather than changing it. svn path=/trunk/; revision=50154
Diffstat (limited to 'epan')
-rw-r--r--epan/CMakeLists.txt1
-rw-r--r--epan/Makefile.common2
-rw-r--r--epan/column.c1
-rw-r--r--epan/dissectors/packet-cmp.c13
-rw-r--r--epan/dissectors/packet-goose.c11
-rw-r--r--epan/dissectors/packet-iscsi.c1
-rw-r--r--epan/dissectors/packet-mms.c11
-rw-r--r--epan/dissectors/packet-sv.c11
-rw-r--r--epan/frame_data.h2
-rw-r--r--epan/ftypes/ftypes.h2
-rw-r--r--epan/nstime.c202
-rw-r--r--epan/nstime.h115
-rw-r--r--epan/proto.h2
-rw-r--r--epan/to_str.h2
-rw-r--r--epan/wslua/init_wslua.c1
-rw-r--r--epan/wslua/wslua.h2
16 files changed, 26 insertions, 353 deletions
diff --git a/epan/CMakeLists.txt b/epan/CMakeLists.txt
index 7eacdf14f0..b11ceaf361 100644
--- a/epan/CMakeLists.txt
+++ b/epan/CMakeLists.txt
@@ -1448,7 +1448,6 @@ set(LIBWIRESHARK_FILES
ipproto.c
ipv4.c
next_tvb.c
- nstime.c
oids.c
osi-utils.c
packet.c
diff --git a/epan/Makefile.common b/epan/Makefile.common
index c2f797f561..473b870e49 100644
--- a/epan/Makefile.common
+++ b/epan/Makefile.common
@@ -65,7 +65,6 @@ LIBWIRESHARK_SRC = \
ipproto.c \
ipv4.c \
next_tvb.c \
- nstime.c \
oids.c \
osi-utils.c \
packet.c \
@@ -203,7 +202,6 @@ LIBWIRESHARK_INCLUDES = \
llcsaps.h \
next_tvb.h \
nlpid.h \
- nstime.h \
oids.h \
osi-utils.h \
oui.h \
diff --git a/epan/column.c b/epan/column.c
index 231f1c5459..e25252b54c 100644
--- a/epan/column.c
+++ b/epan/column.c
@@ -35,7 +35,6 @@
#include <epan/timestamp.h>
#include <epan/prefs.h>
-#include <epan/nstime.h>
#include <epan/dfilter/dfilter.h>
#include <epan/column.h>
#include <epan/packet.h>
diff --git a/epan/dissectors/packet-cmp.c b/epan/dissectors/packet-cmp.c
index 99770656ba..b5823b443a 100644
--- a/epan/dissectors/packet-cmp.c
+++ b/epan/dissectors/packet-cmp.c
@@ -49,7 +49,6 @@
#include "packet-tcp.h"
#include "packet-http.h"
#include <epan/prefs.h>
-#include <epan/nstime.h>
#define PNAME "Certificate Management Protocol"
#define PSNAME "CMP"
@@ -237,7 +236,7 @@ static int hf_cmp_PKIFailureInfo_systemFailure = -1;
static int hf_cmp_PKIFailureInfo_duplicateCertReq = -1;
/*--- End of included file: packet-cmp-hf.c ---*/
-#line 70 "../../asn1/cmp/packet-cmp-template.c"
+#line 69 "../../asn1/cmp/packet-cmp-template.c"
/* Initialize the subtree pointers */
static gint ett_cmp = -1;
@@ -293,7 +292,7 @@ static gint ett_cmp_PollRepContent = -1;
static gint ett_cmp_PollRepContent_item = -1;
/*--- End of included file: packet-cmp-ett.c ---*/
-#line 74 "../../asn1/cmp/packet-cmp-template.c"
+#line 73 "../../asn1/cmp/packet-cmp-template.c"
/*--- Included file: packet-cmp-fn.c ---*/
#line 1 "../../asn1/cmp/packet-cmp-fn.c"
@@ -1453,7 +1452,7 @@ static void dissect_SuppLangTagsValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo
/*--- End of included file: packet-cmp-fn.c ---*/
-#line 75 "../../asn1/cmp/packet-cmp-template.c"
+#line 74 "../../asn1/cmp/packet-cmp-template.c"
static int
dissect_cmp_pdu(tvbuff_t *tvb, proto_tree *tree, asn1_ctx_t *actx)
@@ -2343,7 +2342,7 @@ void proto_register_cmp(void) {
NULL, HFILL }},
/*--- End of included file: packet-cmp-hfarr.c ---*/
-#line 332 "../../asn1/cmp/packet-cmp-template.c"
+#line 331 "../../asn1/cmp/packet-cmp-template.c"
};
/* List of subtrees */
@@ -2401,7 +2400,7 @@ void proto_register_cmp(void) {
&ett_cmp_PollRepContent_item,
/*--- End of included file: packet-cmp-ettarr.c ---*/
-#line 338 "../../asn1/cmp/packet-cmp-template.c"
+#line 337 "../../asn1/cmp/packet-cmp-template.c"
};
module_t *cmp_module;
@@ -2495,7 +2494,7 @@ void proto_reg_handoff_cmp(void) {
/*--- End of included file: packet-cmp-dis-tab.c ---*/
-#line 410 "../../asn1/cmp/packet-cmp-template.c"
+#line 409 "../../asn1/cmp/packet-cmp-template.c"
inited = TRUE;
}
diff --git a/epan/dissectors/packet-goose.c b/epan/dissectors/packet-goose.c
index a17e644ce3..7cd1c67eda 100644
--- a/epan/dissectors/packet-goose.c
+++ b/epan/dissectors/packet-goose.c
@@ -38,7 +38,6 @@
#include <epan/asn1.h>
#include <epan/etypes.h>
#include <epan/expert.h>
-#include <epan/nstime.h>
#include "packet-ber.h"
#include "packet-acse.h"
@@ -120,7 +119,7 @@ static int hf_goose_mMSString = -1; /* MMSString */
static int hf_goose_utc_time = -1; /* UtcTime */
/*--- End of included file: packet-goose-hf.c ---*/
-#line 52 "../../asn1/goose/packet-goose-template.c"
+#line 51 "../../asn1/goose/packet-goose-template.c"
/* Initialize the subtree pointers */
static int ett_goose = -1;
@@ -147,7 +146,7 @@ static gint ett_goose_SEQUENCE_OF_Data = -1;
static gint ett_goose_Data = -1;
/*--- End of included file: packet-goose-ett.c ---*/
-#line 57 "../../asn1/goose/packet-goose-template.c"
+#line 56 "../../asn1/goose/packet-goose-template.c"
/*--- Included file: packet-goose-fn.c ---*/
@@ -715,7 +714,7 @@ dissect_goose_GOOSEpdu(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
/*--- End of included file: packet-goose-fn.c ---*/
-#line 59 "../../asn1/goose/packet-goose-template.c"
+#line 58 "../../asn1/goose/packet-goose-template.c"
/*
* Dissect GOOSE PDUs inside a PPDU.
@@ -1024,7 +1023,7 @@ void proto_register_goose(void) {
"UtcTime", HFILL }},
/*--- End of included file: packet-goose-hfarr.c ---*/
-#line 127 "../../asn1/goose/packet-goose-template.c"
+#line 126 "../../asn1/goose/packet-goose-template.c"
};
/* List of subtrees */
@@ -1052,7 +1051,7 @@ void proto_register_goose(void) {
&ett_goose_Data,
/*--- End of included file: packet-goose-ettarr.c ---*/
-#line 133 "../../asn1/goose/packet-goose-template.c"
+#line 132 "../../asn1/goose/packet-goose-template.c"
};
static ei_register_info ei[] = {
diff --git a/epan/dissectors/packet-iscsi.c b/epan/dissectors/packet-iscsi.c
index 5c01507896..c38b9432e0 100644
--- a/epan/dissectors/packet-iscsi.c
+++ b/epan/dissectors/packet-iscsi.c
@@ -44,7 +44,6 @@
#include <epan/prefs.h>
#include <epan/conversation.h>
#include "packet-scsi.h"
-#include <epan/nstime.h>
#include <epan/emem.h>
#include <epan/range.h>
#include <wsutil/crc32.h>
diff --git a/epan/dissectors/packet-mms.c b/epan/dissectors/packet-mms.c
index 97e12b6332..df18a337be 100644
--- a/epan/dissectors/packet-mms.c
+++ b/epan/dissectors/packet-mms.c
@@ -38,7 +38,6 @@
#include <epan/packet.h>
#include <epan/asn1.h>
#include <epan/expert.h>
-#include <epan/nstime.h>
#include "packet-ber.h"
#include "packet-acse.h"
@@ -723,7 +722,7 @@ static int hf_mms_Transitions_idle_to_active = -1;
static int hf_mms_Transitions_any_to_deleted = -1;
/*--- End of included file: packet-mms-hf.c ---*/
-#line 47 "../../asn1/mms/packet-mms-template.c"
+#line 46 "../../asn1/mms/packet-mms-template.c"
/* Initialize the subtree pointers */
static gint ett_mms = -1;
@@ -940,7 +939,7 @@ static gint ett_mms_DirectoryEntry = -1;
static gint ett_mms_FileAttributes = -1;
/*--- End of included file: packet-mms-ett.c ---*/
-#line 51 "../../asn1/mms/packet-mms-template.c"
+#line 50 "../../asn1/mms/packet-mms-template.c"
static expert_field ei_mms_mal_timeofday_encoding = EI_INIT;
static expert_field ei_mms_mal_utctime_encoding = EI_INIT;
@@ -7053,7 +7052,7 @@ dissect_mms_MMSpdu(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_,
/*--- End of included file: packet-mms-fn.c ---*/
-#line 56 "../../asn1/mms/packet-mms-template.c"
+#line 55 "../../asn1/mms/packet-mms-template.c"
/*
* Dissect MMS PDUs inside a PPDU.
@@ -9761,7 +9760,7 @@ void proto_register_mms(void) {
NULL, HFILL }},
/*--- End of included file: packet-mms-hfarr.c ---*/
-#line 95 "../../asn1/mms/packet-mms-template.c"
+#line 94 "../../asn1/mms/packet-mms-template.c"
};
/* List of subtrees */
@@ -9980,7 +9979,7 @@ void proto_register_mms(void) {
&ett_mms_FileAttributes,
/*--- End of included file: packet-mms-ettarr.c ---*/
-#line 101 "../../asn1/mms/packet-mms-template.c"
+#line 100 "../../asn1/mms/packet-mms-template.c"
};
static ei_register_info ei[] = {
diff --git a/epan/dissectors/packet-sv.c b/epan/dissectors/packet-sv.c
index d25e4d00b9..41428bbcee 100644
--- a/epan/dissectors/packet-sv.c
+++ b/epan/dissectors/packet-sv.c
@@ -38,7 +38,6 @@
#include <epan/asn1.h>
#include <epan/etypes.h>
#include <epan/expert.h>
-#include <epan/nstime.h>
#include <stdio.h>
#include <string.h>
@@ -127,7 +126,7 @@ static int hf_sv_seqData = -1; /* Data */
static int hf_sv_smpMod = -1; /* T_smpMod */
/*--- End of included file: packet-sv-hf.c ---*/
-#line 105 "../../asn1/sv/packet-sv-template.c"
+#line 104 "../../asn1/sv/packet-sv-template.c"
/* Initialize the subtree pointers */
static int ett_sv = -1;
@@ -143,7 +142,7 @@ static gint ett_sv_SEQUENCE_OF_ASDU = -1;
static gint ett_sv_ASDU = -1;
/*--- End of included file: packet-sv-ett.c ---*/
-#line 112 "../../asn1/sv/packet-sv-template.c"
+#line 111 "../../asn1/sv/packet-sv-template.c"
static expert_field ei_sv_mal_utctime = EI_INIT;
@@ -450,7 +449,7 @@ dissect_sv_SampledValues(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse
/*--- End of included file: packet-sv-fn.c ---*/
-#line 195 "../../asn1/sv/packet-sv-template.c"
+#line 194 "../../asn1/sv/packet-sv-template.c"
/*
* Dissect SV PDUs inside a PPDU.
@@ -624,7 +623,7 @@ void proto_register_sv(void) {
NULL, HFILL }},
/*--- End of included file: packet-sv-hfarr.c ---*/
-#line 312 "../../asn1/sv/packet-sv-template.c"
+#line 311 "../../asn1/sv/packet-sv-template.c"
};
/* List of subtrees */
@@ -641,7 +640,7 @@ void proto_register_sv(void) {
&ett_sv_ASDU,
/*--- End of included file: packet-sv-ettarr.c ---*/
-#line 320 "../../asn1/sv/packet-sv-template.c"
+#line 319 "../../asn1/sv/packet-sv-template.c"
};
static ei_register_info ei[] = {
diff --git a/epan/frame_data.h b/epan/frame_data.h
index 050fa28c37..2efdb39ab4 100644
--- a/epan/frame_data.h
+++ b/epan/frame_data.h
@@ -27,7 +27,7 @@
#include <epan/column_info.h>
#include <epan/tvbuff.h>
-#include <epan/nstime.h>
+#include <wsutil/nstime.h>
#include "ws_symbol_export.h"
#define PINFO_FD_NUM(pinfo) ((pinfo)->fd->num)
diff --git a/epan/ftypes/ftypes.h b/epan/ftypes/ftypes.h
index bdf969ba84..82bbe25097 100644
--- a/epan/ftypes/ftypes.h
+++ b/epan/ftypes/ftypes.h
@@ -165,7 +165,7 @@ ftype_can_matches(enum ftenum ftype);
#include <epan/guid-utils.h>
#include <epan/tvbuff.h>
-#include <epan/nstime.h>
+#include <wsutil/nstime.h>
#include <epan/dfilter/drange.h>
typedef struct _fvalue_t {
diff --git a/epan/nstime.c b/epan/nstime.c
deleted file mode 100644
index e88818856a..0000000000
--- a/epan/nstime.c
+++ /dev/null
@@ -1,202 +0,0 @@
-/* nstime.c
- * Routines for manipulating nstime_t structures
- *
- * Copyright (c) 2005 MX Telecom Ltd. <richardv@mxtelecom.com>
- *
- * $Id$
- *
- * Wireshark - Network traffic analyzer
- * By Gerald Combs <gerald@wireshark.org>
- * Copyright 1998 Gerald Combs
- *
- * 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.
- *
- */
-
-#include <glib.h>
-#include "nstime.h"
-
-/* this is #defined so that we can clearly see that we have the right number of
- zeros, rather than as a guard against the number of nanoseconds in a second
- changing ;) */
-#define NS_PER_S 1000000000
-
-/* set the given nstime_t to zero */
-void nstime_set_zero(nstime_t *nstime)
-{
- nstime->secs = 0;
- nstime->nsecs = 0;
-}
-
-/* is the given nstime_t currently zero? */
-gboolean nstime_is_zero(nstime_t *nstime)
-{
- if(nstime->secs == 0 && nstime->nsecs == 0) {
- return TRUE;
- } else {
- return FALSE;
- }
-}
-
-/* set the given nstime_t to (0,maxint) to mark it as "unset"
- * That way we can find the first frame even when a timestamp
- * is zero (fix for bug 1056)
- */
-void nstime_set_unset(nstime_t *nstime)
-{
- nstime->secs = 0;
- nstime->nsecs = G_MAXINT;
-}
-
-/* is the given nstime_t currently (0,maxint)? */
-gboolean nstime_is_unset(nstime_t *nstime)
-{
- if(nstime->secs == 0 && nstime->nsecs == G_MAXINT) {
- return TRUE;
- } else {
- return FALSE;
- }
-}
-
-
-/** funcion: nstime_copy
- *
- * a = b
- */
-void nstime_copy(nstime_t *a, const nstime_t *b)
-{
- a->secs = b->secs;
- a->nsecs = b->nsecs;
-}
-
-/*
- * function: nstime_delta
- * delta = b - a
- */
-
-void nstime_delta(nstime_t *delta, const nstime_t *b, const nstime_t *a )
-{
- if (b->secs == a->secs) {
- /* The seconds part of b is the same as the seconds part of a, so if
- the nanoseconds part of the first time is less than the nanoseconds
- part of a, b is before a. The nanoseconds part of the delta should
- just be the difference between the nanoseconds part of b and the
- nanoseconds part of a; don't adjust the seconds part of the delta,
- as it's OK if the nanoseconds part is negative, and an overflow
- can never result. */
- delta->secs = 0;
- delta->nsecs = b->nsecs - a->nsecs;
- } else if (b->secs <= a->secs) {
- /* The seconds part of b is less than the seconds part of a, so b is
- before a.
-
- Both the "seconds" and "nanoseconds" value of the delta
- should have the same sign, so if the difference between the
- nanoseconds values would be *positive*, subtract 1,000,000,000
- from it, and add one to the seconds value. */
- delta->secs = b->secs - a->secs;
- delta->nsecs = b->nsecs - a->nsecs;
- if(delta->nsecs > 0) {
- delta->nsecs -= NS_PER_S;
- delta->secs ++;
- }
- } else {
- delta->secs = b->secs - a->secs;
- delta->nsecs = b->nsecs - a->nsecs;
- if(delta->nsecs < 0) {
- delta->nsecs += NS_PER_S;
- delta->secs --;
- }
- }
-}
-
-/*
- * function: nstime_sum
- * sum = a + b
- */
-
-void nstime_sum(nstime_t *sum, const nstime_t *a, const nstime_t *b)
-{
- sum->secs = a->secs + b->secs;
- sum->nsecs = a->nsecs + b->nsecs;
- if(sum->nsecs>=NS_PER_S || (sum->nsecs>0 && sum->secs<0)){
- sum->nsecs-=NS_PER_S;
- sum->secs++;
- } else if(sum->nsecs<=-NS_PER_S || (sum->nsecs<0 && sum->secs>0)) {
- sum->nsecs+=NS_PER_S;
- sum->secs--;
- }
-}
-
-/*
- * function: nstime_cmp
- *
- * a > b : > 0
- * a = b : 0
- * a < b : < 0
- */
-
-int nstime_cmp (const nstime_t *a, const nstime_t *b )
-{
- if (a->secs == b->secs) {
- return a->nsecs - b->nsecs;
- } else {
- return (int) (a->secs - b->secs);
- }
-}
-
-/*
- * function: nstime_to_msec
- * converts nstime to double, time base is milli seconds
- */
-
-double nstime_to_msec(const nstime_t *nstime)
-{
- return ((double)nstime->secs*1000 + (double)nstime->nsecs/1000000);
-}
-
-/*
- * function: nstime_to_sec
- * converts nstime to double, time base is seconds
- */
-
-double nstime_to_sec(const nstime_t *nstime)
-{
- return ((double)nstime->secs + (double)nstime->nsecs/1000000000);
-}
-
-/*
- * function: wtap_nstime_to_sec
- * converts wtap_nstime to double, time base is seconds
- */
-
-double wtap_nstime_to_sec(const struct wtap_nstime *nstime)
-{
- return ((double)nstime->secs + (double)nstime->nsecs/1000000000);
-}
-
-/*
- * Editor modelines
- *
- * Local Variables:
- * c-basic-offset: 4
- * tab-width: 8
- * indent-tabs-mode: nil
- * End:
- *
- * ex: set shiftwidth=4 tabstop=8 expandtab:
- * :indentSize=4:tabSize=8:noTabs=true:
- */
-
diff --git a/epan/nstime.h b/epan/nstime.h
deleted file mode 100644
index 01fd469b62..0000000000
--- a/epan/nstime.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* nstime.h
- * Definition of data structure to hold time values with nanosecond resolution
- *
- * $Id$
- *
- * Wireshark - Network traffic analyzer
- * By Gerald Combs <gerald@wireshark.org>
- * Copyright 1998 Gerald Combs
- *
- * 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 __NSTIME_H__
-#define __NSTIME_H__
-
-#include <time.h>
-
-#include <wiretap/wtap.h>
-#include "ws_symbol_export.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/** @file
- * Definition of data structure to hold time values with nanosecond resolution
- */
-
-/** data structure to hold time values with nanosecond resolution*/
-typedef struct {
- time_t secs;
- int nsecs;
-} nstime_t;
-
-/* functions */
-
-/** set the given nstime_t to zero */
-WS_DLL_PUBLIC void nstime_set_zero(nstime_t *nstime);
-
-/** is the given nstime_t currently zero? */
-WS_DLL_PUBLIC gboolean nstime_is_zero(nstime_t *nstime);
-
-/** set the given nstime_t to (0,maxint) to mark it as "unset"
- * That way we can find the first frame even when a timestamp
- * is zero (fix for bug 1056)
- */
-WS_DLL_PUBLIC void nstime_set_unset(nstime_t *nstime);
-
-/* is the given nstime_t currently (0,maxint)? */
-WS_DLL_PUBLIC gboolean nstime_is_unset(nstime_t *nstime);
-
-/** duplicate the current time
- *
- * a = b
- */
-WS_DLL_PUBLIC void nstime_copy(nstime_t *a, const nstime_t *b);
-
-/** calculate the delta between two times (can be negative!)
- *
- * delta = b-a
- *
- * Note that it is acceptable for two or more of the arguments to point at the
- * same structure.
- */
-WS_DLL_PUBLIC void nstime_delta(nstime_t *delta, const nstime_t *b, const nstime_t *a );
-
-/** calculate the sum of two times
- *
- * sum = a+b
- *
- * Note that it is acceptable for two or more of the arguments to point at the
- * same structure.
- */
-WS_DLL_PUBLIC void nstime_sum(nstime_t *sum, const nstime_t *b, const nstime_t *a );
-
-/** sum += a */
-#define nstime_add(sum, a) nstime_sum(sum, sum, a)
-
-/** sum -= a */
-#define nstime_subtract(sum, a) nstime_delta(sum, sum, a)
-
-/** compare two times are return a value similar to memcmp() or strcmp().
- *
- * a > b : > 0
- * a = b : 0
- * a < b : < 0
- */
-WS_DLL_PUBLIC int nstime_cmp (const nstime_t *a, const nstime_t *b );
-
-/** converts nstime to double, time base is milli seconds */
-WS_DLL_PUBLIC double nstime_to_msec(const nstime_t *nstime);
-
-/** converts nstime to double, time base is seconds */
-WS_DLL_PUBLIC double nstime_to_sec(const nstime_t *nstime);
-
-/** converts wtap_nstime to double, time base is seconds */
-WS_DLL_PUBLIC double wtap_nstime_to_sec(const struct wtap_nstime *nstime);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __NSTIME_H__ */
diff --git a/epan/proto.h b/epan/proto.h
index a05d43fe9d..e82747f9c8 100644
--- a/epan/proto.h
+++ b/epan/proto.h
@@ -46,7 +46,7 @@
#include <glib.h>
#include "ipv4.h"
-#include "nstime.h"
+#include "wsutil/nstime.h"
#include "time_fmt.h"
#include "tvbuff.h"
#include "ftypes/ftypes.h"
diff --git a/epan/to_str.h b/epan/to_str.h
index a353304a3d..3e2f137ab9 100644
--- a/epan/to_str.h
+++ b/epan/to_str.h
@@ -27,7 +27,7 @@
#include <glib.h>
-#include "nstime.h"
+#include "wsutil/nstime.h"
#include "time_fmt.h"
#include <epan/packet_info.h>
#include "ws_symbol_export.h"
diff --git a/epan/wslua/init_wslua.c b/epan/wslua/init_wslua.c
index ad23c1ecb0..577dab9fe5 100644
--- a/epan/wslua/init_wslua.c
+++ b/epan/wslua/init_wslua.c
@@ -30,7 +30,6 @@
#include "wslua.h"
#include <epan/dissectors/packet-frame.h>
-#include <epan/nstime.h>
#include <math.h>
#include <epan/expert.h>
#include <epan/ex-opt.h>
diff --git a/epan/wslua/wslua.h b/epan/wslua/wslua.h
index eaf93b9adb..d761c4830a 100644
--- a/epan/wslua/wslua.h
+++ b/epan/wslua/wslua.h
@@ -51,7 +51,7 @@
#include <epan/funnel.h>
#include <epan/tvbparse.h>
#include <epan/epan.h>
-#include <epan/nstime.h>
+#include <wsutil/nstime.h>
#include "declare_wslua.h"