Remove U3 code and packaging.
authorGerald Combs <gerald@wireshark.org>
Sun, 27 Oct 2013 17:15:39 +0000 (17:15 -0000)
committerGerald Combs <gerald@wireshark.org>
Sun, 27 Oct 2013 17:15:39 +0000 (17:15 -0000)
svn path=/trunk/; revision=52896

25 files changed:
Makefile.nmake
packaging/Makefile.am
packaging/u3/tools/Makefile.nmake [deleted file]
packaging/u3/tools/README.txt [deleted file]
packaging/u3/tools/sysdep.c [deleted file]
packaging/u3/tools/sysdep.h [deleted file]
packaging/u3/tools/utest.c [deleted file]
packaging/u3/tools/uuid.c [deleted file]
packaging/u3/tools/uuid.h [deleted file]
packaging/u3/win32/Makefile.nmake [deleted file]
packaging/u3/win32/README.txt [deleted file]
packaging/u3/win32/makenmake.pl [deleted file]
packaging/u3/win32/manifest.tmpl [deleted file]
packaging/u3/win32/u3util.c [deleted file]
packaging/u3/win32/u3util.exe.manifest [deleted file]
packaging/u3/win32/wireshark.bat [deleted file]
ui/gtk/main.c
ui/gtk/main_menubar.c
ui/qt/main.cpp
ui/qt/wireshark_application.cpp
ui/recent.c
wsutil/CMakeLists.txt
wsutil/Makefile.common
wsutil/u3.c [deleted file]
wsutil/u3.h [deleted file]

index b2cffa1da06f45dd78d5bbdd0143cc7db19a50d1..f03d817eba3f77deefff3efc11deffbb363c8093 100644 (file)
@@ -219,15 +219,6 @@ packaging: _FORCE_
        @exit 1
 !ENDIF
 
-packaging_u3: all
-       cd packaging
-       cd u3
-       cd win32
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
-       cd ..
-       cd ..
-
 packaging_papps: all
        cd packaging
        cd portableapps
@@ -580,8 +571,6 @@ clean: clean-local
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
        cd ../packaging/nsis
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../u3/win32
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
        cd ../../portableapps/win32
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
        cd ../../..
@@ -634,8 +623,6 @@ distclean: distclean-local
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
        cd ../packaging/nsis
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../u3/win32
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
        cd ../../portableapps/win32
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
        cd ../../..
@@ -681,8 +668,6 @@ maintainer-clean: maintainer-clean-local
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
        cd ../packaging/nsis
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ../u3/win32
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
        cd ../../portableapps/win32
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
        cd ../../..
index 603183495c85750ea11cd764b50038654ce2cf50..c1e32076831fedd159e89f7aa5594a4eae9eb43f 100644 (file)
@@ -17,19 +17,5 @@ EXTRA_DIST = \
        portableapps/win32/installer.ini                \
        portableapps/win32/Makefile.nmake               \
        portableapps/win32/makenmake.pl                 \
-       portableapps/win32/readme.txt                   \
-       u3/win32/README.txt             \
-       u3/win32/Makefile.nmake         \
-       u3/win32/makenmake.pl           \
-       u3/win32/manifest.tmpl          \
-       u3/win32/u3util.c               \
-       u3/win32/u3util.exe.manifest    \
-       u3/win32/wireshark.bat          \
-       u3/tools/README.txt             \
-       u3/tools/Makefile.nmake         \
-       u3/tools/sysdep.c               \
-       u3/tools/sysdep.h               \
-       u3/tools/utest.c                \
-       u3/tools/uuid.c                 \
-       u3/tools/uuid.h
+       portableapps/win32/readme.txt
 
diff --git a/packaging/u3/tools/Makefile.nmake b/packaging/u3/tools/Makefile.nmake
deleted file mode 100644 (file)
index 10574a3..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# $Id$
-#
-
-include ../../../config.nmake
-include <win32.mak>
-
-TOPDIR = ..\..\..
-
-CC = cl
-LINK = link
-
-COPY = copy
-
-LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 /ENTRY:mainCRTStartup $(LOCAL_LDFLAGS)
-
-CFLAGS=$(WARNINGS_ARE_ERRORS) $(LOCAL_CFLAGS) -I$(TOPDIR) $(GLIB_CFLAGS) $(GNUTLS_CFLAGS)
-
-.c.obj::
-       $(CC) $(CFLAGS) -Fd.\ -c $<
-
-all:   utest.exe libgcrypt-11.dll libgpg-error-0.dll
-
-utest.exe:     uuid.obj sysdep.obj utest.obj
-       @echo Linking $@
-       $(LINK) /OUT:utest.exe $(guiflags) $(LDFLAGS) utest.obj uuid.obj sysdep.obj $(GNUTLS_LIBS) $(guilibsdll)
-!IFDEF MANIFEST_INFO_REQUIRED
-       mt.exe -nologo -manifest "utest.exe.manifest" -outputresource:utest.exe;1
-!ENDIF
-
-libgcrypt-11.dll libgpg-error-0.dll: $(GNUTLS_DIR)\bin\$@
-       $(COPY) $(GNUTLS_DIR)\bin\$@ $@
-
-clean:
-       rm -rf utest.exe *.obj *.manifest
-       rm -rf libgcrypt-11.dll libgpg-error-0.dll
-       rm -rf state nodeid
-       rm -rf *.pdb
-       rm -rf *~ *.*~
-
-distclean:     clean
-
-maintainer-clean:      distclean
diff --git a/packaging/u3/tools/README.txt b/packaging/u3/tools/README.txt
deleted file mode 100644 (file)
index 20accc6..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-$Id$
-
-utest.exe is a UUID generator based on the example code provided in RFC4122 and using the gcrypt libraries for the MD5/SHA1 algorithms. It has only been tested on Windows to date.
-
-A Wireshark namespace UUID has been defined (94630be0-e031-11db-974d-0002a5d5c51b) which allows UUIDs to be generated from a simple string. Supplying a single string parameters to utest.exe will result in a sed expression being output. The expression is designed to be used with the manifest.tmpl to generate the manifest.u3i file. For example,
-
-utest.exe "0.99.6" => s/$(UUID)/c84e2059-6e2f-54dd-9af7-646f91327cce/
-
-The U3 packaging uses this UUID to identify separate versions, which includes the automated builds.
-
-Graeme Lunt 1/4/2007
\ No newline at end of file
diff --git a/packaging/u3/tools/sysdep.c b/packaging/u3/tools/sysdep.c
deleted file mode 100644 (file)
index 6f5e707..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-/* sysdep.c
- * UUID system dependent routines 
- *
- * $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.
- */
-
-/*
-** Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc.
-** Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. &
-** Digital Equipment Corporation, Maynard, Mass.
-** Copyright (c) 1998 Microsoft.
-** To anyone who acknowledges that this file is provided "AS IS"
-** without any express or implied warranty: permission to use, copy,
-** modify, and distribute this file for any purpose is hereby
-** granted without fee, provided that the above copyright notices and
-** this notice appears in all source code copies, and that none of
-** the names of Open Software Foundation, Inc., Hewlett-Packard
-** Company, Microsoft, or Digital Equipment Corporation be used in
-** advertising or publicity pertaining to distribution of the software
-** without specific, written prior permission. Neither Open Software
-** Foundation, Inc., Hewlett-Packard Company, Microsoft, nor Digital
-** Equipment Corporation makes any representations about the
-** suitability of this software for any purpose.
-*/
-
-#include <stdio.h>
-#include "sysdep.h"
-
-/* system dependent call to get IEEE node ID.
-   This sample implementation generates a random node ID. */
-void get_ieee_node_identifier(uuid_node_t *node)
-{
-    static inited = 0;
-    static uuid_node_t saved_node;
-    char seed[16];
-    FILE *fp;
-
-    if (!inited) {
-        fp = fopen("nodeid", "rb");
-        if (fp) {
-            fread(&saved_node, sizeof saved_node, 1, fp);
-            fclose(fp);
-        }
-        else {
-            get_random_info(seed);
-            seed[0] |= 0x01;
-            memcpy(&saved_node, seed, sizeof saved_node);
-            fp = fopen("nodeid", "wb");
-            if (fp) {
-                fwrite(&saved_node, sizeof saved_node, 1, fp);
-                fclose(fp);
-            }
-        }
-        inited = 1;
-    }
-
-    *node = saved_node;
-}
-
-/* system dependent call to get the current system time. Returned as
-   100ns ticks since UUID epoch, but resolution may be less than
-   100ns. */
-#ifdef _WINDOWS_
-
-void get_system_time(uuid_time_t *uuid_time)
-{
-    ULARGE_INTEGER time;
-
-    /* NT keeps time in FILETIME format which is 100ns ticks since
-       Jan 1, 1601. UUIDs use time in 100ns ticks since Oct 15, 1582.
-       The difference is 17 Days in Oct + 30 (Nov) + 31 (Dec)
-       + 18 years and 5 leap days. */
-    GetSystemTimeAsFileTime((FILETIME *)&time);
-    time.QuadPart +=
-
-          (unsigned __int64) (1000*1000*10)       /* seconds */
-        * (unsigned __int64) (60 * 60 * 24)       /* days */
-        * (unsigned __int64) (17+30+31+365*18+5); /* # of days */
-    *uuid_time = time.QuadPart;
-}
-
-/* Sample code, not for use in production; see RFC 1750 */
-void get_random_info(char seed[16])
-{
-    MD5_CTX c;
-    struct {
-        MEMORYSTATUS m;
-        SYSTEM_INFO s;
-        FILETIME t;
-        LARGE_INTEGER pc;
-        DWORD tc;
-        DWORD l;
-        char hostname[MAX_COMPUTERNAME_LENGTH + 1];
-    } r;
-
-    MD5Init(&c);
-    GlobalMemoryStatus(&r.m);
-    GetSystemInfo(&r.s);
-    GetSystemTimeAsFileTime(&r.t);
-    QueryPerformanceCounter(&r.pc);
-    r.tc = GetTickCount();
-    r.l = MAX_COMPUTERNAME_LENGTH + 1;
-    GetComputerNameA(r.hostname, &r.l);
-    MD5Update(&c, &r, sizeof r);
-    MD5Final(seed, &c);
-}
-
-#else
-
-void get_system_time(uuid_time_t *uuid_time)
-{
-    struct timeval tp;
-
-    gettimeofday(&tp, (struct timezone *)0);
-
-    /* Offset between UUID formatted times and Unix formatted times.
-       UUID UTC base time is October 15, 1582.
-       Unix base time is January 1, 1970.*/
-    *uuid_time = ((unsigned64)tp.tv_sec * 10000000)
-        + ((unsigned64)tp.tv_usec * 10)
-        + I64(0x01B21DD213814000);
-}
-
-/* Sample code, not for use in production; see RFC 1750 */
-void get_random_info(char seed[16])
-{
-    MD5_CTX c;
-    struct {
-        struct sysinfo s;
-        struct timeval t;
-        char hostname[257];
-    } r;
-
-    MD5Init(&c);
-    sysinfo(&r.s);
-    gettimeofday(&r.t, (struct timezone *)0);
-    gethostname(r.hostname, 256);
-    MD5Update(&c, &r, sizeof r);
-    MD5Final(seed, &c);
-}
-
-#endif
diff --git a/packaging/u3/tools/sysdep.h b/packaging/u3/tools/sysdep.h
deleted file mode 100644 (file)
index 5d9dc1d..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/* sysdep.h
- * UUID system dependent routines
- *
- * $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.
- */
-
-/*
-** Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc.
-** Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. &
-** Digital Equipment Corporation, Maynard, Mass.
-** Copyright (c) 1998 Microsoft.
-** To anyone who acknowledges that this file is provided "AS IS"
-** without any express or implied warranty: permission to use, copy,
-** modify, and distribute this file for any purpose is hereby
-** granted without fee, provided that the above copyright notices and
-** this notice appears in all source code copies, and that none of
-** the names of Open Software Foundation, Inc., Hewlett-Packard
-** Company, Microsoft, or Digital Equipment Corporation be used in
-** advertising or publicity pertaining to distribution of the software
-** without specific, written prior permission. Neither Open Software
-** Foundation, Inc., Hewlett-Packard Company, Microsoft, nor Digital
-** Equipment Corporation makes any representations about the
-** suitability of this software for any purpose.
-*/
-
-#include "config.h"
-
-#ifndef _WIN32
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/sysinfo.h>
-#endif
-
-#ifdef HAVE_LIBGCRYPT
-#include <wsutil/wsgcrypt.h>
-
-/* md5 /sha abstraction layer */
-#define SHA_CTX                     gcry_md_hd_t
-#define SHA1_Init(md)               gcry_md_open(md, GCRY_MD_SHA1, 0)
-#define SHA1_Update(md, data, len)  gcry_md_write(*(md), data, len)
-#define SHA1_Final(buf, md)         memcpy(buf, gcry_md_read(*(md), GCRY_MD_SHA1), gcry_md_get_algo_dlen(GCRY_MD_SHA1))
-
-#define MD5_CTX                     gcry_md_hd_t
-#define MD5Init(md)                 gcry_md_open(md, GCRY_MD_MD5, 0)
-#define MD5Update(md, data, len)    gcry_md_write(*(md), data, len)
-#define MD5Final(buf, md)           memcpy(buf, gcry_md_read(*(md), GCRY_MD_MD5), gcry_md_get_algo_dlen(GCRY_MD_MD5))
-#endif
-
-/* set the following to the number of 100ns ticks of the actual
-   resolution of your system's clock */
-#define UUIDS_PER_TICK 1024
-
-/* Set the following to a calls to get and release a global lock */
-#define LOCK
-#define UNLOCK
-
-typedef unsigned long   unsigned32;
-typedef unsigned short  unsigned16;
-typedef unsigned char   unsigned8;
-typedef unsigned char   byte;
-
-/* Set this to what your compiler uses for 64-bit data type */
-#ifdef _WIN32
-#define unsigned64_t unsigned __int64
-#define I64(C) C
-#else
-#define unsigned64_t unsigned long long
-#define I64(C) C##LL
-#endif
-
-typedef unsigned64_t uuid_time_t;
-typedef struct {
-    char nodeID[6];
-} uuid_node_t;
-
-void get_ieee_node_identifier(uuid_node_t *node);
-void get_system_time(uuid_time_t *uuid_time);
-void get_random_info(char seed[16]);
-
diff --git a/packaging/u3/tools/utest.c b/packaging/u3/tools/utest.c
deleted file mode 100644 (file)
index 2841d24..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-/* utest.c
- * UUID generation test harness and Wireshark Namespace UUID generation
- *
- * $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.
- */
-
-/*
-** Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc.
-** Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. &
-** Digital Equipment Corporation, Maynard, Mass.
-** Copyright (c) 1998 Microsoft.
-** To anyone who acknowledges that this file is provided "AS IS"
-** without any express or implied warranty: permission to use, copy,
-** modify, and distribute this file for any purpose is hereby
-** granted without fee, provided that the above copyright notices and
-** this notice appears in all source code copies, and that none of
-** the names of Open Software Foundation, Inc., Hewlett-Packard
-** Company, Microsoft, or Digital Equipment Corporation be used in
-** advertising or publicity pertaining to distribution of the software
-** without specific, written prior permission. Neither Open Software
-** Foundation, Inc., Hewlett-Packard Company, Microsoft, nor Digital
-** Equipment Corporation makes any representations about the
-** suitability of this software for any purpose.
-*/
-
-#include "sysdep.h"
-#include <stdio.h>
-#include "uuid.h"
-
-uuid_t NameSpace_DNS = { /* 6ba7b810-9dad-11d1-80b4-00c04fd430c8 */
-    0x6ba7b810,
-    0x9dad,
-    0x11d1,
-    0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8
-};
-
-/* The Wireshark namespace */
-uuid_t NameSpace_WS = { /* 94630be0-e031-11db-974d-0002a5d5c51b */
-    0x94630be0,
-    0xe031,
-    0x11db,
-    0x97, 0x4d, 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b
-};
-
-
-/* puid -- print a UUID */
-void puid(uuid_t u)
-{
-    int i;
-
-    printf("%8.8x-%4.4x-%4.4x-%2.2x%2.2x-", u.time_low, u.time_mid,
-    u.time_hi_and_version, u.clock_seq_hi_and_reserved,
-    u.clock_seq_low);
-    for (i = 0; i < 6; i++)
-        printf("%2.2x", u.node[i]);
-}
-
-/* Simple driver for UUID generator */
-void main(int argc, char **argv)
-{
-    uuid_t u;
-    int f;
-
-    if(argc > 1) { 
-
-      uuid_create_sha1_from_name(&u, NameSpace_WS, argv[1], (int)strlen(argv[1]));
-      printf("s/$(UUID)/"); puid(u); printf("/\n");
-
-      exit(0);
-
-    } else {
-
-      uuid_create(&u);
-      printf("uuid_create(): "); puid(u); printf("\n");
-
-      f = uuid_compare(&u, &u);
-      printf("uuid_compare(u,u): %d\n", f);     /* should be 0 */
-      f = uuid_compare(&u, &NameSpace_DNS);
-      printf("uuid_compare(u, NameSpace_DNS): %d\n", f); /* s.b. 1 */
-      f = uuid_compare(&NameSpace_DNS, &u);
-      printf("uuid_compare(NameSpace_DNS, u): %d\n", f); /* s.b. -1 */
-      uuid_create_md5_from_name(&u, NameSpace_DNS, "www.widgets.com", 15);
-      printf("uuid_create_md5_from_name(): "); puid(u); printf("\n");
-
-    }
-}
diff --git a/packaging/u3/tools/uuid.c b/packaging/u3/tools/uuid.c
deleted file mode 100644 (file)
index 770fc60..0000000
+++ /dev/null
@@ -1,311 +0,0 @@
-/* uuid.c
- * UUID generation 
- *
- * $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.
- */
-
-/*
-** Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc.
-** Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. &
-** Digital Equipment Corporation, Maynard, Mass.
-** Copyright (c) 1998 Microsoft.
-** To anyone who acknowledges that this file is provided "AS IS"
-** without any express or implied warranty: permission to use, copy,
-** modify, and distribute this file for any purpose is hereby
-** granted without fee, provided that the above copyright notices and
-** this notice appears in all source code copies, and that none of
-** the names of Open Software Foundation, Inc., Hewlett-Packard
-** Company, Microsoft, or Digital Equipment Corporation be used in
-** advertising or publicity pertaining to distribution of the software
-** without specific, written prior permission. Neither Open Software
-** Foundation, Inc., Hewlett-Packard Company, Microsoft, nor Digital
-** Equipment Corporation makes any representations about the
-** suitability of this software for any purpose.
-*/
-
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
-#include "sysdep.h"
-#include "uuid.h"
-
-/* various forward declarations */
-static int read_state(unsigned16 *clockseq, uuid_time_t *timestamp,
-    uuid_node_t *node);
-static void write_state(unsigned16 clockseq, uuid_time_t timestamp,
-    uuid_node_t node);
-static void format_uuid_v1(uuid_t *uuid, unsigned16 clockseq,
-    uuid_time_t timestamp, uuid_node_t node);
-static void format_uuid_v3or5(uuid_t *uuid, unsigned char hash[16],
-    int v);
-static void get_current_time(uuid_time_t *timestamp);
-static unsigned16 true_random(void);
-
-/* uuid_create -- generator a UUID */
-int uuid_create(uuid_t *uuid)
-{
-     uuid_time_t timestamp, last_time;
-     unsigned16 clockseq;
-     uuid_node_t node;
-     uuid_node_t last_node;
-     int f;
-
-     /* acquire system-wide lock so we're alone */
-     LOCK;
-     /* get time, node ID, saved state from non-volatile storage */
-     get_current_time(&timestamp);
-     get_ieee_node_identifier(&node);
-     f = read_state(&clockseq, &last_time, &last_node);
-
-     /* if no NV state, or if clock went backwards, or node ID
-        changed (e.g., new network card) change clockseq */
-     if (!f || memcmp(&node, &last_node, sizeof node))
-         clockseq = true_random();
-     else if (timestamp < last_time)
-         clockseq++;
-
-     /* save the state for next time */
-     write_state(clockseq, timestamp, node);
-
-     UNLOCK;
-
-     /* stuff fields into the UUID */
-     format_uuid_v1(uuid, clockseq, timestamp, node);
-     return 1;
-}
-
-/* format_uuid_v1 -- make a UUID from the timestamp, clockseq,
-                     and node ID */
-void format_uuid_v1(uuid_t* uuid, unsigned16 clock_seq,
-                    uuid_time_t timestamp, uuid_node_t node)
-{
-    /* Construct a version 1 uuid with the information we've gathered
-       plus a few constants. */
-    uuid->time_low = (unsigned long)(timestamp & 0xFFFFFFFF);
-    uuid->time_mid = (unsigned short)((timestamp >> 32) & 0xFFFF);
-    uuid->time_hi_and_version =
-        (unsigned short)((timestamp >> 48) & 0x0FFF);
-    uuid->time_hi_and_version |= (1 << 12);
-    uuid->clock_seq_low = clock_seq & 0xFF;
-    uuid->clock_seq_hi_and_reserved = (clock_seq & 0x3F00) >> 8;
-    uuid->clock_seq_hi_and_reserved |= 0x80;
-    memcpy(&uuid->node, &node, sizeof uuid->node);
-}
-
-/* data type for UUID generator persistent state */
-typedef struct {
-    uuid_time_t  ts;       /* saved timestamp */
-    uuid_node_t  node;     /* saved node ID */
-    unsigned16   cs;       /* saved clock sequence */
-} uuid_state;
-
-static uuid_state st;
-
-/* read_state -- read UUID generator state from non-volatile store */
-int read_state(unsigned16 *clockseq, uuid_time_t *timestamp,
-               uuid_node_t *node)
-{
-    static int inited = 0;
-    FILE *fp;
-
-    /* only need to read state once per boot */
-    if (!inited) {
-        fp = fopen("state", "rb");
-        if (fp == NULL)
-            return 0;
-        fread(&st, sizeof st, 1, fp);
-        fclose(fp);
-        inited = 1;
-    }
-    *clockseq = st.cs;
-    *timestamp = st.ts;
-    *node = st.node;
-    return 1;
-}
-
-/* write_state -- save UUID generator state back to non-volatile
-   storage */
-void write_state(unsigned16 clockseq, uuid_time_t timestamp,
-                 uuid_node_t node)
-{
-    static int inited = 0;
-    static uuid_time_t next_save;
-    FILE* fp;
-
-    if (!inited) {
-        next_save = timestamp;
-        inited = 1;
-    }
-
-    /* always save state to volatile shared state */
-    st.cs = clockseq;
-    st.ts = timestamp;
-    st.node = node;
-    if (timestamp >= next_save) {
-        fp = fopen("state", "wb");
-        fwrite(&st, sizeof st, 1, fp);
-        fclose(fp);
-        /* schedule next save for 10 seconds from now */
-        next_save = timestamp + (10 * 10 * 1000 * 1000);
-    }
-}
-
-/* get-current_time -- get time as 60-bit 100ns ticks since UUID epoch.
-   Compensate for the fact that real clock resolution is
-   less than 100ns. */
-void get_current_time(uuid_time_t *timestamp)
-{
-    static int inited = 0;
-    static uuid_time_t time_last;
-    static unsigned16 uuids_this_tick;
-    uuid_time_t time_now;
-
-    if (!inited) {
-        get_system_time(&time_now);
-        uuids_this_tick = UUIDS_PER_TICK;
-        inited = 1;
-    }
-
-    for ( ; ; ) {
-        get_system_time(&time_now);
-
-        /* if clock reading changed since last UUID generated, */
-        if (time_last != time_now) {
-            /* reset count of uuids gen'd with this clock reading */
-            uuids_this_tick = 0;
-            time_last = time_now;
-            break;
-        }
-        if (uuids_this_tick < UUIDS_PER_TICK) {
-            uuids_this_tick++;
-            break;
-        }
-        /* going too fast for our clock; spin */
-    }
-    /* add the count of uuids to low order bits of the clock reading */
-    *timestamp = time_now + uuids_this_tick;
-}
-
-/* true_random -- generate a crypto-quality random number.
-   **This sample doesn't do that.** */
-static unsigned16 true_random(void)
-{
-    static int inited = 0;
-    uuid_time_t time_now;
-
-    if (!inited) {
-        get_system_time(&time_now);
-        time_now = time_now / UUIDS_PER_TICK;
-        srand((unsigned int)
-               (((time_now >> 32) ^ time_now) & 0xffffffff));
-        inited = 1;
-    }
-
-    return rand();
-}
-
-/* uuid_create_md5_from_name -- create a version 3 (MD5) UUID using a
-   "name" from a "name space" */
-void uuid_create_md5_from_name(uuid_t *uuid, uuid_t nsid, void *name,
-                               int namelen)
-{
-    MD5_CTX c;
-    unsigned char hash[16];
-    uuid_t net_nsid;
-
-    /* put name space ID in network byte order so it hashes the same
-       no matter what endian machine we're on */
-    net_nsid = nsid;
-    net_nsid.time_low = htonl(net_nsid.time_low);
-    net_nsid.time_mid = htons(net_nsid.time_mid);
-    net_nsid.time_hi_and_version = htons(net_nsid.time_hi_and_version);
-
-    MD5Init(&c);
-    MD5Update(&c, &net_nsid, sizeof net_nsid);
-    MD5Update(&c, name, namelen);
-    MD5Final(hash, &c);
-
-    /* the hash is in network byte order at this point */
-    format_uuid_v3or5(uuid, hash, 3);
-}
-
-void uuid_create_sha1_from_name(uuid_t *uuid, uuid_t nsid, void *name,
-                                int namelen)
-{
-    SHA_CTX c;
-    unsigned char hash[20];
-    uuid_t net_nsid;
-
-    /* put name space ID in network byte order so it hashes the same
-       no matter what endian machine we're on */
-    net_nsid = nsid;
-    net_nsid.time_low = htonl(net_nsid.time_low);
-    net_nsid.time_mid = htons(net_nsid.time_mid);
-    net_nsid.time_hi_and_version = htons(net_nsid.time_hi_and_version);
-
-    SHA1_Init(&c);
-    SHA1_Update(&c, &net_nsid, sizeof net_nsid);
-    SHA1_Update(&c, name, namelen);
-    SHA1_Final(hash, &c);
-
-    /* the hash is in network byte order at this point */
-    format_uuid_v3or5(uuid, hash, 5);
-}
-
-/* format_uuid_v3or5 -- make a UUID from a (pseudo)random 128-bit
-   number */
-void format_uuid_v3or5(uuid_t *uuid, unsigned char hash[16], int v)
-{
-    /* convert UUID to local byte order */
-    memcpy(uuid, hash, sizeof *uuid);
-    uuid->time_low = ntohl(uuid->time_low);
-    uuid->time_mid = ntohs(uuid->time_mid);
-    uuid->time_hi_and_version = ntohs(uuid->time_hi_and_version);
-
-    /* put in the variant and version bits */
-    uuid->time_hi_and_version &= 0x0FFF;
-    uuid->time_hi_and_version |= (v << 12);
-    uuid->clock_seq_hi_and_reserved &= 0x3F;
-    uuid->clock_seq_hi_and_reserved |= 0x80;
-}
-
-/* uuid_compare --  Compare two UUID's "lexically" and return */
-#define CHECK(f1, f2) if (f1 != f2) return f1 < f2 ? -1 : 1;
-int uuid_compare(uuid_t *u1, uuid_t *u2)
-{
-    int i;
-
-    CHECK(u1->time_low, u2->time_low);
-    CHECK(u1->time_mid, u2->time_mid);
-    CHECK(u1->time_hi_and_version, u2->time_hi_and_version);
-    CHECK(u1->clock_seq_hi_and_reserved, u2->clock_seq_hi_and_reserved);
-    CHECK(u1->clock_seq_low, u2->clock_seq_low)
-    for (i = 0; i < 6; i++) {
-        if (u1->node[i] < u2->node[i])
-            return -1;
-        if (u1->node[i] > u2->node[i])
-            return 1;
-    }
-    return 0;
-}
-#undef CHECK
-
diff --git a/packaging/u3/tools/uuid.h b/packaging/u3/tools/uuid.h
deleted file mode 100644 (file)
index 8c90087..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/* uuid.h
- * UUID generation 
- *
- * $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.
- */
-
-/*
-** Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc.
-** Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. &
-** Digital Equipment Corporation, Maynard, Mass.
-** Copyright (c) 1998 Microsoft.
-** To anyone who acknowledges that this file is provided "AS IS"
-** without any express or implied warranty: permission to use, copy,
-** modify, and distribute this file for any purpose is hereby
-** granted without fee, provided that the above copyright notices and
-** this notice appears in all source code copies, and that none of
-** the names of Open Software Foundation, Inc., Hewlett-Packard
-** Company, Microsoft, or Digital Equipment Corporation be used in
-** advertising or publicity pertaining to distribution of the software
-** without specific, written prior permission. Neither Open Software
-** Foundation, Inc., Hewlett-Packard Company, Microsoft, nor Digital
-** Equipment Corporation makes any representations about the
-** suitability of this software for any purpose.
-*/
-
-#undef uuid_t
-typedef struct {
-    unsigned32  time_low;
-    unsigned16  time_mid;
-    unsigned16  time_hi_and_version;
-    unsigned8   clock_seq_hi_and_reserved;
-    unsigned8   clock_seq_low;
-    byte        node[6];
-} uuid_t;
-
-/* uuid_create -- generate a UUID */
-int uuid_create(uuid_t * uuid);
-
-/* uuid_create_md5_from_name -- create a version 3 (MD5) UUID using a
-   "name" from a "name space" */
-void uuid_create_md5_from_name(
-    uuid_t *uuid,         /* resulting UUID */
-    uuid_t nsid,          /* UUID of the namespace */
-    void *name,           /* the name from which to generate a UUID */
-    int namelen           /* the length of the name */
-);
-
-/* uuid_create_sha1_from_name -- create a version 5 (SHA-1) UUID
-   using a "name" from a "name space" */
-void uuid_create_sha1_from_name(
-
-    uuid_t *uuid,         /* resulting UUID */
-    uuid_t nsid,          /* UUID of the namespace */
-    void *name,           /* the name from which to generate a UUID */
-    int namelen           /* the length of the name */
-);
-
-/* uuid_compare --  Compare two UUID's "lexically" and return
-        -1   u1 is lexically before u2
-         0   u1 is equal to u2
-         1   u1 is lexically after u2
-   Note that lexical ordering is not temporal ordering!
-*/
-int uuid_compare(uuid_t *u1, uuid_t *u2);
-
-
diff --git a/packaging/u3/win32/Makefile.nmake b/packaging/u3/win32/Makefile.nmake
deleted file mode 100644 (file)
index 4a9cf08..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-#
-# $Id$
-#
-
-include ../../../config.nmake
-include <win32.mak>
-
-CC     = cl
-LINK   = link
-
-LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 /ENTRY:mainCRTStartup $(LOCAL_LDFLAGS)
-
-DEVICE         = device
-HOST   = host
-MANIFEST= manifest
-DATA   = data
-
-WSMANIFEST     = ../../wireshark.manifest
-
-TOPDIR = ..\..\..
-TOOLSDIR= ..\tools
-COPY   = xcopy
-MKDIR  = mkdir
-COPY_FLAGS     = /d /y
-
-!undef UPX
-UPX_FLAGS = -q
-
-U3_VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_MICRO)
-
-all:   package
-
-
-uuid.sed: $(TOPDIR)\config.nmake
-       cd $(TOOLSDIR)
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..\win32
-       $(TOOLSDIR)\utest.exe "$(VERSION)" > $@
-
-manifest.u3i:  manifest.tmpl uuid.sed
-       sed -e 's/$$(U3_VERSION)/$(U3_VERSION)/g' \
-           -e 's/$$(VERSION)/$(VERSION)/g' \
-#ifdef UPX
-           -e 's/$$(SIZE)/50/g' \
-#else
-           -e 's/$$(SIZE)/65/g' \
-#endif
-           -f  uuid.sed < manifest.tmpl > manifest.u3i
-
-u3-dirs:
-       if not exist $(HOST) $(MKDIR) $(HOST)
-       if not exist $(DEVICE) $(MKDIR) $(DEVICE)
-       if not exist $(DATA) $(MKDIR) $(DATA)
-       if not exist $(DATA)\"My Captures" $(MKDIR) $(DATA)\"My Captures"
-       if not exist $(MANIFEST) $(MKDIR) $(MANIFEST)
-
-nsis-bits:
-       cd ../../nsis
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake user-guide.chm
-       cd ../u3/win32
-
-$(WSMANIFEST):
-       cd ../..
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake wireshark.manifest
-       cd u3/win32
-
-distribution.nmake:    makenmake.pl $(WSMANIFEST) ../../ws-manifest.pl
-       $(PERL) makenmake.pl $(WSMANIFEST) > $@ 
-
-distribution: u3-dirs manifest.u3i u3util.exe nsis-bits wireshark.bat distribution.nmake
-# manifest
-       $(COPY) manifest.u3i $(MANIFEST) $(COPY_FLAGS)
-       $(COPY) $(TOPDIR)\image\wireshark.ico $(MANIFEST) $(COPY_FLAGS)
-       $(COPY) u3util.exe $(HOST) $(COPY_FLAGS)
-       $(MAKE) /$(MAKEFLAGS) -f distribution.nmake 
-
-verify-tools:  
-!IFDEF UPX
-       @if not exist $(UPX) echo Error: $(UPX) not found. &&\
-echo Either: &&\
-echo a) run 'nmake -f Makefile.nmake setup' at the toplevel; or &&\
-echo b) comment out UPX in config.nmake at the top level, to build without compressing the dlls and exes \
-&& exit 2
-!endif
-
-pack:  distribution
-!IFDEF UPX
-       -$(UPX) $(UPX_FLAGS) $(DEVICE)\plugins\$(VERSION)\*.dll
-       -$(UPX) $(UPX_FLAGS) $(HOST)\*.dll
-       -$(UPX) $(UPX_FLAGS) $(HOST)\lib\gtk-2.0\$(GTK_LIB_DIR)\loaders\*.dll
-       -$(UPX) $(UPX_FLAGS) $(HOST)\lib\gtk-2.0\$(GTK_LIB_DIR)\engines\*.dll
-       -$(UPX) $(UPX_FLAGS) $(HOST)\$(GTK_WIMP_DLLDST_DIR)\*.dll
-       -$(UPX) $(UPX_FLAGS) $(HOST)\*.exe      
-!ENDIF
-
-test:          pack
-       wireshark.bat -D
-
-package:       verify-tools test
-       zip -r Wireshark-$(VERSION).u3p $(MANIFEST) $(DEVICE) $(DATA) $(HOST) wireshark.bat
-
-CFLAGS = -DWINPCAP_PACKAGE="\"\\\\WinPcap_$(PCAP_VERSION).exe\""
-
-u3util_LIBS= user32.lib shell32.lib
-
-u3util.exe:    u3util.obj ../../../config.nmake
-       @echo Linking $@
-       $(LINK) @<<
-               /OUT:u3util.exe $(guiflags) $(LDFLAGS) u3util.obj $(u3util_LIBS) $(guilibsdll)
-<<
-!IFDEF MANIFEST_INFO_REQUIRED
-       mt.exe -nologo -manifest "u3util.exe.manifest" -outputresource:u3util.exe;1
-!ENDIF
-
-clean:
-       cd ../tools
-       $(MAKE) -f Makefile.nmake $@
-       cd ../win32
-       cd ../../
-       $(MAKE) -f Makefile.nmake $@
-       cd u3/win32
-       rm -rf manifest.u3i
-       rm -rf uuid.sed
-       rm -rf nodeid state
-       rm -rf $(HOST)
-       rm -rf $(DEVICE)
-       rm -rf $(DATA)
-       rm -rf $(MANIFEST)
-       rm -rf u3util.{exe,obj,pdb}
-       rm -rf wireshark-$(VERSION).u3p
-       rm -rf distribution.nmake
-       rm -rf *~ *.*~
-
-distclean:     clean
-       rm -rf wireshark*.u3p
-
-maintainer-clean:      distclean
diff --git a/packaging/u3/win32/README.txt b/packaging/u3/win32/README.txt
deleted file mode 100644 (file)
index 0555ec8..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-$Id$
-
-U3
-==
-
-U3 was a portable (installer-less) application technology developed by
-SanDisk and M-Systems. According to
-
-http://kb.sandisk.com/app/answers/detail/a_id/5358/kw/u3
-
-U3 technology reached end of life in 2009. The developer information
-which was hosted at www.u3.com is no longer available. Starting with
-Wireshark 1.11 U3 packages are no longer officially supported and this
-directory will eventually be removed.
-
-See also:
-http://en.wikipedia.org/wiki/U3 and http://www.u3.com
-
-U3 Packaging
-============
-
-This directory contains the scripts to build a U3 Package (wireshark.u3p) that can be loaded onto a U3 device. This will allow Wireshark to be run from any Windows machine the U3 device is plugged into, without having to install Wireshark directly. For more details about U3 devices, see http://www.u3.com/.
-
-The U3 package is basically a zip file with a manifest file (wireshark.u3i), a small utility to manage the shutdown of Wireshark when the device is removed, and the Wireshark application files. The package contains all the standard Wireshark components (e.g. tshark.exe), even though they cannot be directly accessed. However, with a suitable additional script (setting the U3 environment variables), the would meet the "wireshark-as-a-zip" wish.
-
-You will need the cygwin zip archive package to build the package itself. Once you have the package you can load the package using "Add Programs"/"Install from My Computer" from the U3 LaunchPad.
-
-A few minor changes have been made to Wireshark itself:
-1) Wireshark will write a <pid>.pid file while running. This allows the utility to close down Wireshark when the device is removed.
-2) filesystem.c has been changed to take advantage of the U3 "datafile_dir" and "persconffile_dir". Personal settings are then stored on the device.
-3) The files in the 'recent' file are written in a form that allows the U3 device path to change.
-
-There is a [self-]certification process for U3 packages which could be undertaken if there is sufficient interest for this package format. Wireshark could then be placed on Software Central - http://software.u3.com/SoftwareCentral.aspx?skip=1.
-
-UPX
-===
-
-If the Ultimate Packer for eXecutables (UPX) (http://upx.sourceforge.net) is downloaded and configured in config.nmake, the packaging process will pack all of the dll and exes before putting them into the U3 pacakage. This can significantly reduce the size of the U3 package - by about 40%.
-
-Known Issues:
-=============
-
-1) The U3 package tries to install WinPcap if it is not already installed when it is first run. It will be automatically removed when the device is removed. But this is not the best approach.
-2) The distribution of the files across the U3 host and U3 device needs to be verified for all protocols.
-3) The list of files should be derived from a common source (e.g. nsis/wireshark.nsi)
-4) Wireshark does not close down cleanly when a dialog is up.
-5) If Wireshark is uninstalled from the U3 stick, all personal settings are gone. This is unlike the "normal" WS package, but seems to be common for U3 programs.
diff --git a/packaging/u3/win32/makenmake.pl b/packaging/u3/win32/makenmake.pl
deleted file mode 100755 (executable)
index c3d1986..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-#
-# makenmake.pl - create a nmake file from a generic manifest file that will create the appropriate U3 structure
-# $Id$
-#
-
-print q{
-#
-# DO NOT EDIT - autogenerated from makenmake.pl
-#
-
-include ../../../config.nmake
-include <win32.mak>
-
-DEVICE         = device
-HOST   = host
-MANIFEST= manifest
-DATA   = data
-
-TOPDIR = ..\..\..
-STAGING_DIR = $(TOPDIR)\$(INSTALL_DIR)
-
-COPY   = xcopy
-MOVE    = mv
-MKDIR  = mkdir
-COPY_FLAGS     = /d /y 
-
-distribution:
-};
-
-while($line = <>) {
-    
-    if($line =~ /^\#/) { # comment
-       next;
-    } elsif($line =~ /^\[(\S+)/) { # new directory
-       $dir = $1;
-       undef $u3loc;
-
-       # Close any previous !IFDEFs
-       if(defined $define) {
-           print "!ENDIF\n";
-       }
-       undef $define;
-
-       if($line =~ /u3loc=(\w+)/) {
-           $u3loc = "\$(" . uc $1 . ")";
-       }
-
-       $dir =~ s/\$INSTDIR?//; # remove $INSTDIR
-       
-       $dir =~ s/\{/\(/g; $dir =~ s/\}/\)/g; # convert curlies to round brackets
-
-       if($dir ne '') { 
-           print "\tif not exist $u3loc$dir \$(MKDIR) $u3loc$dir\n";
-       }
-       
-    } else { # this is a file
-
-       $line =~ /^\s+(\S+)/;
-       $file = $1;
-
-       $file =~ s/\{/\(/g; $file =~ s/\}/\)/g; # convert curlies to round brackets
-
-       if($file =~ /^[^\$]/) {
-           $file = "\$(TOPDIR)\\" . $file;
-       }
-
-       if($line =~ /ifdef=(\w+)/) { # dependency
-           if($define ne $1) {
-               if(defined $define) {
-                   print "!ENDIF\n";
-               }
-               $define = $1;
-               print "!IF DEFINED($define)\n";
-           }
-       } else {            
-           if(defined $define) {
-               print "!ENDIF\n";
-           }
-           undef $define;
-       }
-
-       $u3fileloc = $u3loc; # default location
-       $oname = "";
-
-       if($line =~ /u3loc=(\S+)/) { # override this location
-           $u3fileloc = "\$(" . uc $1 . ")";
-       }
-
-       print "\t\$(COPY) \"$file\" \"$u3fileloc$dir\" \$(COPY_FLAGS)\n";
-
-       if($line =~ /oname=(\S+)/) { # override this filename
-           $oname = $1;
-           $file =~ /\\(.*)$/;
-           $name = $1;
-
-           print "\t\$(MOVE) \"$u3fileloc$dir\\$name\" \"$u3fileloc$dir\\$oname\"\n";
-
-       }
-
-    }
-}
diff --git a/packaging/u3/win32/manifest.tmpl b/packaging/u3/win32/manifest.tmpl
deleted file mode 100644 (file)
index b43d7dd..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<u3manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
-       <application uuid="$(UUID)" version="$(U3_VERSION)">
-               <icon>wireshark.ico</icon>
-               <name>Wireshark</name>
-               <vendor url="http://www.wireshark.org/">The Wireshark Community</vendor>
-               <description>Wireshark $(VERSION) is one of the world's foremost network protocol analyzers, and is the standard in many parts of the industry.</description>
-               <shortDescription>Network protocol analyzer</shortDescription>
-               <options>
-                       <minFreeSpace>$(SIZE)</minFreeSpace>
-                       <upgrade appData="remove" deviceExec="remove"/>
-               </options>
-       </application>
-       <actions>
-               <hostConfigure cmd="%U3_HOST_EXEC_PATH%\u3util.exe">hostConfigure</hostConfigure>
-               <appStart cmd="%U3_HOST_EXEC_PATH%\wireshark.exe"/>
-               <appStop cmd="%U3_HOST_EXEC_PATH%\u3util.exe">appStop</appStop>
-               <hostCleanUp cmd="%U3_HOST_EXEC_PATH%\u3util.exe">hostCleanUp</hostCleanUp>
-       </actions>
-</u3manifest>
diff --git a/packaging/u3/win32/u3util.c b/packaging/u3/win32/u3util.c
deleted file mode 100644 (file)
index f93b289..0000000
+++ /dev/null
@@ -1,905 +0,0 @@
-/* u3util.c
- * Utility routines for U3 device support
- *
- * $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.
- */
-
-/* Adapted from Microsoft Knowledge Base Article 178893
- *
- * http://support.microsoft.com/?kbid=178893
- *
- * and the U3 Answer 106
- *
- * https://u3.custhelp.com/cgi-bin/u3/php/enduser/std_adp.php?p_faqid=106
- *
- * Indentation logic: 2-space
- */
-
-#include <windows.h>
-#include <winreg.h>
-#include <shlobj.h>
-
-
-#define WIRESHARK_ASSOC "u3-wireshark-file"
-#define WIRESHARK_DESC  "U3 Wireshark File"
-
-#define SHELL                "\\Shell"
-#define SHELL_OPEN           "\\Shell\\open"
-#define SHELL_OPEN_COMMAND   "\\Shell\\open\\command"
-#define DEFAULT_ICON         "\\DefaultIcon"
-
-#define WINPCAP_KEY          "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\WinPcapInst"
-#define WINPCAP_UNINSTALL    "UninstallString"
-#define WINPCAP_U3INSTALLED  "U3Installed"  /* indicate the U3 device that installed WinPcap */
-
-#define VCREDIST_PACKAGE     "\\vcredist_x86.exe"
-#define VCREDIST_KEY         "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{9A25302D-30C0-39D9-BD6F-21E6EC160475}"
-#define VCREDIST_UNINSTALL    "UninstallString"
-#define VCREDIST_U3INSTALLED  "U3Installed"  /* indicate the U3 device that installed the redistributable */
-
-
-#define WINDOWS_VERSION_KEY  "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"
-#define WINDOWS_VERSION      "CurrentVersion"
-#define VISTA_VERSION        "6.0"
-
-#define NPF_KEY              "SYSTEM\\CurrentControlSet\\Service\\NPF"
-#define NPF_START            "Start"
-#define NPF_START_VAL        2 /* SERVICE_AUTO_START */
-
-#define MY_CAPTURES          "\\My Captures"
-
-#define BUFSIZ              256
-#define FILEBUFSIZ          4096
-
-#define ENV_FILENAME        "\\u3_environment.txt"
-#define U3UTIL_APPSTART     "\\u3util.exe appStart %1"
-#define WIRESHARK_EXE       "\\wireshark.exe"
-
-static char *extensions[] = {
-  ".5vw",
-  ".acp",
-  ".apc",
-  ".atc",
-  ".bfr",
-  ".cap",
-  ".enc",
-  ".erf",
-  ".fdc",
-  ".pcap",
-  ".pkt",
-  ".tpc",
-  ".tr1",
-  ".trace",
-  ".trc",
-  ".wpc",
-  ".wpz",
-  /* and BER encoded files */
-  ".cer",
-  ".crt",
-  ".crl",
-  ".p12",
-  ".pfx",
-  ".asn",
-  ".spf",
-  ".p7c",
-  ".p7s",
-  ".p7m",
-  NULL
-};
-
-static char *environmentvars[] = {
-  "U3_DEVICE_SERIAL",
-  "U3_DEVICE_PATH",
-  "U3_DEVICE_DOCUMENT_PATH",
-  "U3_DEVICE_VENDOR",
-  "U3_DEVICE_PRODUCT",
-  "U3_DEVICE_VENDOR_ID",
-  "U3_APP_DATA_PATH",
-  "U3_HOST_EXEC_PATH",
-  "U3_DEVICE_EXEC_PATH",
-  "U3_ENV_VERSION",
-  "U3_ENV_LANGUAGE",
-  NULL,
-};
-
-#define TA_FAILED 0
-#define TA_SUCCESS_CLEAN 1
-#define TA_SUCCESS_KILL 2
-#define TA_SUCCESS_16 3
-
-DWORD TerminateApp( DWORD dwPID, DWORD dwTimeout ) ;
-DWORD Terminate16App( DWORD dwPID, DWORD dwThread, WORD w16Task, DWORD dwTimeout );
-
-#include <vdmdbg.h>
-
-typedef struct
-{
-  DWORD   dwID ;
-  DWORD   dwThread ;
-} TERMINFO ;
-
-/* Declare Callback Enum Functions. */
-BOOL CALLBACK TerminateAppEnum( HWND hwnd, LPARAM lParam ) ;
-BOOL CALLBACK Terminate16AppEnum( HWND hwnd, LPARAM lParam ) ;
-
-/*----------------------------------------------------------------
-  DWORD TerminateApp( DWORD dwPID, DWORD dwTimeout )
-
-  Purpose:
-      Shut down a 32-Bit Process (or 16-bit process under Windows 95)
-
-  Parameters:
-      dwPID
-         Process ID of the process to shut down.
-
-      dwTimeout
-         Wait time in milliseconds before shutting down the process.
-
-   Return Value:
-      TA_FAILED - If the shutdown failed.
-      TA_SUCCESS_CLEAN - If the process was shutdown using WM_CLOSE.
-      TA_SUCCESS_KILL - if the process was shut down with
-         TerminateProcess().
-      NOTE:  See header for these defines.
-   ----------------------------------------------------------------*/
-
-DWORD TerminateApp( DWORD dwPID, DWORD dwTimeout )
-{
-  HANDLE   hProc ;
-  DWORD   dwRet ;
-
-  /* If we can't open the process with PROCESS_TERMINATE rights,
-   * then we give up immediately. */
-  hProc = OpenProcess(SYNCHRONIZE|PROCESS_TERMINATE, FALSE, dwPID);
-
-  if(hProc == NULL){
-    return TA_FAILED;
-  }
-
-  if(dwTimeout) {
-    /* we are prepared to wait */
-
-    /* TerminateAppEnum() posts WM_CLOSE to all windows whose PID */
-    /* matches your process's. */
-    EnumWindows((WNDENUMPROC)TerminateAppEnum, (LPARAM) dwPID) ;
-
-    /* Wait on the handle. If it signals, great. If it times out, */
-    /* then you kill it. */
-    if(WaitForSingleObject(hProc, dwTimeout)!=WAIT_OBJECT_0)
-      dwRet=(TerminateProcess(hProc,0)?TA_SUCCESS_KILL:TA_FAILED);
-    else
-      dwRet = TA_SUCCESS_CLEAN ;
-  } else {
-    /* we immediately kill the proces */
-    dwRet=(TerminateProcess(hProc,0)?TA_SUCCESS_KILL:TA_FAILED);
-  }
-
-  CloseHandle(hProc) ;
-
-  return dwRet ;
-}
-
-/*----------------------------------------------------------------
-  DWORD Terminate16App( DWORD dwPID, DWORD dwThread,
-                        WORD w16Task, DWORD dwTimeout )
-
-   Purpose:
-      Shut down a Win16 APP.
-
-   Parameters:
-      dwPID
-         Process ID of the NTVDM in which the 16-bit application is
-         running.
-
-      dwThread
-         Thread ID of the thread of execution for the 16-bit
-         application.
-
-      w16Task
-         16-bit task handle for the application.
-
-      dwTimeout
-         Wait time in milliseconds before shutting down the task.
-
-   Return Value:
-      If successful, returns TA_SUCCESS_16
-      If unsuccessful, returns TA_FAILED.
-      NOTE:  These values are defined in the header for this
-      function.
-
-   NOTE:
-      You can get the Win16 task and thread ID through the
-      VDMEnumTaskWOW() or the VDMEnumTaskWOWEx() functions.
-   ----------------------------------------------------------------*/
-
-DWORD Terminate16App( DWORD dwPID, DWORD dwThread, WORD w16Task, DWORD dwTimeout )
-{
-  HINSTANCE      hInstLib ;
-  TERMINFO      info ;
-
-  /* You will be calling the functions through explicit linking */
-  /* so that this code will be binary compatible across */
-  /* Win32 platforms. */
-  BOOL (WINAPI *lpfVDMTerminateTaskWOW)(DWORD dwProcessId, WORD htask) ;
-
-  hInstLib = LoadLibraryA( "VDMDBG.DLL" ) ;
-  if( hInstLib == NULL )
-    return TA_FAILED ;
-
-  /* Get procedure addresses. */
-  lpfVDMTerminateTaskWOW = (BOOL (WINAPI *)(DWORD, WORD ))
-    GetProcAddress( hInstLib, "VDMTerminateTaskWOW" ) ;
-
-  if( lpfVDMTerminateTaskWOW == NULL )
-    {
-      FreeLibrary( hInstLib ) ;
-      return TA_FAILED ;
-    }
-
-  /* Post a WM_CLOSE to all windows that match the ID and the */
-  /* thread. */
-  info.dwID = dwPID ;
-  info.dwThread = dwThread ;
-  EnumWindows((WNDENUMPROC)Terminate16AppEnum, (LPARAM) &info) ;
-
-  /* Wait. */
-  Sleep( dwTimeout ) ;
-
-  /* Then terminate. */
-  lpfVDMTerminateTaskWOW(dwPID, w16Task) ;
-
-  FreeLibrary( hInstLib ) ;
-  return TA_SUCCESS_16 ;
-}
-
-BOOL CALLBACK TerminateAppEnum( HWND hwnd, LPARAM lParam )
-{
-  DWORD dwID ;
-
-  GetWindowThreadProcessId(hwnd, &dwID) ;
-
-  if(dwID == (DWORD)lParam)
-    {
-      PostMessage(hwnd, WM_CLOSE, 0, 0) ;
-    }
-
-  return TRUE ;
-}
-
-BOOL CALLBACK Terminate16AppEnum( HWND hwnd, LPARAM lParam )
-{
-  DWORD      dwID ;
-  DWORD      dwThread ;
-  TERMINFO   *termInfo ;
-
-  termInfo = (TERMINFO *)lParam ;
-
-  dwThread = GetWindowThreadProcessId(hwnd, &dwID) ;
-
-  if(dwID == termInfo->dwID && termInfo->dwThread == dwThread )
-    {
-      PostMessage(hwnd, WM_CLOSE, 0, 0) ;
-    }
-
-  return TRUE ;
-}
-
-
-void ExecuteAndWait(char *buffer)
-{
-  STARTUPINFO         si;
-  PROCESS_INFORMATION pi;
-
-  SecureZeroMemory(&si, sizeof(si));
-  si.cb = sizeof(si);
-  SecureZeroMemory(&pi, sizeof(pi));
-
-  if(CreateProcess(NULL, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) {
-    /* wait for the uninstall to finish */
-    (void) WaitForSingleObject(pi.hProcess, INFINITE);
-
-    (void)CloseHandle(pi.hProcess);
-    (void)CloseHandle(pi.hThread);
-
-  }
-}
-
-void uninstall(char *regkey, char *u3installed, char *uninstall)
-{
-  char buffer[BUFSIZ];
-  int buflen = BUFSIZ;
-  char *u3_device_serial;
-  char reg_key[BUFSIZ];
-  HKEY  key;
-
-  /* UNINSTALL ONLY IF WE INSTALLED IT */
-  buffer[0] = '\0';
-
-  /* see if it is installed */
-  if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, regkey, 0, (KEY_READ | KEY_WRITE), &key) == ERROR_SUCCESS) {
-
-    buflen = BUFSIZ;
-
-    /* see if a U3 device installed the package */
-    if(RegQueryValueEx(key, u3installed, NULL, NULL, buffer, &buflen) == ERROR_SUCCESS) {
-
-      u3_device_serial = getenv("U3_DEVICE_SERIAL");
-
-      /* see if this U3 device installed the package */
-      if(!strncmp(buffer, u3_device_serial, strlen(u3_device_serial) + 1)) {
-
-       buffer[0] = '"';
-       buflen = BUFSIZ-1;
-       /* we installed WinPcap - we should now uninstall it - read the uninstall string */
-       (void) RegQueryValueEx(key, uninstall, NULL, NULL, &buffer[1], &buflen);
-
-
-       if(!strncmp(buffer, "\"MsiExec.exe", 12)) {
-         /* run msiexec.exe quietly */
-         strncat(buffer, " /qn", 5);
-
-       }
-
-       strncat(buffer, "\"", 2); /* close the quotes */
-
-       /* delete our value */
-       RegDeleteValue(key, u3installed);
-
-      } else {
-       /* empty the buffer */
-       buffer[0] = '\0';
-      }
-    }
-
-    RegCloseKey(key);
-  }
-
-  if(*buffer) {
-#if 0
-    MessageBox(NULL,
-              buffer,
-              "Uninstall",
-              MB_YESNO|MB_TOPMOST|MB_ICONQUESTION);
-#endif
-
-    /* we have an uninstall string */
-    ExecuteAndWait(buffer);
-  }
-}
-
-
-void winpcap_auto_start()
-{
-
-  HKEY  key;
-  HKEY  npfKey;
-  char buffer[BUFSIZ+1];
-  int  buflen = 0;
-  DWORD startVal = NPF_START_VAL;
-
-  if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, WINDOWS_VERSION_KEY, 0, (KEY_READ), &key) == ERROR_SUCCESS) {
-
-    if(RegQueryValueEx(key, WINDOWS_VERSION, NULL, NULL, buffer, &buflen) == ERROR_SUCCESS) {
-
-      if(!strcmp(buffer, VISTA_VERSION)) {
-       /* this is Vista - set the autostart */
-       /* if installation was successful this key will now exist */
-       if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, NPF_KEY, 0, (KEY_READ | KEY_WRITE), &npfKey) == ERROR_SUCCESS) {
-
-         (void)RegSetValueEx(npfKey, NPF_START, 0, REG_DWORD, (BYTE*)&startVal, sizeof(DWORD));
-
-         RegCloseKey(npfKey);
-
-       }
-      }
-    }
-    RegCloseKey(key);
-  }
-}
-
-
-void app_start(int argc, char *argv[])
-{
-  char *u3hostexecpath;
-  char *envvar;
-  char *end;
-  char buffer[BUFSIZ+1];
-  char inBuffer[FILEBUFSIZ+1];
-  HANDLE *file;
-  DWORD numRead = 0;
-  int i;
-
-  /* read any environment variables that may be set as we are probably running this from a file association */
-
-  buffer[0] = '\0';
-  strncat(buffer, argv[0], strlen(argv[0]) + 1);
-
-  /* truncate at last \\ */
-  if(end = strrchr(buffer, '\\'))
-    *end = '\0';
-
-  strncat(buffer, ENV_FILENAME, strlen(ENV_FILENAME) + 1);
-
-  /* open the file */
-  if((file = CreateFile(buffer, FILE_READ_DATA, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL)) != INVALID_HANDLE_VALUE) {
-
-    /* read the whole file in in one go */
-    if(ReadFile(file, &inBuffer, FILEBUFSIZ, &numRead, NULL) != 0) {
-      /* we were successful - parse the lines */
-      inBuffer[numRead] = '\0'; /* null terminate the data */
-
-      envvar = inBuffer;
-
-      while(end = strchr(envvar, '\n')) {
-       /* we have a line */
-       *end++ = '\0';
-
-       _putenv(envvar);
-
-       /* point the next envar to the end */
-       envvar = end;
-      }
-    }
-
-    /* close the file */
-    CloseHandle(file);
-
-  }
-
-  /* exec wireshark */
-  if((u3hostexecpath = getenv("U3_HOST_EXEC_PATH")) != NULL) {
-
-    buffer[0] = '\0';
-    strncat(buffer, u3hostexecpath, strlen(u3hostexecpath) + 1);
-    strncat(buffer, WIRESHARK_EXE, strlen(WIRESHARK_EXE) + 1);
-
-    /* copy the remaining arguments across */
-    for(i = 2; i < argc; i++) {
-      strncat(buffer, " ", 2);
-      strncat(buffer, argv[i], strlen(argv[i]) + 1);
-    }
-
-    ExecuteAndWait(buffer);
-
-  }
-
-}
-
-
-void app_stop(DWORD timeOut)
-{
-  DWORD  pid = 0;
-  HANDLE hFind = INVALID_HANDLE_VALUE;
-  WIN32_FIND_DATA find_file_data;
-  DWORD dwError;
-  char *u3_host_exec_path;
-  char dir_spec[MAX_PATH+1];
-  char file_name[MAX_PATH+1];
-
-  u3_host_exec_path = getenv("U3_HOST_EXEC_PATH");
-
-  strncpy(dir_spec, u3_host_exec_path, strlen(u3_host_exec_path) + 1);
-  strncat(dir_spec, "\\*.pid", 7);
-
-  hFind = FindFirstFile(dir_spec, &find_file_data);
-
-  if(hFind != INVALID_HANDLE_VALUE) {
-
-    do {
-
-      pid = (DWORD)atoi(find_file_data.cFileName);
-
-      if(pid)
-       TerminateApp(pid, timeOut);
-
-      strncpy(file_name, u3_host_exec_path, strlen(u3_host_exec_path) + 1);
-      strncat(file_name, "\\", 2);
-      strncat(file_name, find_file_data.cFileName, strlen(find_file_data.cFileName) + 1);
-
-      DeleteFile(TEXT(file_name));
-
-    } while(FindNextFile(hFind, &find_file_data) != 0);
-
-    FindClose(hFind);
-
-  }
-
-}
-
-/* associate
-
-Associate an filetype (extension) with the U3 Wireshark if it doesn't already have an association
-
-*/
-
-void associate(char *extension)
-{
-  HKEY key;
-  DWORD disposition;
-  char buffer[BUFSIZ];
-  int  buflen = BUFSIZ;
-
-  buffer[0] = '\0';
-
-  /* open the HKCR  extension  key*/
-  if(RegCreateKeyEx(HKEY_CLASSES_ROOT, extension, 0, NULL, 0, (KEY_READ | KEY_WRITE), NULL, &key, &disposition) == ERROR_SUCCESS) {
-
-    /* we could look at the disposition - but we don't bother */
-    if((RegQueryValueEx(key, "", NULL, NULL, buffer, &buflen) != ERROR_SUCCESS) || (buffer[0] == '\0')) {
-
-      (void)RegSetValueEx(key, "", 0, REG_SZ, WIRESHARK_ASSOC, strlen(WIRESHARK_ASSOC) + 1);
-    }
-
-    RegCloseKey(key);
-  }
-
-}
-
-BOOL save_environment()
-{
-  char **envptr;
-  char *envval;
-  HANDLE *file;
-  char buffer[BUFSIZ+1];
-  DWORD  buflen;
-  DWORD  numWritten;
-  BOOL   retval = FALSE;
-
-  envval = getenv("U3_HOST_EXEC_PATH");
-
-  buffer[0] = '\0';
-  strncat(buffer, envval, strlen(envval) + 1);
-  strncat(buffer, ENV_FILENAME, strlen(ENV_FILENAME) + 1);
-
-  /* open the file */
-  if((file = CreateFile(buffer, FILE_WRITE_DATA, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL)) != INVALID_HANDLE_VALUE) {
-
-    for(envptr = environmentvars; *envptr; envptr++) {
-
-      if(envval = getenv(*envptr)) {
-       /* write it out */
-
-       buffer[0] = '\0';
-       strncat(buffer, *envptr, strlen(*envptr) + 1);
-       strncat(buffer, "=", 2);
-       strncat(buffer, envval, strlen(envval) + 1);
-       strncat(buffer, "\n", 2);
-
-       buflen = strlen(buffer);
-
-       WriteFile(file, buffer, buflen, &numWritten, NULL);
-      }
-
-    }
-
-    /* close the file */
-    CloseHandle(file);
-
-    retval = TRUE;
-
-  }
-
-  return retval;
-
-}
-
-
-/* disassociate
-
-Remove any file types that are associated with the U3 Wireshark (which is being removed)
-
-*/
-
-
-void disassociate(char *extension)
-{
-  HKEY key;
-  DWORD disposition;
-  char buffer[BUFSIZ];
-  int  buflen = BUFSIZ;
-  boolean delete_key = FALSE;
-
-  buffer[0] = '\0';
-
-  /* open the HKCR  extension  key*/
-  if(RegOpenKeyEx(HKEY_CLASSES_ROOT, extension, 0, (KEY_READ | KEY_WRITE), &key) == ERROR_SUCCESS) {
-
-    if(RegQueryValueEx(key, "", NULL, NULL, buffer, &buflen) == ERROR_SUCCESS) {
-
-      if(!strncmp(buffer, WIRESHARK_ASSOC, strlen(WIRESHARK_ASSOC) + 1))
-       delete_key = TRUE;
-    }
-
-    RegCloseKey(key);
-  }
-
-  if(delete_key)
-    RegDeleteKey(HKEY_CLASSES_ROOT, extension);
-}
-
-/* host_configure
-
-Configure the host for the U3 Wireshark. This involves:
-1) registering the U3 Wireshark with capture file types
-2) installing WinPcap if not already installed
-3) create a "My Captures" folder on the U3 device if it doesn't already exist
-*/
-
-void host_configure(void)
-{
-  char **pext;
-  HKEY  key;
-  DWORD disposition;
-  char *u3_host_exec_path;
-  char *u3_device_exec_path;
-  char *u3_device_serial;
-  char *u3_device_document_path;
-  char wireshark_path[MAX_PATH+1];
-  char winpcap_path[MAX_PATH+1];
-  char vcredist_path[MAX_PATH+1];
-  char my_captures_path[MAX_PATH+1];
-  char reg_key[BUFSIZ];
-  char buffer[BUFSIZ];
-  int  buflen = BUFSIZ;
-  boolean hasWinPcap = FALSE;
-  boolean hasRedist = FALSE;
-
-  /* CREATE THE U3 Wireshark TYPE */
-  if(RegCreateKeyEx(HKEY_CLASSES_ROOT, WIRESHARK_ASSOC, 0, NULL, 0,
-                   (KEY_READ | KEY_WRITE), NULL, &key, &disposition) == ERROR_SUCCESS) {
-
-    (void)RegSetValueEx(key, "", 0, REG_SZ, WIRESHARK_DESC, strlen(WIRESHARK_DESC) + 1);
-
-    RegCloseKey(key);
-  }
-
-  /* compute the U3 path to wireshark */
-  u3_host_exec_path = getenv("U3_HOST_EXEC_PATH");
-  strncpy(wireshark_path, u3_host_exec_path, strlen(u3_host_exec_path) + 1);
-  strncat(wireshark_path, U3UTIL_APPSTART, strlen(U3UTIL_APPSTART) + 1);
-
-  strncpy(reg_key, WIRESHARK_ASSOC, strlen(WIRESHARK_ASSOC) + 1);
-  strncat(reg_key, SHELL_OPEN_COMMAND, strlen(SHELL_OPEN_COMMAND) + 1);
-
-  /* associate the application */
-  if(RegCreateKeyEx(HKEY_CLASSES_ROOT, reg_key, 0, NULL, 0,
-                   (KEY_READ | KEY_WRITE), NULL, &key, &disposition) == ERROR_SUCCESS) {
-    (void)RegSetValueEx(key, "", 0, REG_SZ, wireshark_path, strlen(wireshark_path) + 1);
-
-    RegCloseKey(key);
-
-  }
-
-  /* associate the icon */
-  strncpy(reg_key, WIRESHARK_ASSOC, strlen(WIRESHARK_ASSOC) + 1);
-  strncat(reg_key, DEFAULT_ICON, strlen(DEFAULT_ICON) + 1);
-
-  /* the icon is in the exe */
-  strncpy(wireshark_path, u3_host_exec_path, strlen(u3_host_exec_path) + 1);
-  strncat(wireshark_path, WIRESHARK_EXE, strlen(WIRESHARK_EXE) + 1);
-  strncat(wireshark_path, ",1", 3);
-
-  /* associate the application */
-  if(RegCreateKeyEx(HKEY_CLASSES_ROOT, reg_key, 0, NULL, 0,
-                   (KEY_READ | KEY_WRITE), NULL, &key, &disposition) == ERROR_SUCCESS) {
-
-    (void)RegSetValueEx(key, "", 0, REG_SZ, wireshark_path, strlen(wireshark_path) + 1);
-
-    RegCloseKey(key);
-  }
-
-  /* CREATE THE FILE ASSOCIATIONS */
-
-  for(pext = extensions; *pext; pext++)
-    associate(*pext);
-
-  /* update icons */
-  SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, 0, 0);
-
-  /* START WINPCAP INSTALLATION IF NOT ALREADY INSTALLED */
-
-  if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, WINPCAP_KEY, 0, (KEY_READ), &key) == ERROR_SUCCESS) {
-
-    if(RegQueryValueEx(key, WINPCAP_UNINSTALL, NULL, NULL, buffer, &buflen) == ERROR_SUCCESS) {
-
-      if(buffer[0] != '\0')
-       hasWinPcap = TRUE;
-    }
-
-    RegCloseKey(key);
-  }
-
-  if(!hasWinPcap &&
-     (MessageBox(NULL,
-                TEXT("If you want to capture packets from the network you will need to install WinPcap.\nIt will be uninstalled when you remove your U3 device.\n\nDo you want to install WinPcap?"),
-                TEXT("U3 Wireshark: Install WinPcap?"),
-                MB_YESNO|MB_TOPMOST|MB_ICONQUESTION) == IDYES)) {
-
-    /* compute the U3 path to the WinPcap installation package - it stays on the device */
-    u3_device_exec_path = getenv("U3_DEVICE_EXEC_PATH");
-    strncpy(winpcap_path, "\"", 2);
-    strncat(winpcap_path, u3_device_exec_path, strlen(u3_device_exec_path) + 1);
-    strncat(winpcap_path, WINPCAP_PACKAGE, strlen(WINPCAP_PACKAGE) + 1);
-    strncat(winpcap_path, "\"", 2);
-
-    ExecuteAndWait(winpcap_path);
-
-    /* if installation was successful this key will now exist */
-    if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, WINPCAP_KEY, 0, (KEY_READ | KEY_WRITE), &key) == ERROR_SUCCESS) {
-
-      u3_device_serial = getenv("U3_DEVICE_SERIAL");
-
-      (void)RegSetValueEx(key, WINPCAP_U3INSTALLED, 0, REG_SZ, u3_device_serial, strlen(u3_device_serial) + 1);
-
-      winpcap_auto_start();
-
-    }
-  }
-
-  /* START VCREDIST INSTALLATION IF NOT ALREADY INSTALLED */
-
-  if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, VCREDIST_KEY, 0, (KEY_READ), &key) == ERROR_SUCCESS) {
-
-    buflen = BUFSIZ;
-
-    if(RegQueryValueEx(key, VCREDIST_UNINSTALL, NULL, NULL, buffer, &buflen) == ERROR_SUCCESS) {
-
-      if(buffer[0] != '\0')
-       hasRedist = TRUE;
-    }
-
-    RegCloseKey(key);
-
-  }
-
-  if(!hasRedist) {
-
-    /* compute the U3 path to the Visual C++  redistributables package - it stays on the device */
-    u3_device_exec_path = getenv("U3_DEVICE_EXEC_PATH");
-    strncpy(vcredist_path, "\"", 2);
-    strncat(vcredist_path, u3_device_exec_path, strlen(u3_device_exec_path) + 1);
-    strncat(vcredist_path, VCREDIST_PACKAGE, strlen(VCREDIST_PACKAGE) + 1);
-    strncat(vcredist_path, "\" /q", 5); /* do things quietly */
-
-    ExecuteAndWait(vcredist_path);
-
-    if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, VCREDIST_KEY, 0, (KEY_READ | KEY_WRITE), &key) == ERROR_SUCCESS) {
-
-      u3_device_serial = getenv("U3_DEVICE_SERIAL");
-
-      (void)RegSetValueEx(key, VCREDIST_U3INSTALLED, 0, REG_SZ, u3_device_serial, strlen(u3_device_serial) + 1);
-
-    }
-  }
-
-
-  /* CREATE THE "My Captures" FOLDER IF IT DOESN'T ALREADY EXIST */
-
-  u3_device_document_path = getenv("U3_DEVICE_DOCUMENT_PATH");
-  strncpy(my_captures_path, u3_device_document_path, strlen(u3_device_document_path) + 1);
-  strncat(my_captures_path, MY_CAPTURES, strlen(MY_CAPTURES) + 1);
-
-  /* don't care if it succeeds or fails */
-  (void) CreateDirectory(my_captures_path, NULL);
-
-  /* Save the environment so we can use it in the file assocation */
-  save_environment();
-}
-
-/* host_cleanup
-
-Remove any references to the U3 Wireshark from the host. This involves:
-1) Removing the U3 Wireshark file type associations
-2) Uninstalling WinPcap if we installed it.
-   If the user cancels the uninstallation of WinPcap, we will not try and remove it again.
-
-*/
-
-void host_clean_up(void)
-{
-  DWORD disposition;
-  char **pext;
-  char *u3_device_serial;
-  char reg_key[BUFSIZ];
-
-  /* the device has been removed -
-     just close the application as quickly as possible */
-
-  app_stop(0);
-
-  /* DELETE THE FILE ASSOCIATIONS */
-  for(pext = extensions; *pext; pext++)
-    disassociate(*pext);
-
-  /* update icons */
-  SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, 0, 0);
-
-  /* DELETE THE U3 Wireshark TYPE */
-  strncpy(reg_key, WIRESHARK_ASSOC, strlen(WIRESHARK_ASSOC) + 1);
-  strncat(reg_key, SHELL_OPEN_COMMAND, strlen(SHELL_OPEN_COMMAND) + 1);
-
-  RegDeleteKey(HKEY_CLASSES_ROOT, reg_key);
-
-  /* delete the open key */
-  strncpy(reg_key, WIRESHARK_ASSOC, strlen(WIRESHARK_ASSOC) + 1);
-  strncat(reg_key, SHELL_OPEN, strlen(SHELL_OPEN) + 1);
-
-  RegDeleteKey(HKEY_CLASSES_ROOT, reg_key);
-
-  /* delete the shell key */
-  strncpy(reg_key, WIRESHARK_ASSOC, strlen(WIRESHARK_ASSOC) + 1);
-  strncat(reg_key, SHELL, strlen(SHELL) + 1);
-
-  RegDeleteKey(HKEY_CLASSES_ROOT, reg_key);
-
-  /* delete the icon key */
-  strncpy(reg_key, WIRESHARK_ASSOC, strlen(WIRESHARK_ASSOC) + 1);
-  strncat(reg_key, DEFAULT_ICON, strlen(DEFAULT_ICON) + 1);
-
-  RegDeleteKey(HKEY_CLASSES_ROOT, reg_key);
-
-  /* finally delete the toplevel key */
-  RegDeleteKey(HKEY_CLASSES_ROOT, WIRESHARK_ASSOC);
-
-  uninstall(WINPCAP_KEY, WINPCAP_U3INSTALLED, WINPCAP_UNINSTALL);
-  uninstall(VCREDIST_KEY, VCREDIST_U3INSTALLED, VCREDIST_UNINSTALL);
-
-}
-
-main(int argc, char *argv[])
-{
-  DWORD time_out = 0;
-  char *u3_is_device_available;
-#if 0
-  char **envptr;
-  char *envval;
-# endif
-  u3_is_device_available = getenv("U3_IS_DEVICE_AVAILABLE");
-
-  if(u3_is_device_available && !strncmp(u3_is_device_available, "true", 4))
-    /* the device is available - wait for user to respond to any dialogs */
-    time_out = INFINITE;
-#if 0
-  for(envptr = environmentvars; *envptr; envptr++) {
-    envval = getenv(*envptr);
-
-    MessageBox(NULL,
-              envval ? envval : "NULL",
-              *envptr,
-              MB_YESNO|MB_TOPMOST|MB_ICONQUESTION);
-  }
-#endif
-
-  if(argc > 1) {
-
-    if(!strncmp(argv[1], "hostConfigure", 13))
-      host_configure();
-    else if(!strncmp(argv[1], "appStart", 9))
-      app_start(argc, argv);
-    else if(!strncmp(argv[1], "appStop", 8))
-      app_stop(time_out);
-    else if(!strncmp(argv[1], "hostCleanUp", 11))
-      host_clean_up();
-
-  }
-
-  exit(0);
-}
diff --git a/packaging/u3/win32/u3util.exe.manifest b/packaging/u3/win32/u3util.exe.manifest
deleted file mode 100644 (file)
index 8c46f90..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!-- $Id$ -->
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 
-   <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="u3util.exe" type="win32"/>
-      <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
-      <security>
-         <requestedPrivileges>
-            <requestedExecutionLevel level="asInvoker"/> 
-         </requestedPrivileges>
-      </security>
-   </trustInfo>
-</assembly>
\ No newline at end of file
diff --git a/packaging/u3/win32/wireshark.bat b/packaging/u3/win32/wireshark.bat
deleted file mode 100755 (executable)
index b560456..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-:: wireshark.bat
-:: A batch script to run wireshark from the files that
-:: constitute the U3 package.
-:: Also used to test the U3 package build.
-::
-:: $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.
-::
-
-@echo off
-SETLOCAL
-
-SET U3_DEVICE_SERIAL=0000060414068917
-SET U3_DEVICE_PATH=%~d0
-SET U3_DEVICE_DOCUMENT_PATH=%CD%\data
-
-SET U3_DEVICE_VENDOR="Wireshark Developers"
-SET U3_DEVICE_PRODUCT="Non-U3 Drive"
-SET U3_DEVICE_VENDOR_ID=0000
-
-SET U3_APP_DATA_PATH=%CD%\data
-SET U3_HOST_EXEC_PATH=%CD%\host
-SET U3_DEVICE_EXEC_PATH=%CD%\device
-
-SET U3_ENV_VERSION=1.0
-SET U3_ENV_LANGUAGE=1033
-
-"%U3_HOST_EXEC_PATH%\wireshark.exe" %*
index bad98e48731cb50859e73390fe7fa177eadada0e..5a0cae40b800d28fedaa4e2bfb7bcb53044993fb 100644 (file)
@@ -64,7 +64,6 @@
 #endif /* HAVE_LIBPORTAUDIO */
 
 #include <wsutil/crash_info.h>
-#include <wsutil/u3.h>
 #include <wsutil/privileges.h>
 #include <wsutil/file_util.h>
 
@@ -1949,11 +1948,6 @@ get_gui_runtime_info(GString *str)
   g_string_append(str, ", ");
   get_runtime_airpcap_version(str);
 #endif
-
-  if(u3_active()) {
-    g_string_append(str, ", ");
-    u3_runtime_info(str);
-  }
 }
 
 static e_prefs *
@@ -3191,10 +3185,6 @@ main(int argc, char *argv[])
     main_filter_packets(&cfile, dfilter, FALSE);
   }
 
-
-  /* register our pid if we are being run from a U3 device */
-  u3_register_pid();
-
   profile_store_persconffiles (FALSE);
 
 #ifdef HAVE_GTKOSXAPPLICATION
@@ -3219,9 +3209,6 @@ main(int argc, char *argv[])
   gtk_iface_mon_stop();
 #endif
 
-  /* deregister our pid */
-  u3_deregister_pid();
-
   epan_cleanup();
 
   AirPDcapDestroyContext(&airpdcap_ctx);
index e30b1cdbb5fcc8dd1f564c11c7980433f9b3fcbe..8491e5fa5e6cfa9fdad5153d2ea9feeb2a411c4e 100644 (file)
@@ -28,8 +28,6 @@
 #include <stdio.h>
 #include <string.h>
 
-#include <wsutil/u3.h>
-
 #include <epan/packet.h>
 #include <epan/addr_resolv.h>
 #include <epan/prefs.h>
@@ -4405,10 +4403,7 @@ menu_recent_file_write_all(FILE *rf)
     while (list != NULL) {
         cf_name = (gchar *)list->data;
         if (cf_name) {
-            if(u3_active())
-                fprintf (rf, RECENT_KEY_CAPTURE_FILE ": %s\n", u3_contract_device_path(cf_name));
-            else
-                fprintf (rf, RECENT_KEY_CAPTURE_FILE ": %s\n", cf_name);
+            fprintf (rf, RECENT_KEY_CAPTURE_FILE ": %s\n", cf_name);
         }
         list = g_list_previous(list);
     }
@@ -4424,10 +4419,7 @@ menu_recent_file_write_all(FILE *rf)
         /* get capture filename from the menu item label */
         cf_name = (gchar *)g_object_get_data(G_OBJECT(child->data), MENU_RECENT_FILES_KEY);
         if (cf_name) {
-            if(u3_active())
-                fprintf (rf, RECENT_KEY_CAPTURE_FILE ": %s\n", u3_contract_device_path(cf_name));
-            else
-                fprintf (rf, RECENT_KEY_CAPTURE_FILE ": %s\n", cf_name);
+            fprintf (rf, RECENT_KEY_CAPTURE_FILE ": %s\n", cf_name);
         }
 
         child = g_list_previous(child);
index 9cc27d5d1f28fed2141ca18228ec8f0ca1e1a220..4385e2beb226357657e594525bb10388fb6ca4fb 100644 (file)
@@ -37,7 +37,6 @@
 #endif
 
 #include <wsutil/crash_info.h>
-#include <wsutil/u3.h>
 #include <wsutil/file_util.h>
 
 #include <wiretap/merge.h>
@@ -435,12 +434,6 @@ get_gui_runtime_info(GString *str)
   get_runtime_airpcap_version(str);
 #endif
 
-
-  if(u3_active()) {
-    g_string_append(str, ", ");
-    u3_runtime_info(str);
-  }
-
 }
 
 /* And now our feature presentation... [ fade to music ] */
index cc8990a377ea3c89fdcf7473eed2d1ced43c816a..157972368298cfe5c393ea51d1253da63c963ca4 100644 (file)
@@ -146,10 +146,7 @@ extern "C" void menu_recent_file_write_all(FILE *rf) {
         /* get capture filename from the menu item label */
         cf_name = rii.previous()->filename;
         if (cf_name != NULL) {
-//            if(u3_active())
-//                fprintf (rf, RECENT_KEY_CAPTURE_FILE ": %s\n", u3_contract_device_path(cf_name));
-//            else
-                fprintf (rf, RECENT_KEY_CAPTURE_FILE ": %s\n", cf_name.toUtf8().constData());
+            fprintf (rf, RECENT_KEY_CAPTURE_FILE ": %s\n", cf_name.toUtf8().constData());
         }
     }
 }
index 41f5f9326331b16802685d459e609b5d6fb05602..480b99e275455fd7400a3e9580bfc722cfbb865e 100644 (file)
@@ -44,7 +44,6 @@
 #include "ui/simple_dialog.h"
 #include "ui/ui_util.h"
 
-#include <wsutil/u3.h>
 #include <wsutil/file_util.h>
 #include <wsutil/str_util.h>
 
@@ -664,11 +663,7 @@ write_profile_recent(void)
 
   if (get_last_open_dir() != NULL) {
     fprintf(rf, "\n# Last directory navigated to in File Open dialog.\n");
-
-    if(u3_active())
-      fprintf(rf, RECENT_GUI_FILEOPEN_REMEMBERED_DIR ": %s\n", u3_contract_device_path(get_last_open_dir()));
-    else
-      fprintf(rf, RECENT_GUI_FILEOPEN_REMEMBERED_DIR ": %s\n", get_last_open_dir());
+    fprintf(rf, RECENT_GUI_FILEOPEN_REMEMBERED_DIR ": %s\n", get_last_open_dir());
   }
 
   fclose(rf);
@@ -990,10 +985,7 @@ read_set_recent_pair_dynamic(gchar *key, const gchar *value,
     return PREFS_SET_SYNTAX_ERR;
   }
   if (strcmp(key, RECENT_KEY_CAPTURE_FILE) == 0) {
-    if (u3_active())
-      add_menu_recent_capture_file(u3_expand_device_path(value));
-    else
-      add_menu_recent_capture_file(value);
+    add_menu_recent_capture_file(value);
   } else if (strcmp(key, RECENT_KEY_DISPLAY_FILTER) == 0) {
        dfilter_combo_add_recent(value);
   } else if (strcmp(key, RECENT_KEY_CAPTURE_FILTER) == 0) {
index 02d15a0f04014f7df4137216b861cb78e4600f5f..552f2a408bdcb76072b9ccc107fa550b2116ebb6 100644 (file)
@@ -64,7 +64,6 @@ set(WSUTIL_FILES
   swar.c
   tempfile.c
   type_util.c
-  u3.c
   ${WSUTIL_PLATFORM_FILES}
 )
 
index 7332d97d8e24f519e6561c3000ae9c512f6ca299..0eb65f3ca7d8cf17d8ab67de486cecdb0da4c79a 100644 (file)
@@ -56,8 +56,7 @@ LIBWSUTIL_SRC =       \
        rc4.c           \
        report_err.c    \
        tempfile.c      \
-       type_util.c     \
-       u3.c
+       type_util.c
 
 # Header files that are not generated from other files
 LIBWSUTIL_INCLUDES =   \
@@ -88,5 +87,4 @@ LIBWSUTIL_INCLUDES =  \
        report_err.h    \
        swar.h          \
        tempfile.h      \
-       type_util.h     \
-       u3.h
+       type_util.h
diff --git a/wsutil/u3.c b/wsutil/u3.c
deleted file mode 100644 (file)
index 217d9f3..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
-/* u3.c
- * u3   2006 Graeme Lunt
- *
- * $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.
- */
-
-/*
- * Indentation logic: 2-space
- */
-
-
-#include "config.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-
-#ifdef _WIN32
-#include <process.h>    /* getpid */
-#endif
-
-#include <wsutil/file_util.h>
-
-#include "u3.h"
-
-
-#define U3_DEVICE_PATH_VAR   "$U3_DEVICE_PATH"
-
-static char *pid_file = NULL;
-static char *u3devicepath = (char*)-1;
-static gchar *newpath = NULL;
-
-static const char *u3_change_path(const char *path, const char *old, const char *new_u3devicepath);
-
-gboolean u3_active(void)
-{
-
-  return (
-#ifdef _WIN32
-      getenv_utf8
-#else
-      getenv
-#endif
-      ("U3_HOST_EXEC_PATH") != NULL);
-
-}
-
-void u3_runtime_info(GString *str)
-{
-
-  char *u3devicepath_lcl = NULL;
-  char *u3deviceproduct = NULL;
-
-  if((u3deviceproduct =
-#ifdef _WIN32
-      getenv_utf8
-#else
-      getenv
-#endif
-      ("U3_DEVICE_PRODUCT")) != NULL) {
-    g_string_append(str, " from the ");
-    g_string_append(str, u3deviceproduct);
-  } else {
-    g_string_append(str, " from a ");
-  }
-
-  g_string_append(str, " U3 device");
-
-  if((u3devicepath_lcl =
-#ifdef _WIN32
-      getenv_utf8
-#else
-      getenv
-#endif
-      ("U3_DEVICE_PATH")) != NULL) {
-    g_string_append(str, " in drive ");
-    g_string_append(str, u3devicepath_lcl);
-  }
-
-}
-
-void u3_register_pid(void)
-{
-  int  pid;
-  int   pid_fd;
-  char *u3hostexecpath;
-  int   pf_size;
-
-  if((u3hostexecpath =
-#ifdef _WIN32
-      getenv_utf8
-#else
-      getenv
-#endif
-      ("U3_HOST_EXEC_PATH")) != NULL) {
-
-    pid = getpid();
-
-    pf_size = (int) strlen(u3hostexecpath) + 32;
-    pid_file = (char *)g_malloc(pf_size);
-
-    g_snprintf(pid_file, pf_size, "%s\\%d.pid", u3hostexecpath, pid);
-
-    pid_fd = ws_open(pid_file, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644);
-
-    if(pid_fd != -1)
-      ws_close(pid_fd);
-    else {
-      g_free(pid_file);
-      pid_file = NULL;
-    }
-  }
-}
-
-
-void u3_deregister_pid(void)
-{
-  if(pid_file) {
-    /* we don't care if we succeed or fail - u3utils may have deleted the file */
-    ws_unlink(pid_file);
-
-    g_free(pid_file);
-
-    pid_file = NULL;
-
-  }
-}
-
-const char *u3_expand_device_path(const char *path)
-{
-  return u3_change_path(path, U3_DEVICE_PATH_VAR, NULL);
-}
-
-
-const char *u3_contract_device_path(char *path)
-{
-  return u3_change_path(path, NULL, U3_DEVICE_PATH_VAR);
-}
-
-static const char *u3_change_path(const char *path, const char *old, const char *new_u3devicepath)
-{
-
-  if(u3devicepath == (char*)-1) {
-    /* cache the device path */
-    u3devicepath =
-#ifdef _WIN32
-      getenv_utf8
-#else
-      getenv
-#endif
-      ("U3_DEVICE_PATH");
-  }
-
-  if(new_u3devicepath == NULL)
-    new_u3devicepath = u3devicepath;
-  if(old == NULL)
-    old = u3devicepath;
-
-  if(newpath != NULL) {
-    g_free(newpath);
-    newpath = NULL;
-  }
-
-  if((path != NULL) && (u3devicepath != NULL) && (strncmp(path, old, strlen(old)) == 0)) {
-
-    newpath = g_strconcat(new_u3devicepath, path + strlen(old), NULL);
-
-    return newpath;
-
-  }
-
-  return path;
-
-}
diff --git a/wsutil/u3.h b/wsutil/u3.h
deleted file mode 100644 (file)
index fac385a..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/* u3.h
- * u3   2006 Graeme Lunt
- *
- * $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 __U3_H__
-#define __U3_H__
-
-#include "ws_symbol_export.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-WS_DLL_PUBLIC gboolean u3_active(void);
-
-WS_DLL_PUBLIC void u3_runtime_info(GString *str);
-
-WS_DLL_PUBLIC void u3_register_pid(void);
-WS_DLL_PUBLIC void u3_deregister_pid(void);
-
-WS_DLL_PUBLIC const char *u3_expand_device_path(const char *path);
-WS_DLL_PUBLIC const char *u3_contract_device_path(char *path);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __U3_H__ */