aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2009-10-11 14:39:14 +0000
committerKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2009-10-11 14:39:14 +0000
commite6486705f733814481f57b0886b44ecf9d243da1 (patch)
tree351b865b333829f42d8f48c791952c338b9935da /epan
parent782138e1aaa6fcba6bba7db72dfc7590fabbf318 (diff)
downloadwireshark-e6486705f733814481f57b0886b44ecf9d243da1.tar.gz
wireshark-e6486705f733814481f57b0886b44ecf9d243da1.tar.bz2
wireshark-e6486705f733814481f57b0886b44ecf9d243da1.zip
Move make-sminmpec.pl to tools directory
svn path=/trunk/; revision=30511
Diffstat (limited to 'epan')
-rw-r--r--epan/CMakeLists.txt7
-rw-r--r--epan/Makefile.am5
-rw-r--r--epan/Makefile.nmake4
-rwxr-xr-xepan/make-sminmpec.pl127
4 files changed, 8 insertions, 135 deletions
diff --git a/epan/CMakeLists.txt b/epan/CMakeLists.txt
index 723a952bac..933a554e74 100644
--- a/epan/CMakeLists.txt
+++ b/epan/CMakeLists.txt
@@ -1061,14 +1061,15 @@ set(FTYPE_FILES
)
ADD_CUSTOM_COMMAND(
- OUTPUT sminmpec.c
+ OUTPUT
+ sminmpec.c
COMMAND ${PERL_EXECUTABLE}
- ${CMAKE_CURRENT_SOURCE_DIR}/make-sminmpec.pl
+ ${CMAKE_SOURCE_DIR}/tools/make-sminmpec.pl
${CMAKE_CURRENT_SOURCE_DIR}/enterprise-numbers
sminmpec.c
DEPENDS
enterprise-numbers
- make-sminmpec.pl
+ ${CMAKE_SOURCE_DIR}/tools/make-sminmpec.pl
)
set(LIBWIRESHARK_FILES
diff --git a/epan/Makefile.am b/epan/Makefile.am
index bf557f6295..35ad3c8f1c 100644
--- a/epan/Makefile.am
+++ b/epan/Makefile.am
@@ -101,7 +101,6 @@ EXTRA_DIST = \
libwireshark.def \
Makefile.common \
Makefile.nmake \
- make-sminmpec.pl \
radius_dict.l \
tvbtest.c \
reassemble_test.c \
@@ -186,8 +185,8 @@ dtd_grammar.c: $(LEMON)/lemon$(EXEEXT) $(srcdir)/$(LEMON)/lempar.c $(srcdir)/dtd
tvbtest.o exntest.o: exceptions.h
-sminmpec.c: enterprise-numbers make-sminmpec.pl
- $(PERL) $(srcdir)/make-sminmpec.pl $(srcdir)/enterprise-numbers sminmpec.c
+sminmpec.c: enterprise-numbers ../tools/make-sminmpec.pl
+ $(PERL) $(srcdir)/../tools/make-sminmpec.pl $(srcdir)/enterprise-numbers sminmpec.c
inet_ntop.c:
ln -s $(srcdir)/../inet_ntop.c .
diff --git a/epan/Makefile.nmake b/epan/Makefile.nmake
index 7c677ffcf4..59ddc3a731 100644
--- a/epan/Makefile.nmake
+++ b/epan/Makefile.nmake
@@ -288,8 +288,8 @@ inet_pton.c: ..\inet_pton.c
set copycmd=/y
xcopy ..\inet_pton.c . /d
-sminmpec.c: enterprise-numbers make-sminmpec.pl
- $(PERL) make-sminmpec.pl enterprise-numbers sminmpec.c
+sminmpec.c: enterprise-numbers ..\tools\make-sminmpec.pl
+ $(PERL) ../tools/make-sminmpec.pl enterprise-numbers sminmpec.c
RUNLEX=..\tools\runlex.sh
diff --git a/epan/make-sminmpec.pl b/epan/make-sminmpec.pl
deleted file mode 100755
index 3a10f395fe..0000000000
--- a/epan/make-sminmpec.pl
+++ /dev/null
@@ -1,127 +0,0 @@
-#!/usr/bin/perl -w
-# create the sminmpec.c file from
-# http://www.iana.org/assignments/enterprise-numbers
-#
-# $Id$
-#
-# Wireshark - Network traffic analyzer
-# By Gerald Combs <gerald@wireshark.org>
-# Copyright 2004 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-use strict;
-
-my $in = shift;
-
-$in = "http://www.iana.org/assignments/enterprise-numbers" unless(defined $in);
-
-my @in_lines;
-
-if($in =~ m/^http:/i) {
- eval "require LWP::UserAgent;";
- die "LWP isn't installed. It is part of the standard Perl module libwww." if $@;
-
- my $agent = LWP::UserAgent->new;
-
- warn "starting to fetch $in ...\n";
-
- my $request = HTTP::Request->new(GET => $in);
-
-
- if (-f "enterprise-numbers") {
- my $mtime;
- (undef,undef,undef,undef,undef,undef,undef,undef,undef,$mtime,undef,undef,undef) = stat("enterprise-numbers");
- $request->if_modified_since( $mtime );
- }
-
- my $result = $agent->request($request);
-
- if ($result->code eq 200) {
- warn "done fetching $in\n";
- @in_lines = split /\n/, $result->content;
- open ENFILE, "> enterprise-numbers";
-
- for (@in_lines) {
- chomp;
- print ENFILE "$_\n";
- }
-
- close ENFILE;
- } elsif ($result->code eq 304) {
- warn "enterprise-numbers was up-to-date\n";
- open IN, "< enterprise-numbers";
- @in_lines = <IN>;
- close IN;
- } else {
- die "request for $in failed with result code:" . $result->code;
- }
-
-} else {
- open IN, "< $in";
- @in_lines = <IN>;
- close IN;
-}
-
-
-open OUT, "> sminmpec.c";
-
-my $body = '';
-my $code;
-
-sub escape_non_ascii {
- my $val = unpack 'C', $_[0];
- return sprintf '\0%.3o',$val;
-}
-
-for(@in_lines) {
- s/[\000-\037]//g;
- s/\\/\\\\/g;
- s/"/\\"/g;
- s/([\x80-\xFF])/escape_non_ascii($1)/ge;
-
- if (/^(\d+)/) {
- $code = $1;
- } if (/^ (\S.*)/ ) {
- my $name = $1;
- $body .= "\t{ $code,\t\"$name\" },\n";
- }
-}
-
-print OUT <<"_SMINMPEC";
-/*
- * \$Id\$
- *
- * THIS FILE IS AUTOGENERATED, DO NOT EDIT
- * generated from http://www.iana.org/assignments/enterprise-numbers
- * run "epan/make-sminmspec <infile> <outfile>" to regenerate
- */
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <glib.h>
-
-#include <epan/value_string.h>
-#include <epan/sminmpec.h>
-
-const value_string sminmpec_values[] = {
-
-$body
- {0, NULL}
-};
-
-_SMINMPEC
-
-close OUT;