move the profinet related files to a plugin (step by step), to make prototyping and...
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 30 Apr 2005 20:52:20 +0000 (20:52 +0000)
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 30 Apr 2005 20:52:20 +0000 (20:52 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14248 f5534014-38df-0310-8fa8-9805f1628bb7

13 files changed:
epan/dissectors/Makefile.common
epan/libethereal.def
plugins/Makefile.nmake
plugins/profinet/AUTHORS [new file with mode: 0644]
plugins/profinet/COPYING [new file with mode: 0644]
plugins/profinet/ChangeLog [new file with mode: 0644]
plugins/profinet/INSTALL [new file with mode: 0644]
plugins/profinet/Makefile.am [new file with mode: 0644]
plugins/profinet/Makefile.nmake [new file with mode: 0644]
plugins/profinet/NEWS [new file with mode: 0644]
plugins/profinet/moduleinfo.h [new file with mode: 0644]
plugins/profinet/packet-dcerpc-pn-io.c [moved from epan/dissectors/packet-dcerpc-pn-io.c with 99% similarity]
plugins/profinet/profinet.c [new file with mode: 0644]

index c2b7807ce24b322ffa9e8399b9be3c62cdff75e2..3d315c4e3337fa33bed3fcddc33236c9ac7425ad 100644 (file)
@@ -173,7 +173,6 @@ DISSECTOR_SRC =     \
        packet-dcerpc-ndr.c     \
        packet-dcerpc-netlogon.c        \
        packet-dcerpc-nspi.c    \
-       packet-dcerpc-pn-io.c   \
        packet-dcerpc-pnp.c     \
        packet-dcerpc-rdaclif.c \
        packet-dcerpc-reg.c     \
index 88d82d84a748cff56cd6ddcee3cbc958b5882586..28b178738e346b0e55902fddc5441ccd4ad7f585 100644 (file)
@@ -143,6 +143,7 @@ dissect_dcerpc_uint16
 dissect_dcerpc_uint32
 dissect_dcerpc_uuid_t
 dissect_ndr_uint32
+dissect_ndr_uuid_t
 dissect_per_bit_string
 dissect_per_BMPString
 dissect_per_boolean
index 5f3e1826c5c8b334c402659f7ef006a30de5c04b..8c968082ea5d8ba8021add636cc41565ad528327 100644 (file)
@@ -6,7 +6,7 @@ include ..\config.nmake
 
 ############### no need to modify below this line #########
 
-all: acn agentx artnet asn1 ciscosm docsis enttec giop gryphon irda lwres mate megaco mgcp opsi pcli rdm rlm rtnet rudp stats_tree v5ua xml
+all: acn agentx artnet asn1 ciscosm docsis enttec giop gryphon irda lwres mate megaco mgcp opsi pcli profinet rdm rlm rtnet rudp stats_tree v5ua xml
 
 acn:: 
        cd acn
@@ -87,6 +87,11 @@ pcli::
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
        cd ..
 
+profinet:: 
+       cd profinet
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
+       cd ..
+
 rdm:: 
        cd rdm
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
@@ -155,6 +160,8 @@ clean:
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
        cd ../pcli
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
+       cd ../profinet
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
        cd ../rdm
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
        cd ../rlm
@@ -204,6 +211,8 @@ distclean: clean
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
        cd ../pcli
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
+       cd ../profinet
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
        cd ../rdm
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
        cd ../rlm
diff --git a/plugins/profinet/AUTHORS b/plugins/profinet/AUTHORS
new file mode 100644 (file)
index 0000000..f0154bc
--- /dev/null
@@ -0,0 +1,3 @@
+Author :\r
+Ulf Lamping <ulf.lamping@web.de>\r
+\r
diff --git a/plugins/profinet/COPYING b/plugins/profinet/COPYING
new file mode 100644 (file)
index 0000000..fbdd65f
--- /dev/null
@@ -0,0 +1,340 @@
+                   GNU GENERAL PUBLIC LICENSE\r
+                      Version 2, June 1991\r
+\r
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.\r
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+ Everyone is permitted to copy and distribute verbatim copies\r
+ of this license document, but changing it is not allowed.\r
+\r
+                           Preamble\r
+\r
+  The licenses for most software are designed to take away your\r
+freedom to share and change it.  By contrast, the GNU General Public\r
+License is intended to guarantee your freedom to share and change free\r
+software--to make sure the software is free for all its users.  This\r
+General Public License applies to most of the Free Software\r
+Foundation's software and to any other program whose authors commit to\r
+using it.  (Some other Free Software Foundation software is covered by\r
+the GNU Library General Public License instead.)  You can apply it to\r
+your programs, too.\r
+\r
+  When we speak of free software, we are referring to freedom, not\r
+price.  Our General Public Licenses are designed to make sure that you\r
+have the freedom to distribute copies of free software (and charge for\r
+this service if you wish), that you receive source code or can get it\r
+if you want it, that you can change the software or use pieces of it\r
+in new free programs; and that you know you can do these things.\r
+\r
+  To protect your rights, we need to make restrictions that forbid\r
+anyone to deny you these rights or to ask you to surrender the rights.\r
+These restrictions translate to certain responsibilities for you if you\r
+distribute copies of the software, or if you modify it.\r
+\r
+  For example, if you distribute copies of such a program, whether\r
+gratis or for a fee, you must give the recipients all the rights that\r
+you have.  You must make sure that they, too, receive or can get the\r
+source code.  And you must show them these terms so they know their\r
+rights.\r
+\r
+  We protect your rights with two steps: (1) copyright the software, and\r
+(2) offer you this license which gives you legal permission to copy,\r
+distribute and/or modify the software.\r
+\r
+  Also, for each author's protection and ours, we want to make certain\r
+that everyone understands that there is no warranty for this free\r
+software.  If the software is modified by someone else and passed on, we\r
+want its recipients to know that what they have is not the original, so\r
+that any problems introduced by others will not reflect on the original\r
+authors' reputations.\r
+\r
+  Finally, any free program is threatened constantly by software\r
+patents.  We wish to avoid the danger that redistributors of a free\r
+program will individually obtain patent licenses, in effect making the\r
+program proprietary.  To prevent this, we have made it clear that any\r
+patent must be licensed for everyone's free use or not licensed at all.\r
+\r
+  The precise terms and conditions for copying, distribution and\r
+modification follow.\r
+\f\r
+                   GNU GENERAL PUBLIC LICENSE\r
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\r
+\r
+  0. This License applies to any program or other work which contains\r
+a notice placed by the copyright holder saying it may be distributed\r
+under the terms of this General Public License.  The "Program", below,\r
+refers to any such program or work, and a "work based on the Program"\r
+means either the Program or any derivative work under copyright law:\r
+that is to say, a work containing the Program or a portion of it,\r
+either verbatim or with modifications and/or translated into another\r
+language.  (Hereinafter, translation is included without limitation in\r
+the term "modification".)  Each licensee is addressed as "you".\r
+\r
+Activities other than copying, distribution and modification are not\r
+covered by this License; they are outside its scope.  The act of\r
+running the Program is not restricted, and the output from the Program\r
+is covered only if its contents constitute a work based on the\r
+Program (independent of having been made by running the Program).\r
+Whether that is true depends on what the Program does.\r
+\r
+  1. You may copy and distribute verbatim copies of the Program's\r
+source code as you receive it, in any medium, provided that you\r
+conspicuously and appropriately publish on each copy an appropriate\r
+copyright notice and disclaimer of warranty; keep intact all the\r
+notices that refer to this License and to the absence of any warranty;\r
+and give any other recipients of the Program a copy of this License\r
+along with the Program.\r
+\r
+You may charge a fee for the physical act of transferring a copy, and\r
+you may at your option offer warranty protection in exchange for a fee.\r
+\r
+  2. You may modify your copy or copies of the Program or any portion\r
+of it, thus forming a work based on the Program, and copy and\r
+distribute such modifications or work under the terms of Section 1\r
+above, provided that you also meet all of these conditions:\r
+\r
+    a) You must cause the modified files to carry prominent notices\r
+    stating that you changed the files and the date of any change.\r
+\r
+    b) You must cause any work that you distribute or publish, that in\r
+    whole or in part contains or is derived from the Program or any\r
+    part thereof, to be licensed as a whole at no charge to all third\r
+    parties under the terms of this License.\r
+\r
+    c) If the modified program normally reads commands interactively\r
+    when run, you must cause it, when started running for such\r
+    interactive use in the most ordinary way, to print or display an\r
+    announcement including an appropriate copyright notice and a\r
+    notice that there is no warranty (or else, saying that you provide\r
+    a warranty) and that users may redistribute the program under\r
+    these conditions, and telling the user how to view a copy of this\r
+    License.  (Exception: if the Program itself is interactive but\r
+    does not normally print such an announcement, your work based on\r
+    the Program is not required to print an announcement.)\r
+\f\r
+These requirements apply to the modified work as a whole.  If\r
+identifiable sections of that work are not derived from the Program,\r
+and can be reasonably considered independent and separate works in\r
+themselves, then this License, and its terms, do not apply to those\r
+sections when you distribute them as separate works.  But when you\r
+distribute the same sections as part of a whole which is a work based\r
+on the Program, the distribution of the whole must be on the terms of\r
+this License, whose permissions for other licensees extend to the\r
+entire whole, and thus to each and every part regardless of who wrote it.\r
+\r
+Thus, it is not the intent of this section to claim rights or contest\r
+your rights to work written entirely by you; rather, the intent is to\r
+exercise the right to control the distribution of derivative or\r
+collective works based on the Program.\r
+\r
+In addition, mere aggregation of another work not based on the Program\r
+with the Program (or with a work based on the Program) on a volume of\r
+a storage or distribution medium does not bring the other work under\r
+the scope of this License.\r
+\r
+  3. You may copy and distribute the Program (or a work based on it,\r
+under Section 2) in object code or executable form under the terms of\r
+Sections 1 and 2 above provided that you also do one of the following:\r
+\r
+    a) Accompany it with the complete corresponding machine-readable\r
+    source code, which must be distributed under the terms of Sections\r
+    1 and 2 above on a medium customarily used for software interchange; or,\r
+\r
+    b) Accompany it with a written offer, valid for at least three\r
+    years, to give any third party, for a charge no more than your\r
+    cost of physically performing source distribution, a complete\r
+    machine-readable copy of the corresponding source code, to be\r
+    distributed under the terms of Sections 1 and 2 above on a medium\r
+    customarily used for software interchange; or,\r
+\r
+    c) Accompany it with the information you received as to the offer\r
+    to distribute corresponding source code.  (This alternative is\r
+    allowed only for noncommercial distribution and only if you\r
+    received the program in object code or executable form with such\r
+    an offer, in accord with Subsection b above.)\r
+\r
+The source code for a work means the preferred form of the work for\r
+making modifications to it.  For an executable work, complete source\r
+code means all the source code for all modules it contains, plus any\r
+associated interface definition files, plus the scripts used to\r
+control compilation and installation of the executable.  However, as a\r
+special exception, the source code distributed need not include\r
+anything that is normally distributed (in either source or binary\r
+form) with the major components (compiler, kernel, and so on) of the\r
+operating system on which the executable runs, unless that component\r
+itself accompanies the executable.\r
+\r
+If distribution of executable or object code is made by offering\r
+access to copy from a designated place, then offering equivalent\r
+access to copy the source code from the same place counts as\r
+distribution of the source code, even though third parties are not\r
+compelled to copy the source along with the object code.\r
+\f\r
+  4. You may not copy, modify, sublicense, or distribute the Program\r
+except as expressly provided under this License.  Any attempt\r
+otherwise to copy, modify, sublicense or distribute the Program is\r
+void, and will automatically terminate your rights under this License.\r
+However, parties who have received copies, or rights, from you under\r
+this License will not have their licenses terminated so long as such\r
+parties remain in full compliance.\r
+\r
+  5. You are not required to accept this License, since you have not\r
+signed it.  However, nothing else grants you permission to modify or\r
+distribute the Program or its derivative works.  These actions are\r
+prohibited by law if you do not accept this License.  Therefore, by\r
+modifying or distributing the Program (or any work based on the\r
+Program), you indicate your acceptance of this License to do so, and\r
+all its terms and conditions for copying, distributing or modifying\r
+the Program or works based on it.\r
+\r
+  6. Each time you redistribute the Program (or any work based on the\r
+Program), the recipient automatically receives a license from the\r
+original licensor to copy, distribute or modify the Program subject to\r
+these terms and conditions.  You may not impose any further\r
+restrictions on the recipients' exercise of the rights granted herein.\r
+You are not responsible for enforcing compliance by third parties to\r
+this License.\r
+\r
+  7. If, as a consequence of a court judgment or allegation of patent\r
+infringement or for any other reason (not limited to patent issues),\r
+conditions are imposed on you (whether by court order, agreement or\r
+otherwise) that contradict the conditions of this License, they do not\r
+excuse you from the conditions of this License.  If you cannot\r
+distribute so as to satisfy simultaneously your obligations under this\r
+License and any other pertinent obligations, then as a consequence you\r
+may not distribute the Program at all.  For example, if a patent\r
+license would not permit royalty-free redistribution of the Program by\r
+all those who receive copies directly or indirectly through you, then\r
+the only way you could satisfy both it and this License would be to\r
+refrain entirely from distribution of the Program.\r
+\r
+If any portion of this section is held invalid or unenforceable under\r
+any particular circumstance, the balance of the section is intended to\r
+apply and the section as a whole is intended to apply in other\r
+circumstances.\r
+\r
+It is not the purpose of this section to induce you to infringe any\r
+patents or other property right claims or to contest validity of any\r
+such claims; this section has the sole purpose of protecting the\r
+integrity of the free software distribution system, which is\r
+implemented by public license practices.  Many people have made\r
+generous contributions to the wide range of software distributed\r
+through that system in reliance on consistent application of that\r
+system; it is up to the author/donor to decide if he or she is willing\r
+to distribute software through any other system and a licensee cannot\r
+impose that choice.\r
+\r
+This section is intended to make thoroughly clear what is believed to\r
+be a consequence of the rest of this License.\r
+\f\r
+  8. If the distribution and/or use of the Program is restricted in\r
+certain countries either by patents or by copyrighted interfaces, the\r
+original copyright holder who places the Program under this License\r
+may add an explicit geographical distribution limitation excluding\r
+those countries, so that distribution is permitted only in or among\r
+countries not thus excluded.  In such case, this License incorporates\r
+the limitation as if written in the body of this License.\r
+\r
+  9. The Free Software Foundation may publish revised and/or new versions\r
+of the General Public License from time to time.  Such new versions will\r
+be similar in spirit to the present version, but may differ in detail to\r
+address new problems or concerns.\r
+\r
+Each version is given a distinguishing version number.  If the Program\r
+specifies a version number of this License which applies to it and "any\r
+later version", you have the option of following the terms and conditions\r
+either of that version or of any later version published by the Free\r
+Software Foundation.  If the Program does not specify a version number of\r
+this License, you may choose any version ever published by the Free Software\r
+Foundation.\r
+\r
+  10. If you wish to incorporate parts of the Program into other free\r
+programs whose distribution conditions are different, write to the author\r
+to ask for permission.  For software which is copyrighted by the Free\r
+Software Foundation, write to the Free Software Foundation; we sometimes\r
+make exceptions for this.  Our decision will be guided by the two goals\r
+of preserving the free status of all derivatives of our free software and\r
+of promoting the sharing and reuse of software generally.\r
+\r
+                           NO WARRANTY\r
+\r
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\r
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN\r
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\r
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\r
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS\r
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE\r
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\r
+REPAIR OR CORRECTION.\r
+\r
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\r
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\r
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\r
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\r
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\r
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\r
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\r
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\r
+POSSIBILITY OF SUCH DAMAGES.\r
+\r
+                    END OF TERMS AND CONDITIONS\r
+\f\r
+           How to Apply These Terms to Your New Programs\r
+\r
+  If you develop a new program, and you want it to be of the greatest\r
+possible use to the public, the best way to achieve this is to make it\r
+free software which everyone can redistribute and change under these terms.\r
+\r
+  To do so, attach the following notices to the program.  It is safest\r
+to attach them to the start of each source file to most effectively\r
+convey the exclusion of warranty; and each file should have at least\r
+the "copyright" line and a pointer to where the full notice is found.\r
+\r
+    <one line to give the program's name and a brief idea of what it does.>\r
+    Copyright (C) <year>  <name of author>\r
+\r
+    This program is free software; you can redistribute it and/or modify\r
+    it under the terms of the GNU General Public License as published by\r
+    the Free Software Foundation; either version 2 of the License, or\r
+    (at your option) any later version.\r
+\r
+    This program is distributed in the hope that it will be useful,\r
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+    GNU General Public License for more details.\r
+\r
+    You should have received a copy of the GNU General Public License\r
+    along with this program; if not, write to the Free Software\r
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+\r
+\r
+Also add information on how to contact you by electronic and paper mail.\r
+\r
+If the program is interactive, make it output a short notice like this\r
+when it starts in an interactive mode:\r
+\r
+    Gnomovision version 69, Copyright (C) year  name of author\r
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\r
+    This is free software, and you are welcome to redistribute it\r
+    under certain conditions; type `show c' for details.\r
+\r
+The hypothetical commands `show w' and `show c' should show the appropriate\r
+parts of the General Public License.  Of course, the commands you use may\r
+be called something other than `show w' and `show c'; they could even be\r
+mouse-clicks or menu items--whatever suits your program.\r
+\r
+You should also get your employer (if you work as a programmer) or your\r
+school, if any, to sign a "copyright disclaimer" for the program, if\r
+necessary.  Here is a sample; alter the names:\r
+\r
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program\r
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.\r
+\r
+  <signature of Ty Coon>, 1 April 1989\r
+  Ty Coon, President of Vice\r
+\r
+This General Public License does not permit incorporating your program into\r
+proprietary programs.  If your program is a subroutine library, you may\r
+consider it more useful to permit linking proprietary applications with the\r
+library.  If this is what you want to do, use the GNU Library General\r
+Public License instead of this License.\r
diff --git a/plugins/profinet/ChangeLog b/plugins/profinet/ChangeLog
new file mode 100644 (file)
index 0000000..dcd6347
--- /dev/null
@@ -0,0 +1,16 @@
+$Id: ChangeLog 11400 2004-07-18 00:24:25Z guy $\r
+\r
+Overview of changes in Art-Net Ethereal plugin:\r
+\r
+Version 0.0.0:\r
+\r
+* initial implementation\r
+\r
+Version 0.0.1:\r
+\r
+* some experiments\r
+\r
+Version 0.1.0:\r
+\r
+* first official plugin\r
+\r
diff --git a/plugins/profinet/INSTALL b/plugins/profinet/INSTALL
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/plugins/profinet/Makefile.am b/plugins/profinet/Makefile.am
new file mode 100644 (file)
index 0000000..46d330f
--- /dev/null
@@ -0,0 +1,44 @@
+# Makefile.am\r
+# Automake file for Ethereal/plugins/profinet\r
+#\r
+# $Id: Makefile.am 11400 2004-07-18 00:24:25Z guy $\r
+#\r
+# Ethereal - Network traffic analyzer\r
+# By Gerald Combs <gerald@ethereal.com>\r
+# Copyright 1998 Gerald Combs\r
+# \r
+# This program is free software; you can redistribute it and/or\r
+# modify it under the terms of the GNU General Public License\r
+# as published by the Free Software Foundation; either version 2\r
+# of the License, or (at your option) any later version.\r
+# \r
+# This program is distributed in the hope that it will be useful,\r
+# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+# GNU General Public License for more details.\r
+# \r
+# You should have received a copy of the GNU General Public License\r
+# along with this program; if not, write to the Free Software\r
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\r
+#\r
+\r
+INCLUDES = -I$(top_srcdir)\r
+\r
+plugindir = @plugindir@\r
+\r
+plugin_LTLIBRARIES = profinet.la\r
+profinet_la_SOURCES = profinet.c packet-dcerpc-pn-io.c moduleinfo.h\r
+profinet_la_LDFLAGS = -module -avoid-version\r
+profinet_la_LIBADD = @PLUGIN_LIBS@\r
+\r
+# Libs must be cleared, or else libtool won't create a shared module.\r
+# If your module needs to be linked against any particular libraries,\r
+# add them here.\r
+LIBS =\r
+\r
+CLEANFILES = \\r
+       profinet \\r
+       *~\r
+\r
+EXTRA_DIST = \\r
+       Makefile.nmake\r
diff --git a/plugins/profinet/Makefile.nmake b/plugins/profinet/Makefile.nmake
new file mode 100644 (file)
index 0000000..4a2368b
--- /dev/null
@@ -0,0 +1,29 @@
+#\r
+# $Id: Makefile.nmake 12176 2004-10-01 19:50:03Z guy $\r
+#\r
+\r
+include ..\..\config.nmake\r
+\r
+############### no need to modify below this line #########\r
+\r
+CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \\r
+       /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)\r
+\r
+LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)\r
+\r
+!IFDEF ENABLE_LIBETHEREAL\r
+LINK_PLUGIN_WITH=..\..\epan\libethereal.lib\r
+CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)\r
+\r
+OBJECTS=profinet.obj packet-dcerpc-pn-io.obj\r
+\r
+profinet.dll profinet.exp profinet.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)\r
+       link -dll /out:profinet.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \\r
+       $(GLIB_LIBS)\r
+\r
+!ENDIF\r
+\r
+clean:\r
+       rm -f $(OBJECTS) profinet.dll profinet.exp profinet.lib *.pdb\r
+\r
+distclean: clean\r
diff --git a/plugins/profinet/NEWS b/plugins/profinet/NEWS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/plugins/profinet/moduleinfo.h b/plugins/profinet/moduleinfo.h
new file mode 100644 (file)
index 0000000..9397750
--- /dev/null
@@ -0,0 +1,17 @@
+/* Included *after* config.h, in order to re-define these macros */\r
+\r
+#ifdef PACKAGE\r
+#undef PACKAGE\r
+#endif\r
+\r
+/* Name of package */\r
+#define PACKAGE "profinet"\r
+\r
+\r
+#ifdef VERSION\r
+#undef VERSION\r
+#endif\r
+\r
+/* Version number of package */\r
+#define VERSION "0.1.0"\r
+\r
similarity index 99%
rename from epan/dissectors/packet-dcerpc-pn-io.c
rename to plugins/profinet/packet-dcerpc-pn-io.c
index b1ff9a05f14bea8f2a2d718788e97dc0fb71b6fc..dc7cefd28cb1eecb507f1fa314b1d171738043e1 100644 (file)
@@ -58,7 +58,7 @@
 
 #include <glib.h>
 #include <epan/packet.h>
-#include "packet-dcerpc.h"
+#include <epan/dissectors/packet-dcerpc.h>
 
 
 
diff --git a/plugins/profinet/profinet.c b/plugins/profinet/profinet.c
new file mode 100644 (file)
index 0000000..4915936
--- /dev/null
@@ -0,0 +1,73 @@
+/* profinet-plugin.c\r
+ * Routines for the PROFINET plugin\r
+ *\r
+ * $Id: profinet-plugin.c 12115 2004-09-27 22:55:15Z guy $\r
+ *\r
+ * Ethereal - Network traffic analyzer\r
+ * By Gerald Combs <gerald@ethereal.com>\r
+ * Copyright 1999 Gerald Combs\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\r
+ */\r
+\r
+/* Include files */\r
+\r
+#ifdef HAVE_CONFIG_H\r
+#include "config.h"\r
+#endif\r
+\r
+#include "moduleinfo.h"\r
+#include <gmodule.h>\r
+\r
+#include <glib.h>\r
+\r
+/* Define version if we are not building ethereal statically */\r
+\r
+#ifndef ENABLE_STATIC\r
+G_MODULE_EXPORT const gchar version[] = VERSION;\r
+#endif\r
+\r
+gboolean plugin_registered = FALSE;\r
+\r
+/* XXX */\r
+extern void proto_register_pn_io (void);\r
+extern void proto_reg_handoff_pn_io (void);\r
+\r
+\r
+\r
+/* Start the functions we need for the plugin stuff */\r
+\r
+#ifndef ENABLE_STATIC\r
+\r
+G_MODULE_EXPORT void\r
+plugin_register(void)\r
+{\r
+  /* register the new protocol, protocol fields, and subtrees */\r
+  if (plugin_registered == FALSE) { /* execute protocol initialization only once */\r
+    proto_register_pn_io();\r
+         \r
+       plugin_registered = TRUE;\r
+  }\r
+}\r
+\r
+G_MODULE_EXPORT void\r
+plugin_reg_handoff(void){\r
+  proto_reg_handoff_pn_io();\r
+}\r
+\r
+#endif\r
+\r
+/* End the functions we need for plugin stuff */\r
+\r