add svn properties for dir and files

svn path=/trunk/; revision=21780
This commit is contained in:
Ulf Lamping 2007-05-15 09:05:53 +00:00
parent 12abbdb118
commit 12101aad61
25 changed files with 4632 additions and 4632 deletions

View File

@ -1,6 +1,6 @@
Author : Author :
Gerhard Gappmeier <gerhard.gappmeier@ascolab.com> Gerhard Gappmeier <gerhard.gappmeier@ascolab.com>
ascolab GmbH ascolab GmbH
http://www.ascolab.com http://www.ascolab.com

View File

@ -1,340 +1,340 @@
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
Version 2, June 1991 Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc. Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.
Preamble Preamble
The licenses for most software are designed to take away your The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to the GNU Library General Public License instead.) You can apply it to
your programs, too. your programs, too.
When we speak of free software, we are referring to freedom, not When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things. in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights. anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it. distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their source code. And you must show them these terms so they know their
rights. rights.
We protect your rights with two steps: (1) copyright the software, and We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy, (2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software. distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original that any problems introduced by others will not reflect on the original
authors' reputations. authors' reputations.
Finally, any free program is threatened constantly by software Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all. patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and The precise terms and conditions for copying, distribution and
modification follow. modification follow.
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains 0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below, under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program" refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law: means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it, that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you". the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program). Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does. Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's 1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty; notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License and give any other recipients of the Program a copy of this License
along with the Program. along with the Program.
You may charge a fee for the physical act of transferring a copy, and You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee. you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion 2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1 distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions: above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change. stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License. parties under the terms of this License.
c) If the modified program normally reads commands interactively c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on does not normally print such an announcement, your work based on
the Program is not required to print an announcement.) the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program, identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it. entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or exercise the right to control the distribution of derivative or
collective works based on the Program. collective works based on the Program.
In addition, mere aggregation of another work not based on the Program In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under a storage or distribution medium does not bring the other work under
the scope of this License. the scope of this License.
3. You may copy and distribute the Program (or a work based on it, 3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following: Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or, 1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or, customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such received the program in object code or executable form with such
an offer, in accord with Subsection b above.) an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component operating system on which the executable runs, unless that component
itself accompanies the executable. itself accompanies the executable.
If distribution of executable or object code is made by offering If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not distribution of the source code, even though third parties are not
compelled to copy the source along with the object code. compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program 4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License. void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such this License will not have their licenses terminated so long as such
parties remain in full compliance. parties remain in full compliance.
5. You are not required to accept this License, since you have not 5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying all its terms and conditions for copying, distributing or modifying
the Program or works based on it. the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the 6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein. restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to You are not responsible for enforcing compliance by third parties to
this License. this License.
7. If, as a consequence of a court judgment or allegation of patent 7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues), infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program. refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other apply and the section as a whole is intended to apply in other
circumstances. circumstances.
It is not the purpose of this section to induce you to infringe any It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is integrity of the free software distribution system, which is
implemented by public license practices. Many people have made implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot to distribute software through any other system and a licensee cannot
impose that choice. impose that choice.
This section is intended to make thoroughly clear what is believed to This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License. be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in 8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License. the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions 9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to be similar in spirit to the present version, but may differ in detail to
address new problems or concerns. address new problems or concerns.
Each version is given a distinguishing version number. If the Program Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software this License, you may choose any version ever published by the Free Software
Foundation. Foundation.
10. If you wish to incorporate parts of the Program into other free 10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally. of promoting the sharing and reuse of software generally.
NO WARRANTY NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION. REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES. POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms. free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found. the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.> <one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author> Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or the Free Software Foundation; either version 2 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail. Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this If the program is interactive, make it output a short notice like this
when it starts in an interactive mode: when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details. under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program. mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names: necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker. `Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989 <signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice Ty Coon, President of Vice
This General Public License does not permit incorporating your program into This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General library. If this is what you want to do, use the GNU Library General
Public License instead of this License. Public License instead of this License.

View File

@ -1,8 +1,8 @@
$Id: ChangeLog,v 1.1.1.1 2006/07/12 09:17:41 gergap Exp $ $Id$
Overview of changes in OpcUa plugin: Overview of changes in OpcUa plugin:
Version 0.0.1: Version 0.0.1:
* initial implementation without security * initial implementation without security

View File

@ -1,275 +1,275 @@
# Doxyfile 1.4.1-KDevelop # Doxyfile 1.4.1-KDevelop
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Project related configuration options # Project related configuration options
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
PROJECT_NAME = opcua.kdevelop PROJECT_NAME = opcua.kdevelop
PROJECT_NUMBER = $VERSION$ PROJECT_NUMBER = $VERSION$
OUTPUT_DIRECTORY = OUTPUT_DIRECTORY =
CREATE_SUBDIRS = NO CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = NO USE_WINDOWS_ENCODING = NO
BRIEF_MEMBER_DESC = YES BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \ ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \ "The $name widget" \
"The $name file" \ "The $name file" \
is \ is \
provides \ provides \
specifies \ specifies \
contains \ contains \
represents \ represents \
a \ a \
an \ an \
the the
ALWAYS_DETAILED_SEC = NO ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES FULL_PATH_NAMES = YES
STRIP_FROM_PATH = /home/gergap/ STRIP_FROM_PATH = /home/gergap/
STRIP_FROM_INC_PATH = STRIP_FROM_INC_PATH =
SHORT_NAMES = NO SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO JAVADOC_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO DETAILS_AT_TOP = NO
INHERIT_DOCS = YES INHERIT_DOCS = YES
DISTRIBUTE_GROUP_DOC = NO DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 8 TAB_SIZE = 8
ALIASES = ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO OPTIMIZE_OUTPUT_JAVA = NO
SUBGROUPING = YES SUBGROUPING = YES
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Build related configuration options # Build related configuration options
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
EXTRACT_ALL = NO EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = YES EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = NO EXTRACT_LOCAL_METHODS = NO
HIDE_UNDOC_MEMBERS = NO HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO INTERNAL_DOCS = NO
CASE_SENSE_NAMES = YES CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES INLINE_INFO = YES
SORT_MEMBER_DOCS = YES SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO SORT_BRIEF_DOCS = NO
SORT_BY_SCOPE_NAME = NO SORT_BY_SCOPE_NAME = NO
GENERATE_TODOLIST = YES GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS = ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30 MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES SHOW_USED_FILES = YES
SHOW_DIRECTORIES = YES SHOW_DIRECTORIES = YES
FILE_VERSION_FILTER = FILE_VERSION_FILTER =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to warning and progress messages # configuration options related to warning and progress messages
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
QUIET = NO QUIET = NO
WARNINGS = YES WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO WARN_NO_PARAMDOC = NO
WARN_FORMAT = "$file:$line: $text" WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE = WARN_LOGFILE =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to the input files # configuration options related to the input files
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
INPUT = /home/gergap/work/wireshark/plugins/opcua INPUT = /home/gergap/work/wireshark/plugins/opcua
FILE_PATTERNS = *.c \ FILE_PATTERNS = *.c \
*.cc \ *.cc \
*.cxx \ *.cxx \
*.cpp \ *.cpp \
*.c++ \ *.c++ \
*.java \ *.java \
*.ii \ *.ii \
*.ixx \ *.ixx \
*.ipp \ *.ipp \
*.i++ \ *.i++ \
*.inl \ *.inl \
*.h \ *.h \
*.hh \ *.hh \
*.hxx \ *.hxx \
*.hpp \ *.hpp \
*.h++ \ *.h++ \
*.idl \ *.idl \
*.odl \ *.odl \
*.cs \ *.cs \
*.php \ *.php \
*.php3 \ *.php3 \
*.inc \ *.inc \
*.m \ *.m \
*.mm \ *.mm \
*.dox \ *.dox \
*.C \ *.C \
*.CC \ *.CC \
*.C++ \ *.C++ \
*.II \ *.II \
*.I++ \ *.I++ \
*.H \ *.H \
*.HH \ *.HH \
*.H++ \ *.H++ \
*.CS \ *.CS \
*.PHP \ *.PHP \
*.PHP3 \ *.PHP3 \
*.M \ *.M \
*.MM \ *.MM \
*.C \ *.C \
*.H \ *.H \
*.tlh \ *.tlh \
*.diff \ *.diff \
*.patch \ *.patch \
*.moc \ *.moc \
*.xpm \ *.xpm \
*.dox *.dox
RECURSIVE = yes RECURSIVE = yes
EXCLUDE = EXCLUDE =
EXCLUDE_SYMLINKS = NO EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = EXCLUDE_PATTERNS =
EXAMPLE_PATH = EXAMPLE_PATH =
EXAMPLE_PATTERNS = * EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO EXAMPLE_RECURSIVE = NO
IMAGE_PATH = IMAGE_PATH =
INPUT_FILTER = INPUT_FILTER =
FILTER_PATTERNS = FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO FILTER_SOURCE_FILES = NO
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to source browsing # configuration options related to source browsing
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
SOURCE_BROWSER = NO SOURCE_BROWSER = NO
INLINE_SOURCES = NO INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES REFERENCES_RELATION = YES
VERBATIM_HEADERS = YES VERBATIM_HEADERS = YES
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to the alphabetical class index # configuration options related to the alphabetical class index
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5 COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX = IGNORE_PREFIX =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to the HTML output # configuration options related to the HTML output
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
GENERATE_HTML = YES GENERATE_HTML = YES
HTML_OUTPUT = html HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html HTML_FILE_EXTENSION = .html
HTML_HEADER = HTML_HEADER =
HTML_FOOTER = HTML_FOOTER =
HTML_STYLESHEET = HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO GENERATE_HTMLHELP = NO
CHM_FILE = CHM_FILE =
HHC_LOCATION = HHC_LOCATION =
GENERATE_CHI = NO GENERATE_CHI = NO
BINARY_TOC = NO BINARY_TOC = NO
TOC_EXPAND = NO TOC_EXPAND = NO
DISABLE_INDEX = NO DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4 ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250 TREEVIEW_WIDTH = 250
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to the LaTeX output # configuration options related to the LaTeX output
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
GENERATE_LATEX = YES GENERATE_LATEX = YES
LATEX_OUTPUT = latex LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO COMPACT_LATEX = NO
PAPER_TYPE = a4wide PAPER_TYPE = a4wide
EXTRA_PACKAGES = EXTRA_PACKAGES =
LATEX_HEADER = LATEX_HEADER =
PDF_HYPERLINKS = NO PDF_HYPERLINKS = NO
USE_PDFLATEX = NO USE_PDFLATEX = NO
LATEX_BATCHMODE = NO LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO LATEX_HIDE_INDICES = NO
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to the RTF output # configuration options related to the RTF output
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
GENERATE_RTF = NO GENERATE_RTF = NO
RTF_OUTPUT = rtf RTF_OUTPUT = rtf
COMPACT_RTF = NO COMPACT_RTF = NO
RTF_HYPERLINKS = NO RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE = RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE = RTF_EXTENSIONS_FILE =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to the man page output # configuration options related to the man page output
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
GENERATE_MAN = NO GENERATE_MAN = NO
MAN_OUTPUT = man MAN_OUTPUT = man
MAN_EXTENSION = .3 MAN_EXTENSION = .3
MAN_LINKS = NO MAN_LINKS = NO
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to the XML output # configuration options related to the XML output
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
GENERATE_XML = yes GENERATE_XML = yes
XML_OUTPUT = xml XML_OUTPUT = xml
XML_SCHEMA = XML_SCHEMA =
XML_DTD = XML_DTD =
XML_PROGRAMLISTING = YES XML_PROGRAMLISTING = YES
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output # configuration options for the AutoGen Definitions output
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO GENERATE_AUTOGEN_DEF = NO
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to the Perl module output # configuration options related to the Perl module output
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
GENERATE_PERLMOD = NO GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX = PERLMOD_MAKEVAR_PREFIX =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to the preprocessor # Configuration options related to the preprocessor
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES SEARCH_INCLUDES = YES
INCLUDE_PATH = INCLUDE_PATH =
INCLUDE_FILE_PATTERNS = INCLUDE_FILE_PATTERNS =
PREDEFINED = PREDEFINED =
EXPAND_AS_DEFINED = EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES SKIP_FUNCTION_MACROS = YES
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration::additions related to external references # Configuration::additions related to external references
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
TAGFILES = TAGFILES =
GENERATE_TAGFILE = opcua.tag GENERATE_TAGFILE = opcua.tag
ALLEXTERNALS = NO ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl PERL_PATH = /usr/bin/perl
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to the dot tool # Configuration options related to the dot tool
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES CLASS_DIAGRAMS = YES
HIDE_UNDOC_RELATIONS = YES HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO HAVE_DOT = NO
CLASS_GRAPH = YES CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES GROUP_GRAPHS = YES
UML_LOOK = NO UML_LOOK = NO
TEMPLATE_RELATIONS = NO TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO CALL_GRAPH = NO
GRAPHICAL_HIERARCHY = YES GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png DOT_IMAGE_FORMAT = png
DOT_PATH = DOT_PATH =
DOTFILE_DIRS = DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024 MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024 MAX_DOT_GRAPH_HEIGHT = 1024
MAX_DOT_GRAPH_DEPTH = 1000 MAX_DOT_GRAPH_DEPTH = 1000
DOT_TRANSPARENT = NO DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES GENERATE_LEGEND = YES
DOT_CLEANUP = YES DOT_CLEANUP = YES
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration::additions related to the search engine # Configuration::additions related to the search engine
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
SEARCHENGINE = NO SEARCHENGINE = NO

View File

@ -1,119 +1,119 @@
# Makefile.am # Makefile.am
# Automake file for OpcUa plugin # Automake file for OpcUa plugin
# #
# $Id: Makefile.am,v 1.1.1.1 2006/07/12 09:17:41 gergap Exp $ # $Id$
# #
# Adapted by Gerhard Gappmeier for OpcUa # Adapted by Gerhard Gappmeier for OpcUa
# Wireshark - Network traffic analyzer # Wireshark - Network traffic analyzer
# By Gerald Combs <gerald@wireshark.org> # By Gerald Combs <gerald@wireshark.org>
# Copyright 1998 Gerald Combs # Copyright 1998 Gerald Combs
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2 # as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version. # of the License, or (at your option) any later version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# #
INCLUDES = -I$(top_srcdir) -I$(includedir) INCLUDES = -I$(top_srcdir) -I$(includedir)
include Makefile.common include Makefile.common
plugindir = @plugindir@ plugindir = @plugindir@
plugin_LTLIBRARIES = opcua.la plugin_LTLIBRARIES = opcua.la
opcua_la_SOURCES = \ opcua_la_SOURCES = \
plugin.c \ plugin.c \
moduleinfo.h \ moduleinfo.h \
$(DISSECTOR_SRC) \ $(DISSECTOR_SRC) \
$(DISSECTOR_INCLUDES) $(DISSECTOR_INCLUDES)
opcua_la_LDFLAGS = -module -avoid-version opcua_la_LDFLAGS = -module -avoid-version
opcua_la_LIBADD = @PLUGIN_LIBS@ opcua_la_LIBADD = @PLUGIN_LIBS@
# Libs must be cleared, or else libtool won't create a shared module. # Libs must be cleared, or else libtool won't create a shared module.
# If your module needs to be linked against any particular libraries, # If your module needs to be linked against any particular libraries,
# add them here. # add them here.
LIBS = LIBS =
# #
# Build plugin.c, which contains the plugin version[] string, a # Build plugin.c, which contains the plugin version[] string, a
# function plugin_register() that calls the register routines for all # function plugin_register() that calls the register routines for all
# protocols, and a function plugin_reg_handoff() that calls the handoff # protocols, and a function plugin_reg_handoff() that calls the handoff
# registration routines for all protocols. # registration routines for all protocols.
# #
# We do this by scanning sources. If that turns out to be too slow, # We do this by scanning sources. If that turns out to be too slow,
# maybe we could just require every .o file to have an register routine # maybe we could just require every .o file to have an register routine
# of a given name (packet-aarp.o -> proto_register_aarp, etc.). # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
# #
# Formatting conventions: The name of the proto_register_* routines an # Formatting conventions: The name of the proto_register_* routines an
# proto_reg_handoff_* routines must start in column zero, or must be # proto_reg_handoff_* routines must start in column zero, or must be
# preceded only by "void " starting in column zero, and must not be # preceded only by "void " starting in column zero, and must not be
# inside #if. # inside #if.
# #
# DISSECTOR_SRC is assumed to have all the files that need to be scanned. # DISSECTOR_SRC is assumed to have all the files that need to be scanned.
# #
# For some unknown reason, having a big "for" loop in the Makefile # For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to # to scan all the files doesn't work with some "make"s; they seem to
# pass only the first few names in the list to the shell, for some # pass only the first few names in the list to the shell, for some
# reason. # reason.
# #
# Therefore, we have a script to generate the plugin.c file. # Therefore, we have a script to generate the plugin.c file.
# The shell script runs slowly, as multiple greps and seds are run # The shell script runs slowly, as multiple greps and seds are run
# for each input file; this is especially slow on Windows. Therefore, # for each input file; this is especially slow on Windows. Therefore,
# if Python is present (as indicated by PYTHON being defined), we run # if Python is present (as indicated by PYTHON being defined), we run
# a faster Python script to do that work instead. # a faster Python script to do that work instead.
# #
# The first argument is the directory in which the source files live. # The first argument is the directory in which the source files live.
# The second argument is "plugin", to indicate that we should build # The second argument is "plugin", to indicate that we should build
# a plugin.c file for a plugin. # a plugin.c file for a plugin.
# All subsequent arguments are the files to scan. # All subsequent arguments are the files to scan.
# #
plugin.c: $(DISSECTOR_SRC) $(top_srcdir)/tools/make-dissector-reg \ plugin.c: $(DISSECTOR_SRC) $(top_srcdir)/tools/make-dissector-reg \
$(top_srcdir)/tools/make-dissector-reg.py $(top_srcdir)/tools/make-dissector-reg.py
@if test -n $(PYTHON); then \ @if test -n $(PYTHON); then \
echo Making plugin.c with python ; \ echo Making plugin.c with python ; \
$(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \ $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
plugin $(DISSECTOR_SRC) ; \ plugin $(DISSECTOR_SRC) ; \
else \ else \
echo Making plugin.c with shell script ; \ echo Making plugin.c with shell script ; \
$(top_srcdir)/tools/make-dissector-reg $(srcdir) \ $(top_srcdir)/tools/make-dissector-reg $(srcdir) \
$(plugin_src) plugin $(DISSECTOR_SRC) ; \ $(plugin_src) plugin $(DISSECTOR_SRC) ; \
fi fi
# #
# Currently plugin.c can be included in the distribution because # Currently plugin.c can be included in the distribution because
# we always build all protocol dissectors. We used to have to check # we always build all protocol dissectors. We used to have to check
# whether or not to build the snmp dissector. If we again need to # whether or not to build the snmp dissector. If we again need to
# variably build something, making plugin.c non-portable, uncomment # variably build something, making plugin.c non-portable, uncomment
# the dist-hook line below. # the dist-hook line below.
# #
# Oh, yuk. We don't want to include "plugin.c" in the distribution, as # Oh, yuk. We don't want to include "plugin.c" in the distribution, as
# its contents depend on the configuration, and therefore we want it # its contents depend on the configuration, and therefore we want it
# to be built when the first "make" is done; however, Automake insists # to be built when the first "make" is done; however, Automake insists
# on putting *all* source into the distribution. # on putting *all* source into the distribution.
# #
# We work around this by having a "dist-hook" rule that deletes # We work around this by having a "dist-hook" rule that deletes
# "plugin.c", so that "dist" won't pick it up. # "plugin.c", so that "dist" won't pick it up.
# #
#dist-hook: #dist-hook:
# @rm -f $(distdir)/plugin.c # @rm -f $(distdir)/plugin.c
CLEANFILES = \ CLEANFILES = \
opcua \ opcua \
*~ *~
MAINTAINERCLEANFILES = \ MAINTAINERCLEANFILES = \
Makefile.in \ Makefile.in \
plugin.c plugin.c
EXTRA_DIST = \ EXTRA_DIST = \
Makefile.common \ Makefile.common \
Makefile.nmake Makefile.nmake

View File

@ -1,41 +1,41 @@
# Makefile.common for OpcUa plugin # Makefile.common for OpcUa plugin
# Contains the stuff from Makefile.am and Makefile.nmake that is # Contains the stuff from Makefile.am and Makefile.nmake that is
# a) common to both files and # a) common to both files and
# b) portable between both files # b) portable between both files
# #
# $Id: Makefile.common,v 1.3 2007/02/08 11:29:50 gergap Exp $ # $Id$
# #
# Adapted by Gerhard Gappmeier for OpcUa # Adapted by Gerhard Gappmeier for OpcUa
# Wireshark - Network traffic analyzer # Wireshark - Network traffic analyzer
# By Gerald Combs <gerald@wireshark.org> # By Gerald Combs <gerald@wireshark.org>
# Copyright 1998 Gerald Combs # Copyright 1998 Gerald Combs
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2 # as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version. # of the License, or (at your option) any later version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# the name of the plugin # the name of the plugin
PLUGIN_NAME = opcua PLUGIN_NAME = opcua
# the dissector sources (without any helpers) # the dissector sources (without any helpers)
DISSECTOR_SRC = \ DISSECTOR_SRC = \
opcua.c \ opcua.c \
ua_transport_layer.c \ ua_transport_layer.c \
ua_security_layer.c \ ua_security_layer.c \
ua_application_layer.c \ ua_application_layer.c \
opcua_serviceparser.c \ opcua_serviceparser.c \
opcua_complextypeparser.c \ opcua_complextypeparser.c \
opcua_enumparser.c \ opcua_enumparser.c \
opcua_simpletypes.c \ opcua_simpletypes.c \
opcua_servicetable.c \ opcua_servicetable.c \
opcua_hfindeces.c opcua_hfindeces.c

View File

@ -1,79 +1,79 @@
# Makefile.nmake # Makefile.nmake
# nmake file for OpcUa plugin # nmake file for OpcUa plugin
# #
# $Id: Makefile.nmake,v 1.1.1.1 2006/07/12 09:17:41 gergap Exp $ # $Id$
# #
include ..\..\config.nmake include ..\..\config.nmake
############### no need to modify below this line ######### ############### no need to modify below this line #########
include Makefile.common include Makefile.common
CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \ CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
/I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS) /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS) LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
!IFDEF ENABLE_LIBWIRESHARK !IFDEF ENABLE_LIBWIRESHARK
LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib ..\..\epan\dissectors\dissectors.lib LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib ..\..\epan\dissectors\dissectors.lib
CFLAGS=/DHAVE_WIN32_LIBWIRESHARK_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS) CFLAGS=/DHAVE_WIN32_LIBWIRESHARK_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
DISSECTOR_OBJECTS = $(DISSECTOR_SRC:.c=.obj) DISSECTOR_OBJECTS = $(DISSECTOR_SRC:.c=.obj)
OBJECTS=$(DISSECTOR_OBJECTS) plugin.obj OBJECTS=$(DISSECTOR_OBJECTS) plugin.obj
opcua.dll opcua.exp opcua.lib : $(OBJECTS) $(LINK_PLUGIN_WITH) opcua.dll opcua.exp opcua.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
link -dll /out:opcua.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \ link -dll /out:opcua.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS) $(GLIB_LIBS)
# #
# Build plugin.c, which contains the plugin version[] string, a # Build plugin.c, which contains the plugin version[] string, a
# function plugin_register() that calls the register routines for all # function plugin_register() that calls the register routines for all
# protocols, and a function plugin_reg_handoff() that calls the handoff # protocols, and a function plugin_reg_handoff() that calls the handoff
# registration routines for all protocols. # registration routines for all protocols.
# #
# We do this by scanning sources. If that turns out to be too slow, # We do this by scanning sources. If that turns out to be too slow,
# maybe we could just require every .o file to have an register routine # maybe we could just require every .o file to have an register routine
# of a given name (packet-aarp.o -> proto_register_aarp, etc.). # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
# #
# Formatting conventions: The name of the proto_register_* routines an # Formatting conventions: The name of the proto_register_* routines an
# proto_reg_handoff_* routines must start in column zero, or must be # proto_reg_handoff_* routines must start in column zero, or must be
# preceded only by "void " starting in column zero, and must not be # preceded only by "void " starting in column zero, and must not be
# inside #if. # inside #if.
# #
# DISSECTOR_SRC is assumed to have all the files that need to be scanned. # DISSECTOR_SRC is assumed to have all the files that need to be scanned.
# #
# For some unknown reason, having a big "for" loop in the Makefile # For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to # to scan all the files doesn't work with some "make"s; they seem to
# pass only the first few names in the list to the shell, for some # pass only the first few names in the list to the shell, for some
# reason. # reason.
# #
# Therefore, we have a script to generate the plugin.c file. # Therefore, we have a script to generate the plugin.c file.
# The shell script runs slowly, as multiple greps and seds are run # The shell script runs slowly, as multiple greps and seds are run
# for each input file; this is especially slow on Windows. Therefore, # for each input file; this is especially slow on Windows. Therefore,
# if Python is present (as indicated by PYTHON being defined), we run # if Python is present (as indicated by PYTHON being defined), we run
# a faster Python script to do that work instead. # a faster Python script to do that work instead.
# #
# The first argument is the directory in which the source files live. # The first argument is the directory in which the source files live.
# The second argument is "plugin", to indicate that we should build # The second argument is "plugin", to indicate that we should build
# a plugin.c file for a plugin. # a plugin.c file for a plugin.
# All subsequent arguments are the files to scan. # All subsequent arguments are the files to scan.
# #
plugin.c: $(DISSECTOR_SRC) plugin.c: $(DISSECTOR_SRC)
!IFDEF PYTHON !IFDEF PYTHON
@echo Making plugin.c (using python) @echo Making plugin.c (using python)
@$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(DISSECTOR_SRC) @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(DISSECTOR_SRC)
!ELSE !ELSE
@echo Making plugin.c (using sh) @echo Making plugin.c (using sh)
@$(SH) ../../tools/make-dissector-reg . plugin $(DISSECTOR_SRC) @$(SH) ../../tools/make-dissector-reg . plugin $(DISSECTOR_SRC)
!ENDIF !ENDIF
!ENDIF !ENDIF
clean: clean:
rm -f $(OBJECTS) opcua.dll opcua.exp opcua.lib *.pdb rm -f $(OBJECTS) opcua.dll opcua.exp opcua.lib *.pdb
distclean: clean distclean: clean
maintainer-clean: distclean maintainer-clean: distclean

View File

@ -1,58 +1,58 @@
OpcUa Plugin: OpcUa Plugin:
============= =============
This plugin implements the dissection of the OpcUa Binary Protocol. This plugin implements the dissection of the OpcUa Binary Protocol.
Author: Gerhard Gappmeier Author: Gerhard Gappmeier
ascolab GmbH ascolab GmbH
http://www.ascolab.com http://www.ascolab.com
Overview: Overview:
========= =========
OpcUa (OPC Unified Architecture) is a vendor and platform independent OpcUa (OPC Unified Architecture) is a vendor and platform independent
protocol for automation technology. It is the successor of the protocol for automation technology. It is the successor of the
COM/DCOM based specifications OPC DA, OPC Alarm & Events, OPC HDA, etc. COM/DCOM based specifications OPC DA, OPC Alarm & Events, OPC HDA, etc.
It unifies all this technologies into a single protocol. It unifies all this technologies into a single protocol.
The specification describes abstract services that are independent The specification describes abstract services that are independent
of the underlying protocol. For now there exist protocol mappings of the underlying protocol. For now there exist protocol mappings
to a Binary TCP based protocol and a SOAP based Webservice. to a Binary TCP based protocol and a SOAP based Webservice.
Also a hybrid version will be available where the Binary messages are transported Also a hybrid version will be available where the Binary messages are transported
by a single webservice command called "Invoke". by a single webservice command called "Invoke".
More information about the technology you can find on More information about the technology you can find on
http://www.ascolab.com/index.php?file=ua&lang=en. http://www.ascolab.com/index.php?file=ua&lang=en.
Protocol Mappings: Protocol Mappings:
================== ==================
Binary (TCP): The fastest and most flexible version (small footprint, no XML and SOAP necessary) Binary (TCP): The fastest and most flexible version (small footprint, no XML and SOAP necessary)
can easily be tunneled (SSH, IPSEC, etc.), redirected, ... can easily be tunneled (SSH, IPSEC, etc.), redirected, ...
SOAP version: Easy to implement with verious tools like .Net, JAVA, gSOAP, etc. SOAP version: Easy to implement with verious tools like .Net, JAVA, gSOAP, etc.
Better to communicate through firewalls via HTTP. Better to communicate through firewalls via HTTP.
SOAP with Binary Attchment: Combines the advantages of both. SOAP with Binary Attchment: Combines the advantages of both.
The messages are encoded as Binary, and transported via SOAP as binary The messages are encoded as Binary, and transported via SOAP as binary
attachment. attachment.
The OPC Foundation offers a free Opc Ua stack implementation in ANSI C The OPC Foundation offers a free Opc Ua stack implementation in ANSI C
for all members. This stack implements the binary protocol as well for all members. This stack implements the binary protocol as well
as the SOAP version. It's easily portable to different kinds of operating as the SOAP version. It's easily portable to different kinds of operating
systems from embedded devices to servers. systems from embedded devices to servers.
This makes it easy to implement Opc Ua applications based on this stack This makes it easy to implement Opc Ua applications based on this stack
and it is expected that the binary protocol will be the most used and it is expected that the binary protocol will be the most used
protocol. protocol.
Nevertheless it's free to everbody to implement an own stack according Nevertheless it's free to everbody to implement an own stack according
to the specification. An own implementation of the SOAP version to the specification. An own implementation of the SOAP version
should be easy with the various SOAP toolkits. should be easy with the various SOAP toolkits.
For more information see http://www.opcfoundation.org For more information see http://www.opcfoundation.org
Known limitations: Known limitations:
================== ==================
* In this version the security layer contains only dummy data. * In this version the security layer contains only dummy data.
The plugin decodes the transport layer, skips the security dummy data The plugin decodes the transport layer, skips the security dummy data
and decodes the application layer. and decodes the application layer.
Security implementation will follow when it has been implemented in the Security implementation will follow when it has been implemented in the
Opc Ua stack. Opc Ua stack.

View File

@ -1,17 +1,17 @@
/* Included *after* config.h, in order to re-define these macros */ /* Included *after* config.h, in order to re-define these macros */
#ifdef PACKAGE #ifdef PACKAGE
#undef PACKAGE #undef PACKAGE
#endif #endif
/* Name of package */ /* Name of package */
#define PACKAGE "opcua" #define PACKAGE "opcua"
#ifdef VERSION #ifdef VERSION
#undef VERSION #undef VERSION
#endif #endif
/* Version number of package */ /* Version number of package */
#define VERSION "0.0.1" #define VERSION "0.0.1"

View File

@ -1,255 +1,255 @@
/****************************************************************************** /******************************************************************************
** $Id: opcua.c,v 1.5 2007/02/08 11:29:45 gergap Exp $ ** $Id$
** **
** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved. ** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved.
** Web: http://www.ascolab.com ** Web: http://www.ascolab.com
** **
** This program is free software; you can redistribute it and/or ** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License ** modify it under the terms of the GNU General Public License
** as published by the Free Software Foundation; either version 2 ** as published by the Free Software Foundation; either version 2
** of the License, or (at your option) any later version. ** of the License, or (at your option) any later version.
** **
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
** **
** Project: OpcUa Wireshark Plugin ** Project: OpcUa Wireshark Plugin
** **
** Description: OpcUa Protocol Decoder. ** Description: OpcUa Protocol Decoder.
** **
** Author: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com> ** Author: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com>
** Last change by: $Author: gergap $ ** Last change by: $Author: gergap $
** **
******************************************************************************/ ******************************************************************************/
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
#include <gmodule.h> #include <gmodule.h>
#include <epan/packet.h> #include <epan/packet.h>
#include <epan/emem.h> #include <epan/emem.h>
#include <epan/dissectors/packet-tcp.h> #include <epan/dissectors/packet-tcp.h>
#include <epan/prefs.h> #include <epan/prefs.h>
#include "ua_transport_layer.h" #include "ua_transport_layer.h"
#include "ua_security_layer.h" #include "ua_security_layer.h"
#include "ua_application_layer.h" #include "ua_application_layer.h"
#include "opcua_complextypeparser.h" #include "opcua_complextypeparser.h"
#include "opcua_serviceparser.h" #include "opcua_serviceparser.h"
#include "opcua_enumparser.h" #include "opcua_enumparser.h"
#include "opcua_simpletypes.h" #include "opcua_simpletypes.h"
#include "opcua_hfindeces.h" #include "opcua_hfindeces.h"
/* forward reference */ /* forward reference */
void proto_register_opcua (void); void proto_register_opcua (void);
void proto_reg_handoff_opcua (void); void proto_reg_handoff_opcua (void);
static void dissect_opcua(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); static void dissect_opcua(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
static void dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); static void dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
/* declare parse function pointer */ /* declare parse function pointer */
typedef void (*FctParse)(proto_tree *tree, tvbuff_t *tvb, gint *pOffset); typedef void (*FctParse)(proto_tree *tree, tvbuff_t *tvb, gint *pOffset);
static int proto_opcua = -1; static int proto_opcua = -1;
/** Official IANA registered port for OPC UA Binary Protocol. */ /** Official IANA registered port for OPC UA Binary Protocol. */
static int global_opcua_port = 4840; static int global_opcua_port = 4840;
static dissector_handle_t opcua_handle; static dissector_handle_t opcua_handle;
/** subtree types */ /** subtree types */
gint ett_opcua_transport = -1; gint ett_opcua_transport = -1;
gint ett_opcua_extensionobject = -1; gint ett_opcua_extensionobject = -1;
gint ett_opcua_nodeid = -1; gint ett_opcua_nodeid = -1;
/** OpcUa Transport Message Types */ /** OpcUa Transport Message Types */
enum MessageType enum MessageType
{ {
MSG_HELLO = 0, MSG_HELLO = 0,
MSG_ACKNOWLEDGE, MSG_ACKNOWLEDGE,
MSG_DISCONNECT, MSG_DISCONNECT,
MSG_DATA_LAST_CHUNK, MSG_DATA_LAST_CHUNK,
MSG_DATA, MSG_DATA,
MSG_ABORT, MSG_ABORT,
MSG_ERROR, MSG_ERROR,
MSG_INVALID, MSG_INVALID,
MSG_UNKNOWN MSG_UNKNOWN
}; };
/** OpcUa Transport Message Type Names */ /** OpcUa Transport Message Type Names */
static char* g_szMessageTypes[] = static char* g_szMessageTypes[] =
{ {
"Hello message", "Hello message",
"Acknowledge message", "Acknowledge message",
"Disconnect message", "Disconnect message",
"Data message, last chunk in message.", "Data message, last chunk in message.",
"Data message, further chunks must follow.", "Data message, further chunks must follow.",
"Abort message", "Abort message",
"Error message", "Error message",
"Invalid message", "Invalid message",
"Unknown message" "Unknown message"
}; };
/** Setup protocol subtree array */ /** Setup protocol subtree array */
static gint *ett[] = static gint *ett[] =
{ {
&ett_opcua_transport, &ett_opcua_transport,
&ett_opcua_extensionobject, &ett_opcua_extensionobject,
&ett_opcua_nodeid, &ett_opcua_nodeid,
}; };
/** plugin entry functions. /** plugin entry functions.
* This registers the OpcUa protocol. * This registers the OpcUa protocol.
*/ */
void proto_register_opcua(void) void proto_register_opcua(void)
{ {
module_t *opcua_module; module_t *opcua_module;
if (proto_opcua == -1) if (proto_opcua == -1)
{ {
proto_opcua = proto_register_protocol( proto_opcua = proto_register_protocol(
"OpcUa Binary Protocol", /* name */ "OpcUa Binary Protocol", /* name */
"OpcUa", /* short name */ "OpcUa", /* short name */
"opcua" /* abbrev */ "opcua" /* abbrev */
); );
} }
opcua_module = prefs_register_protocol(proto_opcua, proto_reg_handoff_opcua); opcua_module = prefs_register_protocol(proto_opcua, proto_reg_handoff_opcua);
registerTransportLayerTypes(proto_opcua); registerTransportLayerTypes(proto_opcua);
registerSecurityLayerTypes(proto_opcua); registerSecurityLayerTypes(proto_opcua);
registerApplicationLayerTypes(proto_opcua); registerApplicationLayerTypes(proto_opcua);
registerSimpleTypes(proto_opcua); registerSimpleTypes(proto_opcua);
registerEnumTypes(proto_opcua); registerEnumTypes(proto_opcua);
registerComplexTypes(); registerComplexTypes();
registerServiceTypes(); registerServiceTypes();
registerFieldTypes(proto_opcua); registerFieldTypes(proto_opcua);
proto_register_subtree_array(ett, array_length(ett)); proto_register_subtree_array(ett, array_length(ett));
} }
/** Register sub protocol. /** Register sub protocol.
* For TCP port 4840. * For TCP port 4840.
*/ */
void proto_reg_handoff_opcua(void) void proto_reg_handoff_opcua(void)
{ {
static int Initialized=FALSE; static int Initialized=FALSE;
if (!Initialized) if (!Initialized)
{ {
opcua_handle = create_dissector_handle(dissect_opcua, proto_opcua); opcua_handle = create_dissector_handle(dissect_opcua, proto_opcua);
dissector_add("tcp.port", global_opcua_port, opcua_handle); dissector_add("tcp.port", global_opcua_port, opcua_handle);
} }
} }
/** header length that is needed to compute /** header length that is needed to compute
* the pdu length. * the pdu length.
* @see get_opcua_message_len * @see get_opcua_message_len
*/ */
#define FRAME_HEADER_LEN 8 #define FRAME_HEADER_LEN 8
/** returns the length of an OpcUa message. /** returns the length of an OpcUa message.
* This function reads the length information from * This function reads the length information from
* the transport header. * the transport header.
*/ */
static guint get_opcua_message_len(packet_info *pinfo, tvbuff_t *tvb, int offset) static guint get_opcua_message_len(packet_info *pinfo, tvbuff_t *tvb, int offset)
{ {
gint32 plen; gint32 plen;
/* the message length starts at offset 4 */ /* the message length starts at offset 4 */
plen = tvb_get_letohl(tvb, offset + 4); plen = tvb_get_letohl(tvb, offset + 4);
return plen; return plen;
} }
/** The main OpcUa dissector functions. /** The main OpcUa dissector functions.
* It uses tcp_dissect_pdus from packet-tcp.h * It uses tcp_dissect_pdus from packet-tcp.h
* to reassemble the TCP data. * to reassemble the TCP data.
*/ */
static void dissect_opcua(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) static void dissect_opcua(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{ {
tcp_dissect_pdus(tvb, pinfo, tree, TRUE, FRAME_HEADER_LEN, tcp_dissect_pdus(tvb, pinfo, tree, TRUE, FRAME_HEADER_LEN,
get_opcua_message_len, dissect_opcua_message); get_opcua_message_len, dissect_opcua_message);
} }
/** The OpcUa message dissector. /** The OpcUa message dissector.
* This method dissects full OpcUa messages. * This method dissects full OpcUa messages.
* It gets only called with reassembled data * It gets only called with reassembled data
* from tcp_dissect_pdus. * from tcp_dissect_pdus.
*/ */
static void dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) static void dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{ {
FctParse pfctParse = NULL; FctParse pfctParse = NULL;
enum MessageType msgtype = MSG_INVALID; enum MessageType msgtype = MSG_INVALID;
if (check_col(pinfo->cinfo, COL_PROTOCOL)) if (check_col(pinfo->cinfo, COL_PROTOCOL))
{ {
col_set_str(pinfo->cinfo, COL_PROTOCOL, "OpcUa"); col_set_str(pinfo->cinfo, COL_PROTOCOL, "OpcUa");
} }
/* parse message type */ /* parse message type */
if (tvb->real_data[0] == 'U' && tvb->real_data[1] == 'A') if (tvb->real_data[0] == 'U' && tvb->real_data[1] == 'A')
{ {
if (tvb->real_data[2] == 'T') if (tvb->real_data[2] == 'T')
{ {
switch(tvb->real_data[3]) switch(tvb->real_data[3])
{ {
case 'H': msgtype = MSG_HELLO; case 'H': msgtype = MSG_HELLO;
pfctParse = parseHello; pfctParse = parseHello;
break; break;
case 'A': msgtype = MSG_ACKNOWLEDGE; case 'A': msgtype = MSG_ACKNOWLEDGE;
pfctParse = parseAcknowledge; pfctParse = parseAcknowledge;
break; break;
case 'D': msgtype = MSG_DISCONNECT; case 'D': msgtype = MSG_DISCONNECT;
pfctParse = parseDisconnect; pfctParse = parseDisconnect;
break; break;
default: msgtype = MSG_INVALID; default: msgtype = MSG_INVALID;
break; break;
} }
} }
else if (tvb->real_data[2] == 'M') else if (tvb->real_data[2] == 'M')
{ {
switch(tvb->real_data[3]) switch(tvb->real_data[3])
{ {
case 'G': msgtype = MSG_DATA_LAST_CHUNK; case 'G': msgtype = MSG_DATA_LAST_CHUNK;
pfctParse = parseData; pfctParse = parseData;
break; break;
case 'C': msgtype = MSG_DATA; case 'C': msgtype = MSG_DATA;
pfctParse = parseData; pfctParse = parseData;
break; break;
case 'A': msgtype = MSG_ABORT; case 'A': msgtype = MSG_ABORT;
pfctParse = parseAbort; pfctParse = parseAbort;
break; break;
case 'E': msgtype = MSG_ERROR; case 'E': msgtype = MSG_ERROR;
pfctParse = parseError; pfctParse = parseError;
break; break;
default: msgtype = MSG_INVALID; default: msgtype = MSG_INVALID;
break; break;
} }
} }
} }
else else
{ {
msgtype = MSG_UNKNOWN; msgtype = MSG_UNKNOWN;
} }
/* Clear out stuff in the info column */ /* Clear out stuff in the info column */
if(check_col(pinfo->cinfo, COL_INFO)) if(check_col(pinfo->cinfo, COL_INFO))
{ {
col_set_str(pinfo->cinfo, COL_INFO, g_szMessageTypes[msgtype]); col_set_str(pinfo->cinfo, COL_INFO, g_szMessageTypes[msgtype]);
} }
if (tree && pfctParse) if (tree && pfctParse)
{ {
gint offset = 0; gint offset = 0;
/* we are being asked for details */ /* we are being asked for details */
proto_item *ti = NULL; proto_item *ti = NULL;
proto_tree *transport_tree = NULL; proto_tree *transport_tree = NULL;
ti = proto_tree_add_item(tree, proto_opcua, tvb, 0, -1, FALSE); ti = proto_tree_add_item(tree, proto_opcua, tvb, 0, -1, FALSE);
transport_tree = proto_item_add_subtree(ti, ett_opcua_transport); transport_tree = proto_item_add_subtree(ti, ett_opcua_transport);
/* call the transport message dissector */ /* call the transport message dissector */
(*pfctParse)(transport_tree, tvb, &offset); (*pfctParse)(transport_tree, tvb, &offset);
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -30,8 +30,8 @@
#include "opcua_enumparser.h" #include "opcua_enumparser.h"
/** NodeClass enum table */ /** NodeClass enum table */
static const value_string g_NodeClassTable[] = { static const value_string g_NodeClassTable[] = {
{ 0, "Node" }, { 0, "Node" },
{ 1, "Object" }, { 1, "Object" },
@ -41,118 +41,118 @@ static const value_string g_NodeClassTable[] = {
{ 16, "VariableType" }, { 16, "VariableType" },
{ 32, "ReferenceType" }, { 32, "ReferenceType" },
{ 64, "DataType" }, { 64, "DataType" },
{ 128, "View" }, { 128, "View" },
{ 0, NULL } { 0, NULL }
}; };
static int hf_opcua_NodeClass = -1; static int hf_opcua_NodeClass = -1;
void parseNodeClass(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseNodeClass(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
proto_tree_add_item(tree, hf_opcua_NodeClass, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_NodeClass, tvb, *pOffset, 4, TRUE); *pOffset+=4;
} }
/** IdType enum table */ /** IdType enum table */
static const value_string g_IdTypeTable[] = { static const value_string g_IdTypeTable[] = {
{ 0, "Numeric" }, { 0, "Numeric" },
{ 1, "String" }, { 1, "String" },
{ 2, "Uri" }, { 2, "Uri" },
{ 3, "Guid" }, { 3, "Guid" },
{ 4, "Opaque" }, { 4, "Opaque" },
{ 0, NULL } { 0, NULL }
}; };
static int hf_opcua_IdType = -1; static int hf_opcua_IdType = -1;
void parseIdType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseIdType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
proto_tree_add_item(tree, hf_opcua_IdType, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_IdType, tvb, *pOffset, 4, TRUE); *pOffset+=4;
} }
/** MessageSecurityMode enum table */ /** MessageSecurityMode enum table */
static const value_string g_MessageSecurityModeTable[] = { static const value_string g_MessageSecurityModeTable[] = {
{ 0, "None" }, { 0, "None" },
{ 1, "Sign" }, { 1, "Sign" },
{ 2, "SignAndEncrypt" }, { 2, "SignAndEncrypt" },
{ 0, NULL } { 0, NULL }
}; };
static int hf_opcua_MessageSecurityMode = -1; static int hf_opcua_MessageSecurityMode = -1;
void parseMessageSecurityMode(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseMessageSecurityMode(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
proto_tree_add_item(tree, hf_opcua_MessageSecurityMode, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_MessageSecurityMode, tvb, *pOffset, 4, TRUE); *pOffset+=4;
} }
/** UserTokenType enum table */ /** UserTokenType enum table */
static const value_string g_UserTokenTypeTable[] = { static const value_string g_UserTokenTypeTable[] = {
{ 0, "Default" }, { 0, "Default" },
{ 1, "UserName" }, { 1, "UserName" },
{ 2, "Certificate" }, { 2, "Certificate" },
{ 3, "IssuedToken" }, { 3, "IssuedToken" },
{ 0, NULL } { 0, NULL }
}; };
static int hf_opcua_UserTokenType = -1; static int hf_opcua_UserTokenType = -1;
void parseUserTokenType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseUserTokenType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
proto_tree_add_item(tree, hf_opcua_UserTokenType, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_UserTokenType, tvb, *pOffset, 4, TRUE); *pOffset+=4;
} }
/** ServerDescriptionType enum table */ /** ServerDescriptionType enum table */
static const value_string g_ServerDescriptionTypeTable[] = { static const value_string g_ServerDescriptionTypeTable[] = {
{ 0, "Standard" }, { 0, "Standard" },
{ 1, "Discovery" }, { 1, "Discovery" },
{ 0, NULL } { 0, NULL }
}; };
static int hf_opcua_ServerDescriptionType = -1; static int hf_opcua_ServerDescriptionType = -1;
void parseServerDescriptionType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseServerDescriptionType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
proto_tree_add_item(tree, hf_opcua_ServerDescriptionType, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_ServerDescriptionType, tvb, *pOffset, 4, TRUE); *pOffset+=4;
} }
/** SecurityTokenRequestType enum table */ /** SecurityTokenRequestType enum table */
static const value_string g_SecurityTokenRequestTypeTable[] = { static const value_string g_SecurityTokenRequestTypeTable[] = {
{ 0, "Issue" }, { 0, "Issue" },
{ 1, "Renew" }, { 1, "Renew" },
{ 0, NULL } { 0, NULL }
}; };
static int hf_opcua_SecurityTokenRequestType = -1; static int hf_opcua_SecurityTokenRequestType = -1;
void parseSecurityTokenRequestType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseSecurityTokenRequestType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
proto_tree_add_item(tree, hf_opcua_SecurityTokenRequestType, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_SecurityTokenRequestType, tvb, *pOffset, 4, TRUE); *pOffset+=4;
} }
/** ComplianceLevel enum table */ /** ComplianceLevel enum table */
static const value_string g_ComplianceLevelTable[] = { static const value_string g_ComplianceLevelTable[] = {
{ 0, "Untested" }, { 0, "Untested" },
{ 1, "Partial" }, { 1, "Partial" },
{ 2, "SelfTested" }, { 2, "SelfTested" },
{ 3, "Certified" }, { 3, "Certified" },
{ 0, NULL } { 0, NULL }
}; };
static int hf_opcua_ComplianceLevel = -1; static int hf_opcua_ComplianceLevel = -1;
void parseComplianceLevel(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseComplianceLevel(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
proto_tree_add_item(tree, hf_opcua_ComplianceLevel, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_ComplianceLevel, tvb, *pOffset, 4, TRUE); *pOffset+=4;
} }
/** RedundancySupport enum table */ /** RedundancySupport enum table */
static const value_string g_RedundancySupportTable[] = { static const value_string g_RedundancySupportTable[] = {
{ 1, "None" }, { 1, "None" },
{ 2, "Cold" }, { 2, "Cold" },
{ 3, "Warm" }, { 3, "Warm" },
{ 4, "Hot" }, { 4, "Hot" },
{ 0, NULL } { 0, NULL }
}; };
static int hf_opcua_RedundancySupport = -1; static int hf_opcua_RedundancySupport = -1;
void parseRedundancySupport(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseRedundancySupport(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
proto_tree_add_item(tree, hf_opcua_RedundancySupport, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_RedundancySupport, tvb, *pOffset, 4, TRUE); *pOffset+=4;
} }
/** ServerState enum table */ /** ServerState enum table */
static const value_string g_ServerStateTable[] = { static const value_string g_ServerStateTable[] = {
{ 1, "Running" }, { 1, "Running" },
{ 2, "Failed" }, { 2, "Failed" },
@ -161,31 +161,31 @@ static const value_string g_ServerStateTable[] = {
{ 5, "Shutdown" }, { 5, "Shutdown" },
{ 6, "Test" }, { 6, "Test" },
{ 7, "CommunicationFault" }, { 7, "CommunicationFault" },
{ 8, "Unknown" }, { 8, "Unknown" },
{ 0, NULL } { 0, NULL }
}; };
static int hf_opcua_ServerState = -1; static int hf_opcua_ServerState = -1;
void parseServerState(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseServerState(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
proto_tree_add_item(tree, hf_opcua_ServerState, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_ServerState, tvb, *pOffset, 4, TRUE); *pOffset+=4;
} }
/** ExceptionDeviationType enum table */ /** ExceptionDeviationType enum table */
static const value_string g_ExceptionDeviationTypeTable[] = { static const value_string g_ExceptionDeviationTypeTable[] = {
{ 1, "AbsoluteValue" }, { 1, "AbsoluteValue" },
{ 2, "PercentOfRange" }, { 2, "PercentOfRange" },
{ 3, "PercentOfValue" }, { 3, "PercentOfValue" },
{ 0, NULL } { 0, NULL }
}; };
static int hf_opcua_ExceptionDeviationType = -1; static int hf_opcua_ExceptionDeviationType = -1;
void parseExceptionDeviationType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseExceptionDeviationType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
proto_tree_add_item(tree, hf_opcua_ExceptionDeviationType, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_ExceptionDeviationType, tvb, *pOffset, 4, TRUE); *pOffset+=4;
} }
/** ColorsDataType enum table */ /** ColorsDataType enum table */
static const value_string g_ColorsDataTypeTable[] = { static const value_string g_ColorsDataTypeTable[] = {
{ 1, "Red" }, { 1, "Red" },
{ 2, "Orange" }, { 2, "Orange" },
@ -193,17 +193,17 @@ static const value_string g_ColorsDataTypeTable[] = {
{ 4, "Green" }, { 4, "Green" },
{ 5, "Blue" }, { 5, "Blue" },
{ 6, "DarkBlue" }, { 6, "DarkBlue" },
{ 7, "Violet" }, { 7, "Violet" },
{ 0, NULL } { 0, NULL }
}; };
static int hf_opcua_ColorsDataType = -1; static int hf_opcua_ColorsDataType = -1;
void parseColorsDataType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseColorsDataType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
proto_tree_add_item(tree, hf_opcua_ColorsDataType, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_ColorsDataType, tvb, *pOffset, 4, TRUE); *pOffset+=4;
} }
/** DiagnosticsMasks enum table */ /** DiagnosticsMasks enum table */
static const value_string g_DiagnosticsMasksTable[] = { static const value_string g_DiagnosticsMasksTable[] = {
{ 1, "ServiceSymbolicId" }, { 1, "ServiceSymbolicId" },
{ 2, "ServiceLocalizedText" }, { 2, "ServiceLocalizedText" },
@ -228,45 +228,45 @@ static const value_string g_DiagnosticsMasksTable[] = {
{ 528, "InnerDiagnostics" }, { 528, "InnerDiagnostics" },
{ 99, "SymbolicIdAndText" }, { 99, "SymbolicIdAndText" },
{ 239, "NoInnerStatus" }, { 239, "NoInnerStatus" },
{ 1023, "All" }, { 1023, "All" },
{ 0, NULL } { 0, NULL }
}; };
static int hf_opcua_DiagnosticsMasks = -1; static int hf_opcua_DiagnosticsMasks = -1;
void parseDiagnosticsMasks(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseDiagnosticsMasks(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
proto_tree_add_item(tree, hf_opcua_DiagnosticsMasks, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_DiagnosticsMasks, tvb, *pOffset, 4, TRUE); *pOffset+=4;
} }
/** EnumeratedTestType enum table */ /** EnumeratedTestType enum table */
static const value_string g_EnumeratedTestTypeTable[] = { static const value_string g_EnumeratedTestTypeTable[] = {
{ 1, "Red" }, { 1, "Red" },
{ 4, "Yellow" }, { 4, "Yellow" },
{ 5, "Green" }, { 5, "Green" },
{ 0, NULL } { 0, NULL }
}; };
static int hf_opcua_EnumeratedTestType = -1; static int hf_opcua_EnumeratedTestType = -1;
void parseEnumeratedTestType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseEnumeratedTestType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
proto_tree_add_item(tree, hf_opcua_EnumeratedTestType, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_EnumeratedTestType, tvb, *pOffset, 4, TRUE); *pOffset+=4;
} }
/** BrowseDirection enum table */ /** BrowseDirection enum table */
static const value_string g_BrowseDirectionTable[] = { static const value_string g_BrowseDirectionTable[] = {
{ 1, "Forward" }, { 1, "Forward" },
{ 2, "Inverse" }, { 2, "Inverse" },
{ 3, "Both" }, { 3, "Both" },
{ 0, NULL } { 0, NULL }
}; };
static int hf_opcua_BrowseDirection = -1; static int hf_opcua_BrowseDirection = -1;
void parseBrowseDirection(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseBrowseDirection(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
proto_tree_add_item(tree, hf_opcua_BrowseDirection, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_BrowseDirection, tvb, *pOffset, 4, TRUE); *pOffset+=4;
} }
/** FilterOperator enum table */ /** FilterOperator enum table */
static const value_string g_FilterOperatorTable[] = { static const value_string g_FilterOperatorTable[] = {
{ 1, "Equals" }, { 1, "Equals" },
{ 2, "IsNull" }, { 2, "IsNull" },
@ -282,132 +282,132 @@ static const value_string g_FilterOperatorTable[] = {
{ 12, "Or" }, { 12, "Or" },
{ 13, "InView" }, { 13, "InView" },
{ 14, "OfType" }, { 14, "OfType" },
{ 15, "RelatedTo" }, { 15, "RelatedTo" },
{ 0, NULL } { 0, NULL }
}; };
static int hf_opcua_FilterOperator = -1; static int hf_opcua_FilterOperator = -1;
void parseFilterOperator(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseFilterOperator(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
proto_tree_add_item(tree, hf_opcua_FilterOperator, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_FilterOperator, tvb, *pOffset, 4, TRUE); *pOffset+=4;
} }
/** TimestampsToReturn enum table */ /** TimestampsToReturn enum table */
static const value_string g_TimestampsToReturnTable[] = { static const value_string g_TimestampsToReturnTable[] = {
{ 1, "Source" }, { 1, "Source" },
{ 2, "Server" }, { 2, "Server" },
{ 3, "Both" }, { 3, "Both" },
{ 4, "Neither" }, { 4, "Neither" },
{ 0, NULL } { 0, NULL }
}; };
static int hf_opcua_TimestampsToReturn = -1; static int hf_opcua_TimestampsToReturn = -1;
void parseTimestampsToReturn(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseTimestampsToReturn(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
proto_tree_add_item(tree, hf_opcua_TimestampsToReturn, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_TimestampsToReturn, tvb, *pOffset, 4, TRUE); *pOffset+=4;
} }
/** MonitoringMode enum table */ /** MonitoringMode enum table */
static const value_string g_MonitoringModeTable[] = { static const value_string g_MonitoringModeTable[] = {
{ 0, "Disabled" }, { 0, "Disabled" },
{ 1, "Sampling" }, { 1, "Sampling" },
{ 2, "Reporting" }, { 2, "Reporting" },
{ 0, NULL } { 0, NULL }
}; };
static int hf_opcua_MonitoringMode = -1; static int hf_opcua_MonitoringMode = -1;
void parseMonitoringMode(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseMonitoringMode(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
proto_tree_add_item(tree, hf_opcua_MonitoringMode, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_MonitoringMode, tvb, *pOffset, 4, TRUE); *pOffset+=4;
} }
/** DataChangeTrigger enum table */ /** DataChangeTrigger enum table */
static const value_string g_DataChangeTriggerTable[] = { static const value_string g_DataChangeTriggerTable[] = {
{ 0, "Status" }, { 0, "Status" },
{ 1, "StatusValue" }, { 1, "StatusValue" },
{ 2, "StatusValueTimestamp" }, { 2, "StatusValueTimestamp" },
{ 0, NULL } { 0, NULL }
}; };
static int hf_opcua_DataChangeTrigger = -1; static int hf_opcua_DataChangeTrigger = -1;
void parseDataChangeTrigger(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseDataChangeTrigger(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
proto_tree_add_item(tree, hf_opcua_DataChangeTrigger, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_DataChangeTrigger, tvb, *pOffset, 4, TRUE); *pOffset+=4;
} }
/** DeadbandType enum table */ /** DeadbandType enum table */
static const value_string g_DeadbandTypeTable[] = { static const value_string g_DeadbandTypeTable[] = {
{ 0, "None" }, { 0, "None" },
{ 1, "Absolute" }, { 1, "Absolute" },
{ 2, "Percentage" }, { 2, "Percentage" },
{ 0, NULL } { 0, NULL }
}; };
static int hf_opcua_DeadbandType = -1; static int hf_opcua_DeadbandType = -1;
void parseDeadbandType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseDeadbandType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
proto_tree_add_item(tree, hf_opcua_DeadbandType, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_DeadbandType, tvb, *pOffset, 4, TRUE); *pOffset+=4;
} }
/** header field definitions */ /** header field definitions */
static hf_register_info hf[] = static hf_register_info hf[] =
{ {
{ &hf_opcua_NodeClass, { &hf_opcua_NodeClass,
{ "NodeClass", "", FT_UINT32, BASE_HEX, VALS(g_NodeClassTable), 0x0, "", HFILL } { "NodeClass", "", FT_UINT32, BASE_HEX, VALS(g_NodeClassTable), 0x0, "", HFILL }
}, },
{ &hf_opcua_IdType, { &hf_opcua_IdType,
{ "IdType", "", FT_UINT32, BASE_HEX, VALS(g_IdTypeTable), 0x0, "", HFILL } { "IdType", "", FT_UINT32, BASE_HEX, VALS(g_IdTypeTable), 0x0, "", HFILL }
}, },
{ &hf_opcua_MessageSecurityMode, { &hf_opcua_MessageSecurityMode,
{ "MessageSecurityMode", "", FT_UINT32, BASE_HEX, VALS(g_MessageSecurityModeTable), 0x0, "", HFILL } { "MessageSecurityMode", "", FT_UINT32, BASE_HEX, VALS(g_MessageSecurityModeTable), 0x0, "", HFILL }
}, },
{ &hf_opcua_UserTokenType, { &hf_opcua_UserTokenType,
{ "UserTokenType", "", FT_UINT32, BASE_HEX, VALS(g_UserTokenTypeTable), 0x0, "", HFILL } { "UserTokenType", "", FT_UINT32, BASE_HEX, VALS(g_UserTokenTypeTable), 0x0, "", HFILL }
}, },
{ &hf_opcua_ServerDescriptionType, { &hf_opcua_ServerDescriptionType,
{ "ServerDescriptionType", "", FT_UINT32, BASE_HEX, VALS(g_ServerDescriptionTypeTable), 0x0, "", HFILL } { "ServerDescriptionType", "", FT_UINT32, BASE_HEX, VALS(g_ServerDescriptionTypeTable), 0x0, "", HFILL }
}, },
{ &hf_opcua_SecurityTokenRequestType, { &hf_opcua_SecurityTokenRequestType,
{ "SecurityTokenRequestType", "", FT_UINT32, BASE_HEX, VALS(g_SecurityTokenRequestTypeTable), 0x0, "", HFILL } { "SecurityTokenRequestType", "", FT_UINT32, BASE_HEX, VALS(g_SecurityTokenRequestTypeTable), 0x0, "", HFILL }
}, },
{ &hf_opcua_ComplianceLevel, { &hf_opcua_ComplianceLevel,
{ "ComplianceLevel", "", FT_UINT32, BASE_HEX, VALS(g_ComplianceLevelTable), 0x0, "", HFILL } { "ComplianceLevel", "", FT_UINT32, BASE_HEX, VALS(g_ComplianceLevelTable), 0x0, "", HFILL }
}, },
{ &hf_opcua_RedundancySupport, { &hf_opcua_RedundancySupport,
{ "RedundancySupport", "", FT_UINT32, BASE_HEX, VALS(g_RedundancySupportTable), 0x0, "", HFILL } { "RedundancySupport", "", FT_UINT32, BASE_HEX, VALS(g_RedundancySupportTable), 0x0, "", HFILL }
}, },
{ &hf_opcua_ServerState, { &hf_opcua_ServerState,
{ "ServerState", "", FT_UINT32, BASE_HEX, VALS(g_ServerStateTable), 0x0, "", HFILL } { "ServerState", "", FT_UINT32, BASE_HEX, VALS(g_ServerStateTable), 0x0, "", HFILL }
}, },
{ &hf_opcua_ExceptionDeviationType, { &hf_opcua_ExceptionDeviationType,
{ "ExceptionDeviationType", "", FT_UINT32, BASE_HEX, VALS(g_ExceptionDeviationTypeTable), 0x0, "", HFILL } { "ExceptionDeviationType", "", FT_UINT32, BASE_HEX, VALS(g_ExceptionDeviationTypeTable), 0x0, "", HFILL }
}, },
{ &hf_opcua_ColorsDataType, { &hf_opcua_ColorsDataType,
{ "ColorsDataType", "", FT_UINT32, BASE_HEX, VALS(g_ColorsDataTypeTable), 0x0, "", HFILL } { "ColorsDataType", "", FT_UINT32, BASE_HEX, VALS(g_ColorsDataTypeTable), 0x0, "", HFILL }
}, },
{ &hf_opcua_DiagnosticsMasks, { &hf_opcua_DiagnosticsMasks,
{ "DiagnosticsMasks", "", FT_UINT32, BASE_HEX, VALS(g_DiagnosticsMasksTable), 0x0, "", HFILL } { "DiagnosticsMasks", "", FT_UINT32, BASE_HEX, VALS(g_DiagnosticsMasksTable), 0x0, "", HFILL }
}, },
{ &hf_opcua_EnumeratedTestType, { &hf_opcua_EnumeratedTestType,
{ "EnumeratedTestType", "", FT_UINT32, BASE_HEX, VALS(g_EnumeratedTestTypeTable), 0x0, "", HFILL } { "EnumeratedTestType", "", FT_UINT32, BASE_HEX, VALS(g_EnumeratedTestTypeTable), 0x0, "", HFILL }
}, },
{ &hf_opcua_BrowseDirection, { &hf_opcua_BrowseDirection,
{ "BrowseDirection", "", FT_UINT32, BASE_HEX, VALS(g_BrowseDirectionTable), 0x0, "", HFILL } { "BrowseDirection", "", FT_UINT32, BASE_HEX, VALS(g_BrowseDirectionTable), 0x0, "", HFILL }
}, },
{ &hf_opcua_FilterOperator, { &hf_opcua_FilterOperator,
{ "FilterOperator", "", FT_UINT32, BASE_HEX, VALS(g_FilterOperatorTable), 0x0, "", HFILL } { "FilterOperator", "", FT_UINT32, BASE_HEX, VALS(g_FilterOperatorTable), 0x0, "", HFILL }
}, },
{ &hf_opcua_TimestampsToReturn, { &hf_opcua_TimestampsToReturn,
{ "TimestampsToReturn", "", FT_UINT32, BASE_HEX, VALS(g_TimestampsToReturnTable), 0x0, "", HFILL } { "TimestampsToReturn", "", FT_UINT32, BASE_HEX, VALS(g_TimestampsToReturnTable), 0x0, "", HFILL }
}, },
{ &hf_opcua_MonitoringMode, { &hf_opcua_MonitoringMode,
{ "MonitoringMode", "", FT_UINT32, BASE_HEX, VALS(g_MonitoringModeTable), 0x0, "", HFILL } { "MonitoringMode", "", FT_UINT32, BASE_HEX, VALS(g_MonitoringModeTable), 0x0, "", HFILL }
}, },
{ &hf_opcua_DataChangeTrigger, { &hf_opcua_DataChangeTrigger,
{ "DataChangeTrigger", "", FT_UINT32, BASE_HEX, VALS(g_DataChangeTriggerTable), 0x0, "", HFILL } { "DataChangeTrigger", "", FT_UINT32, BASE_HEX, VALS(g_DataChangeTriggerTable), 0x0, "", HFILL }
}, },
{ &hf_opcua_DeadbandType, { &hf_opcua_DeadbandType,
{ "DeadbandType", "", FT_UINT32, BASE_HEX, VALS(g_DeadbandTypeTable), 0x0, "", HFILL } { "DeadbandType", "", FT_UINT32, BASE_HEX, VALS(g_DeadbandTypeTable), 0x0, "", HFILL }
} }
}; };

View File

@ -1,32 +1,32 @@
/****************************************************************************** /******************************************************************************
** $Id$ ** $Id$
** **
** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved. ** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved.
** Web: http://www.ascolab.com ** Web: http://www.ascolab.com
** **
** This program is free software; you can redistribute it and/or ** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License ** modify it under the terms of the GNU General Public License
** as published by the Free Software Foundation; either version 2 ** as published by the Free Software Foundation; either version 2
** of the License, or (at your option) any later version. ** of the License, or (at your option) any later version.
** **
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
** **
** Project: OpcUa Wireshark Plugin ** Project: OpcUa Wireshark Plugin
** **
** Description: This file contains protocol field information. ** Description: This file contains protocol field information.
** **
** This file was autogenerated on 8.5.2007 18:53:26. ** This file was autogenerated on 8.5.2007 18:53:26.
** DON'T MODIFY THIS FILE! ** DON'T MODIFY THIS FILE!
** **
******************************************************************************/ ******************************************************************************/
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
#include <gmodule.h> #include <gmodule.h>
#include <epan/packet.h> #include <epan/packet.h>
int hf_opcua_TestId = -1; int hf_opcua_TestId = -1;
int hf_opcua_Iteration = -1; int hf_opcua_Iteration = -1;
@ -301,11 +301,11 @@ int hf_opcua_RevisedSamplingInterval = -1;
int hf_opcua_RevisedQueueSize = -1; int hf_opcua_RevisedQueueSize = -1;
int hf_opcua_MonitorItemId = -1; int hf_opcua_MonitorItemId = -1;
int hf_opcua_PublishTime = -1; int hf_opcua_PublishTime = -1;
int hf_opcua_AvailableSequenceNumbersRanges = -1; int hf_opcua_AvailableSequenceNumbersRanges = -1;
/** header field definitions */ /** header field definitions */
static hf_register_info hf[] = static hf_register_info hf[] =
{ {
{ &hf_opcua_TestId, { "TestId", "", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } }, { &hf_opcua_TestId, { "TestId", "", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_opcua_Iteration, { "Iteration", "", FT_INT32, BASE_DEC, NULL, 0x0, "", HFILL } }, { &hf_opcua_Iteration, { "Iteration", "", FT_INT32, BASE_DEC, NULL, 0x0, "", HFILL } },
@ -580,11 +580,11 @@ static hf_register_info hf[] =
{ &hf_opcua_RevisedQueueSize, { "RevisedQueueSize", "", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } }, { &hf_opcua_RevisedQueueSize, { "RevisedQueueSize", "", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_opcua_MonitorItemId, { "MonitorItemId", "", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } }, { &hf_opcua_MonitorItemId, { "MonitorItemId", "", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_opcua_PublishTime, { "PublishTime", "", FT_ABSOLUTE_TIME, BASE_NONE, NULL, 0x0, "", HFILL } }, { &hf_opcua_PublishTime, { "PublishTime", "", FT_ABSOLUTE_TIME, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_opcua_AvailableSequenceNumbersRanges, { "AvailableSequenceNumbersRanges", "", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL } } { &hf_opcua_AvailableSequenceNumbersRanges, { "AvailableSequenceNumbersRanges", "", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL } }
}; };
/** Register field types. */ /** Register field types. */
void registerFieldTypes(int proto) void registerFieldTypes(int proto)
{ {
proto_register_field_array(proto, hf, array_length(hf)); proto_register_field_array(proto, hf, array_length(hf));
} }

View File

@ -1,32 +1,32 @@
/****************************************************************************** /******************************************************************************
** $Id$ ** $Id$
** **
** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved. ** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved.
** Web: http://www.ascolab.com ** Web: http://www.ascolab.com
** **
** This program is free software; you can redistribute it and/or ** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License ** modify it under the terms of the GNU General Public License
** as published by the Free Software Foundation; either version 2 ** as published by the Free Software Foundation; either version 2
** of the License, or (at your option) any later version. ** of the License, or (at your option) any later version.
** **
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
** **
** Project: OpcUa Wireshark Plugin ** Project: OpcUa Wireshark Plugin
** **
** Description: This file contains protocol field handles. ** Description: This file contains protocol field handles.
** **
** This file was autogenerated on 8.5.2007 18:53:26. ** This file was autogenerated on 8.5.2007 18:53:26.
** DON'T MODIFY THIS FILE! ** DON'T MODIFY THIS FILE!
** **
******************************************************************************/ ******************************************************************************/
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
#include <gmodule.h> #include <gmodule.h>
#include <epan/packet.h> #include <epan/packet.h>
extern int hf_opcua_TestId; extern int hf_opcua_TestId;
extern int hf_opcua_Iteration; extern int hf_opcua_Iteration;
@ -301,7 +301,7 @@ extern int hf_opcua_RevisedSamplingInterval;
extern int hf_opcua_RevisedQueueSize; extern int hf_opcua_RevisedQueueSize;
extern int hf_opcua_MonitorItemId; extern int hf_opcua_MonitorItemId;
extern int hf_opcua_PublishTime; extern int hf_opcua_PublishTime;
extern int hf_opcua_AvailableSequenceNumbersRanges; extern int hf_opcua_AvailableSequenceNumbersRanges;
/** Register field types. */ /** Register field types. */
void registerFieldTypes(int proto); void registerFieldTypes(int proto);

View File

@ -1,44 +1,44 @@
/****************************************************************************** /******************************************************************************
** $Id$ ** $Id$
** **
** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved. ** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved.
** Web: http://www.ascolab.com ** Web: http://www.ascolab.com
** **
** This program is free software; you can redistribute it and/or ** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License ** modify it under the terms of the GNU General Public License
** as published by the Free Software Foundation; either version 2 ** as published by the Free Software Foundation; either version 2
** of the License, or (at your option) any later version. ** of the License, or (at your option) any later version.
** **
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
** **
** Project: OpcUa Wireshark Plugin ** Project: OpcUa Wireshark Plugin
** **
** Description: Parser type definitions. ** Description: Parser type definitions.
** **
** This file was autogenerated on 8.5.2007 18:53:26. ** This file was autogenerated on 8.5.2007 18:53:26.
** DON'T MODIFY THIS FILE! ** DON'T MODIFY THIS FILE!
** **
******************************************************************************/ ******************************************************************************/
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
#include <gmodule.h> #include <gmodule.h>
#include <epan/packet.h> #include <epan/packet.h>
/* declare service parser function prototype */ /* declare service parser function prototype */
typedef void (*fctServiceParser)(proto_tree *tree, tvbuff_t *tvb, gint *pOffset); typedef void (*fctServiceParser)(proto_tree *tree, tvbuff_t *tvb, gint *pOffset);
/* declare enum parser function prototype */ /* declare enum parser function prototype */
typedef void (*fctEnumParser)(proto_tree *tree, tvbuff_t *tvb, gint *pOffset); typedef void (*fctEnumParser)(proto_tree *tree, tvbuff_t *tvb, gint *pOffset);
/* declare type parser function prototype */ /* declare type parser function prototype */
typedef void (*fctComplexTypeParser)(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldName); typedef void (*fctComplexTypeParser)(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldName);
/* declare type parser function prototype */ /* declare type parser function prototype */
typedef void (*fctSimpleTypeParser)(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex); typedef void (*fctSimpleTypeParser)(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex);
typedef struct _ParserEntry typedef struct _ParserEntry
{ {
int iRequestId; int iRequestId;
fctServiceParser pParser; fctServiceParser pParser;
} ParserEntry; } ParserEntry;

File diff suppressed because it is too large Load Diff

View File

@ -1,36 +1,36 @@
/****************************************************************************** /******************************************************************************
** $Id$ ** $Id$
** **
** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved. ** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved.
** Web: http://www.ascolab.com ** Web: http://www.ascolab.com
** **
** This program is free software; you can redistribute it and/or ** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License ** modify it under the terms of the GNU General Public License
** as published by the Free Software Foundation; either version 2 ** as published by the Free Software Foundation; either version 2
** of the License, or (at your option) any later version. ** of the License, or (at your option) any later version.
** **
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
** **
** Project: OpcUa Wireshark Plugin ** Project: OpcUa Wireshark Plugin
** **
** Description: Service table and service dispatcher. ** Description: Service table and service dispatcher.
** **
** This file was autogenerated on 8.5.2007 18:53:26. ** This file was autogenerated on 8.5.2007 18:53:26.
** DON'T MODIFY THIS FILE! ** DON'T MODIFY THIS FILE!
** **
******************************************************************************/ ******************************************************************************/
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
#include <gmodule.h> #include <gmodule.h>
#include <epan/packet.h> #include <epan/packet.h>
#include "opcua_identifiers.h" #include "opcua_identifiers.h"
#include "opcua_serviceparser.h" #include "opcua_serviceparser.h"
ParserEntry g_arParserTable[] = { ParserEntry g_arParserTable[] = {
{ 1358, parseTestStackRequest }, { 1358, parseTestStackRequest },
{ 1363, parseTestStackResponse }, { 1363, parseTestStackResponse },
{ 1368, parseTestStackExRequest }, { 1368, parseTestStackExRequest },
@ -107,11 +107,11 @@ ParserEntry g_arParserTable[] = {
{ 2080, parseTransferSubscriptionsResponse }, { 2080, parseTransferSubscriptionsResponse },
{ 2085, parseDeleteSubscriptionsRequest }, { 2085, parseDeleteSubscriptionsRequest },
{ 2090, parseDeleteSubscriptionsResponse } { 2090, parseDeleteSubscriptionsResponse }
}; };
const int g_NumServices = sizeof(g_arParserTable) / sizeof(ParserEntry); const int g_NumServices = sizeof(g_arParserTable) / sizeof(ParserEntry);
/** Service type table */ /** Service type table */
const value_string g_requesttypes[] = { const value_string g_requesttypes[] = {
{ 1358, "TestStackRequest" }, { 1358, "TestStackRequest" },
{ 1363, "TestStackResponse" }, { 1363, "TestStackResponse" },
@ -188,22 +188,22 @@ const value_string g_requesttypes[] = {
{ 2075, "TransferSubscriptionsRequest" }, { 2075, "TransferSubscriptionsRequest" },
{ 2080, "TransferSubscriptionsResponse" }, { 2080, "TransferSubscriptionsResponse" },
{ 2085, "DeleteSubscriptionsRequest" }, { 2085, "DeleteSubscriptionsRequest" },
{ 2090, "DeleteSubscriptionsResponse" }, { 2090, "DeleteSubscriptionsResponse" },
{ 0, NULL } { 0, NULL }
}; };
/** Dispatch all services to a special parser function. */ /** Dispatch all services to a special parser function. */
void dispatchService(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int ServiceId) void dispatchService(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int ServiceId)
{ {
int index = 0; int index = 0;
while (index < g_NumServices) while (index < g_NumServices)
{ {
if (g_arParserTable[index].iRequestId == ServiceId) if (g_arParserTable[index].iRequestId == ServiceId)
{ {
(*g_arParserTable[index].pParser)(tree, tvb, pOffset); (*g_arParserTable[index].pParser)(tree, tvb, pOffset);
break; break;
} }
index++; index++;
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,56 +1,56 @@
/****************************************************************************** /******************************************************************************
** $Id: opcua_simpletypes.h,v 1.1 2007/02/08 11:26:55 gergap Exp $ ** $Id$
** **
** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved. ** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved.
** Web: http://www.ascolab.com ** Web: http://www.ascolab.com
** **
** This program is free software; you can redistribute it and/or ** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License ** modify it under the terms of the GNU General Public License
** as published by the Free Software Foundation; either version 2 ** as published by the Free Software Foundation; either version 2
** of the License, or (at your option) any later version. ** of the License, or (at your option) any later version.
** **
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
** **
** Project: OpcUa Wireshark Plugin ** Project: OpcUa Wireshark Plugin
** **
** Description: Implementation of OpcUa built-in type parsers. ** Description: Implementation of OpcUa built-in type parsers.
** This contains all the simple types and some complex types. ** This contains all the simple types and some complex types.
** **
** Author: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com> ** Author: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com>
** Last change by: $Author: gergap $ ** Last change by: $Author: gergap $
** **
******************************************************************************/ ******************************************************************************/
#include "opcua_identifiers.h" #include "opcua_identifiers.h"
/* simple types */ /* simple types */
void parseBoolean(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex); void parseBoolean(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex);
void parseByte(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex); void parseByte(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex);
void parseSByte(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex); void parseSByte(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex);
void parseUInt16(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex); void parseUInt16(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex);
void parseInt16(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex); void parseInt16(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex);
void parseUInt32(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex); void parseUInt32(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex);
void parseInt32(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex); void parseInt32(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex);
void parseUInt64(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex); void parseUInt64(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex);
void parseInt64(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex); void parseInt64(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex);
void parseString(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex); void parseString(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex);
void parseGuid(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex); void parseGuid(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex);
void parseByteString(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex); void parseByteString(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex);
void parseXmlElement(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex); void parseXmlElement(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex);
void parseFloat(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex); void parseFloat(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex);
void parseDouble(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex); void parseDouble(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex);
void parseDateTime(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex); void parseDateTime(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex);
void parseStatusCode(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex); void parseStatusCode(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex);
/* complex types */ /* complex types */
void parseLocalizedText(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldName); void parseLocalizedText(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldName);
void parseNodeId(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldName); void parseNodeId(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldName);
void parseDiagnosticInfo(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldName); void parseDiagnosticInfo(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldName);
void parseExtensionObject(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldName); void parseExtensionObject(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldName);
void parseQualifiedName(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldName); void parseQualifiedName(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldName);
void parseDataValue(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldName); void parseDataValue(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldName);
void parseVariant(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldName); void parseVariant(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldName);
void parseExpandedNodeId(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldName); void parseExpandedNodeId(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldName);
void parseArraySimple(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex, fctSimpleTypeParser pParserFunction); void parseArraySimple(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int hfIndex, fctSimpleTypeParser pParserFunction);
void parseArrayEnum(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, fctEnumParser pParserFunction); void parseArrayEnum(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, fctEnumParser pParserFunction);
void parseArrayComplex(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldName, fctComplexTypeParser pParserFunction); void parseArrayComplex(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldName, fctComplexTypeParser pParserFunction);
void registerSimpleTypes(int proto); void registerSimpleTypes(int proto);

View File

@ -1,122 +1,122 @@
/****************************************************************************** /******************************************************************************
** $Id: ua_application_layer.c,v 1.3 2007/02/08 11:31:56 gergap Exp $ ** $Id$
** **
** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved. ** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved.
** Web: http://www.ascolab.com ** Web: http://www.ascolab.com
** **
** This program is free software; you can redistribute it and/or ** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License ** modify it under the terms of the GNU General Public License
** as published by the Free Software Foundation; either version 2 ** as published by the Free Software Foundation; either version 2
** of the License, or (at your option) any later version. ** of the License, or (at your option) any later version.
** **
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
** **
** Project: OpcUa Wireshark Plugin ** Project: OpcUa Wireshark Plugin
** **
** Description: OpcUa Application Layer Decoder. ** Description: OpcUa Application Layer Decoder.
** **
** Author: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com> ** Author: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com>
** Last change by: $Author: gergap $ ** Last change by: $Author: gergap $
** **
******************************************************************************/ ******************************************************************************/
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
#include <gmodule.h> #include <gmodule.h>
#include <epan/packet.h> #include <epan/packet.h>
#include "opcua_simpletypes.h" #include "opcua_simpletypes.h"
/** NodeId encoding mask table */ /** NodeId encoding mask table */
static const value_string g_nodeidmasks[] = { static const value_string g_nodeidmasks[] = {
{ 0, "Two byte encoded Numeric" }, { 0, "Two byte encoded Numeric" },
{ 1, "Four byte encoded Numeric" }, { 1, "Four byte encoded Numeric" },
{ 2, "Numeric of arbitrary length" }, { 2, "Numeric of arbitrary length" },
{ 3, "String" }, { 3, "String" },
{ 4, "URI" }, { 4, "URI" },
{ 5, "GUID" }, { 5, "GUID" },
{ 6, "ByteString" }, { 6, "ByteString" },
{ 0x80, "UriMask" }, { 0x80, "UriMask" },
{ 0, NULL } { 0, NULL }
}; };
/** Service type table */ /** Service type table */
extern const value_string g_requesttypes[]; extern const value_string g_requesttypes[];
static int hf_opcua_nodeid_encodingmask = -1; static int hf_opcua_nodeid_encodingmask = -1;
static int hf_opcua_app_nsid = -1; static int hf_opcua_app_nsid = -1;
static int hf_opcua_app_numeric = -1; static int hf_opcua_app_numeric = -1;
/** header field definitions */ /** header field definitions */
static hf_register_info hf[] = static hf_register_info hf[] =
{ {
{ &hf_opcua_nodeid_encodingmask, { &hf_opcua_nodeid_encodingmask,
{ "NodeId EncodingMask", "application.nodeid.encodingmask", FT_UINT8, BASE_HEX, VALS(g_nodeidmasks), 0x0, "", HFILL } { "NodeId EncodingMask", "application.nodeid.encodingmask", FT_UINT8, BASE_HEX, VALS(g_nodeidmasks), 0x0, "", HFILL }
}, },
{ &hf_opcua_app_nsid, { &hf_opcua_app_nsid,
{ "NodeId EncodingMask", "application.nodeid.nsid", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL } { "NodeId EncodingMask", "application.nodeid.nsid", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
}, },
{ &hf_opcua_app_numeric, { &hf_opcua_app_numeric,
{ "NodeId Identifier Numeric", "application.nodeid.numeric", FT_UINT32, BASE_DEC, VALS(g_requesttypes), 0x0, "", HFILL } { "NodeId Identifier Numeric", "application.nodeid.numeric", FT_UINT32, BASE_DEC, VALS(g_requesttypes), 0x0, "", HFILL }
} }
}; };
/** Register application layer types. */ /** Register application layer types. */
void registerApplicationLayerTypes(int proto) void registerApplicationLayerTypes(int proto)
{ {
proto_register_field_array(proto, hf, array_length(hf)); proto_register_field_array(proto, hf, array_length(hf));
} }
/** Parses an OpcUa Service NodeId and returns the service type. /** Parses an OpcUa Service NodeId and returns the service type.
* In this cases the NodeId is always from type numeric and NSId = 0. * In this cases the NodeId is always from type numeric and NSId = 0.
*/ */
int parseServiceNodeId(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldName) int parseServiceNodeId(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldName)
{ {
gint iOffset = *pOffset; gint iOffset = *pOffset;
guint8 EncodingMask, NSId = 0; guint8 EncodingMask, NSId = 0;
guint32 Numeric = 0; guint32 Numeric = 0;
szFieldName = 0; /* avoid warning */ szFieldName = 0; /* avoid warning */
EncodingMask = tvb_get_guint8(tvb, iOffset); EncodingMask = tvb_get_guint8(tvb, iOffset);
proto_tree_add_item(tree, hf_opcua_nodeid_encodingmask, tvb, iOffset, 1, TRUE); proto_tree_add_item(tree, hf_opcua_nodeid_encodingmask, tvb, iOffset, 1, TRUE);
iOffset++; iOffset++;
switch(EncodingMask) switch(EncodingMask)
{ {
case 0x00: /* two byte node id */ case 0x00: /* two byte node id */
Numeric = tvb_get_guint8(tvb, iOffset); Numeric = tvb_get_guint8(tvb, iOffset);
proto_tree_add_item(tree, hf_opcua_app_numeric, tvb, iOffset, 1, TRUE); proto_tree_add_item(tree, hf_opcua_app_numeric, tvb, iOffset, 1, TRUE);
iOffset+=1; iOffset+=1;
break; break;
case 0x01: /* four byte node id */ case 0x01: /* four byte node id */
NSId = tvb_get_guint8(tvb, iOffset); NSId = tvb_get_guint8(tvb, iOffset);
proto_tree_add_item(tree, hf_opcua_app_nsid, tvb, iOffset, 1, TRUE); proto_tree_add_item(tree, hf_opcua_app_nsid, tvb, iOffset, 1, TRUE);
iOffset+=1; iOffset+=1;
Numeric = tvb_get_letohs(tvb, iOffset); Numeric = tvb_get_letohs(tvb, iOffset);
proto_tree_add_item(tree, hf_opcua_app_numeric, tvb, iOffset, 2, TRUE); proto_tree_add_item(tree, hf_opcua_app_numeric, tvb, iOffset, 2, TRUE);
iOffset+=2; iOffset+=2;
break; break;
case 0x02: /* numeric, that does not fit into four bytes */ case 0x02: /* numeric, that does not fit into four bytes */
NSId = tvb_get_letohl(tvb, iOffset); NSId = tvb_get_letohl(tvb, iOffset);
proto_tree_add_item(tree, hf_opcua_app_nsid, tvb, iOffset, 4, TRUE); proto_tree_add_item(tree, hf_opcua_app_nsid, tvb, iOffset, 4, TRUE);
iOffset+=4; iOffset+=4;
Numeric = tvb_get_letohl(tvb, iOffset); Numeric = tvb_get_letohl(tvb, iOffset);
proto_tree_add_item(tree, hf_opcua_app_numeric, tvb, iOffset, 4, TRUE); proto_tree_add_item(tree, hf_opcua_app_numeric, tvb, iOffset, 4, TRUE);
iOffset+=4; iOffset+=4;
break; break;
case 0x03: /* string */ case 0x03: /* string */
case 0x04: /* uri */ case 0x04: /* uri */
case 0x05: /* guid */ case 0x05: /* guid */
case 0x06: /* byte string */ case 0x06: /* byte string */
/* NOT USED */ /* NOT USED */
break; break;
}; };
*pOffset = iOffset; *pOffset = iOffset;
return Numeric; return Numeric;
} }

View File

@ -1,27 +1,27 @@
/****************************************************************************** /******************************************************************************
** $Id: ua_application_layer.h,v 1.3 2007/02/08 12:19:58 gergap Exp $ ** $Id$
** **
** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved. ** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved.
** Web: http://www.ascolab.com ** Web: http://www.ascolab.com
** **
** This program is free software; you can redistribute it and/or ** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License ** modify it under the terms of the GNU General Public License
** as published by the Free Software Foundation; either version 2 ** as published by the Free Software Foundation; either version 2
** of the License, or (at your option) any later version. ** of the License, or (at your option) any later version.
** **
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
** **
** Project: OpcUa Wireshark Plugin ** Project: OpcUa Wireshark Plugin
** **
** Description: OpcUa Application Layer Decoder. ** Description: OpcUa Application Layer Decoder.
** **
** Author: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com> ** Author: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com>
** Last change by: $Author: gergap $ ** Last change by: $Author: gergap $
** **
******************************************************************************/ ******************************************************************************/
void registerApplicationLayerTypes(int proto); void registerApplicationLayerTypes(int proto);
/* Ua type parsers */ /* Ua type parsers */
int parseServiceNodeId(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldName); int parseServiceNodeId(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldName);

View File

@ -1,99 +1,99 @@
/****************************************************************************** /******************************************************************************
** $Id: ua_security_layer.c,v 1.2 2007/02/08 12:16:59 gergap Exp $ ** $Id$
** **
** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved. ** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved.
** Web: http://www.ascolab.com ** Web: http://www.ascolab.com
** **
** This program is free software; you can redistribute it and/or ** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License ** modify it under the terms of the GNU General Public License
** as published by the Free Software Foundation; either version 2 ** as published by the Free Software Foundation; either version 2
** of the License, or (at your option) any later version. ** of the License, or (at your option) any later version.
** **
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
** **
** Project: OpcUa Wireshark Plugin ** Project: OpcUa Wireshark Plugin
** **
** Description: OpcUa Security Layer Decoder. ** Description: OpcUa Security Layer Decoder.
** **
** Author: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com> ** Author: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com>
** Last change by: $Author: gergap $ ** Last change by: $Author: gergap $
** **
******************************************************************************/ ******************************************************************************/
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
#include <gmodule.h> #include <gmodule.h>
#include <epan/packet.h> #include <epan/packet.h>
#include "ua_application_layer.h" #include "ua_application_layer.h"
#include "opcua_simpletypes.h" #include "opcua_simpletypes.h"
/** NodeClass enum table */ /** NodeClass enum table */
static const value_string g_SecSigTable[] = { static const value_string g_SecSigTable[] = {
{ 0, "GetSecurityPolcies" }, { 0, "GetSecurityPolcies" },
{ 1, "OpenSecureChannel" }, { 1, "OpenSecureChannel" },
{ 2, "CloseSecureChannel" }, { 2, "CloseSecureChannel" },
{ 3, "Message" }, { 3, "Message" },
{ 0, NULL } { 0, NULL }
}; };
static int hf_opcua_SecuritySigEnum = -1; static int hf_opcua_SecuritySigEnum = -1;
static int hf_opcua_security_sig = -1; static int hf_opcua_security_sig = -1;
static int hf_opcua_security_policy = -1; static int hf_opcua_security_policy = -1;
static int hf_opcua_security_channel = -1; static int hf_opcua_security_channel = -1;
static int hf_opcua_security_token = -1; static int hf_opcua_security_token = -1;
static hf_register_info hf[] = static hf_register_info hf[] =
{ {
{ &hf_opcua_security_sig, { &hf_opcua_security_sig,
{ "Security Signature", "security.sig", FT_UINT16, BASE_HEX, VALS(g_SecSigTable), 0x0, "", HFILL } { "Security Signature", "security.sig", FT_UINT16, BASE_HEX, VALS(g_SecSigTable), 0x0, "", HFILL }
}, },
{ &hf_opcua_security_policy, { &hf_opcua_security_policy,
{ "Security Policy", "security.policy", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL } { "Security Policy", "security.policy", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }
}, },
{ &hf_opcua_security_channel, { &hf_opcua_security_channel,
{ "Secure Channel Id", "security.channel", FT_GUID, BASE_NONE, NULL, 0x0, "", HFILL } { "Secure Channel Id", "security.channel", FT_GUID, BASE_NONE, NULL, 0x0, "", HFILL }
}, },
{ &hf_opcua_security_token, { &hf_opcua_security_token,
{ "Security Token Id", "security.token", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL } { "Security Token Id", "security.token", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }
} }
}; };
/** Register security layer types. */ /** Register security layer types. */
void registerSecurityLayerTypes(int proto) void registerSecurityLayerTypes(int proto)
{ {
proto_register_field_array(proto, hf, array_length(hf)); proto_register_field_array(proto, hf, array_length(hf));
} }
/* Security Layer: message parsers /* Security Layer: message parsers
* Only works for Security Policy "NoSecurity" at the moment. * Only works for Security Policy "NoSecurity" at the moment.
*/ */
void parseSecurityLayer(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseSecurityLayer(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
guint16 Sig; guint16 Sig;
Sig = tvb_get_letohs(tvb, pOffset[0]); Sig = tvb_get_letohs(tvb, pOffset[0]);
proto_tree_add_item(tree, hf_opcua_security_sig, tvb, *pOffset, 2, TRUE); *pOffset+=2; proto_tree_add_item(tree, hf_opcua_security_sig, tvb, *pOffset, 2, TRUE); *pOffset+=2;
switch (Sig) switch (Sig)
{ {
case 0: /* GetSecurityPolicies */ case 0: /* GetSecurityPolicies */
break; break;
case 1: /* OpenSecureChannel */ case 1: /* OpenSecureChannel */
parseGuid(tree, tvb, pOffset, hf_opcua_security_channel); parseGuid(tree, tvb, pOffset, hf_opcua_security_channel);
parseString(tree, tvb, pOffset, hf_opcua_security_policy); parseString(tree, tvb, pOffset, hf_opcua_security_policy);
break; break;
case 2: /* CloseSecureChannel */ case 2: /* CloseSecureChannel */
parseGuid(tree, tvb, pOffset, hf_opcua_security_channel); parseGuid(tree, tvb, pOffset, hf_opcua_security_channel);
parseString(tree, tvb, pOffset, hf_opcua_security_token); parseString(tree, tvb, pOffset, hf_opcua_security_token);
break; break;
case 3: /* Other Services Messages */ case 3: /* Other Services Messages */
parseGuid(tree, tvb, pOffset, hf_opcua_security_channel); parseGuid(tree, tvb, pOffset, hf_opcua_security_channel);
parseString(tree, tvb, pOffset, hf_opcua_security_token); parseString(tree, tvb, pOffset, hf_opcua_security_token);
break; break;
} }
} }

View File

@ -1,25 +1,25 @@
/****************************************************************************** /******************************************************************************
** $Id: ua_security_layer.h,v 1.2 2007/02/08 12:19:58 gergap Exp $ ** $Id$
** **
** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved. ** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved.
** Web: http://www.ascolab.com ** Web: http://www.ascolab.com
** **
** This program is free software; you can redistribute it and/or ** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License ** modify it under the terms of the GNU General Public License
** as published by the Free Software Foundation; either version 2 ** as published by the Free Software Foundation; either version 2
** of the License, or (at your option) any later version. ** of the License, or (at your option) any later version.
** **
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
** **
** Project: OpcUa Wireshark Plugin ** Project: OpcUa Wireshark Plugin
** **
** Description: OpcUa Security Layer Decoder. ** Description: OpcUa Security Layer Decoder.
** **
** Author: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com> ** Author: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com>
** Last change by: $Author: gergap $ ** Last change by: $Author: gergap $
** **
******************************************************************************/ ******************************************************************************/
void registerSecurityLayerTypes(int proto); void registerSecurityLayerTypes(int proto);
void parseSecurityLayer(proto_tree *tree, tvbuff_t *tvb, gint *pOffset); void parseSecurityLayer(proto_tree *tree, tvbuff_t *tvb, gint *pOffset);

View File

@ -1,211 +1,211 @@
/****************************************************************************** /******************************************************************************
** $Id: ua_transport_layer.c,v 1.3 2007/02/08 12:17:50 gergap Exp $ ** $Id$
** **
** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved. ** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved.
** Web: http://www.ascolab.com ** Web: http://www.ascolab.com
** **
** This program is free software; you can redistribute it and/or ** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License ** modify it under the terms of the GNU General Public License
** as published by the Free Software Foundation; either version 2 ** as published by the Free Software Foundation; either version 2
** of the License, or (at your option) any later version. ** of the License, or (at your option) any later version.
** **
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
** **
** Project: OpcUa Wireshark Plugin ** Project: OpcUa Wireshark Plugin
** **
** Description: OpcUa Transport Layer Decoder. ** Description: OpcUa Transport Layer Decoder.
** **
** Author: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com> ** Author: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com>
** Last change by: $Author: gergap $ ** Last change by: $Author: gergap $
** **
******************************************************************************/ ******************************************************************************/
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
#include <gmodule.h> #include <gmodule.h>
#include <epan/packet.h> #include <epan/packet.h>
#include "ua_security_layer.h" #include "ua_security_layer.h"
#include "ua_application_layer.h" #include "ua_application_layer.h"
#include "opcua_simpletypes.h" #include "opcua_simpletypes.h"
#include <string.h> #include <string.h>
#include <epan/emem.h> #include <epan/emem.h>
void dispatchService(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int ServiceId); void dispatchService(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int ServiceId);
static int hf_opcua_transport_sig = -1; static int hf_opcua_transport_sig = -1;
static int hf_opcua_transport_len = -1; static int hf_opcua_transport_len = -1;
static int hf_opcua_transport_ver = -1; static int hf_opcua_transport_ver = -1;
static int hf_opcua_transport_cid = -1; static int hf_opcua_transport_cid = -1;
static int hf_opcua_transport_lifetime = -1; static int hf_opcua_transport_lifetime = -1;
static int hf_opcua_transport_sbl = -1; static int hf_opcua_transport_sbl = -1;
static int hf_opcua_transport_rbl = -1; static int hf_opcua_transport_rbl = -1;
static int hf_opcua_transport_endpoint = -1; static int hf_opcua_transport_endpoint = -1;
static int hf_opcua_transport_rlifetime = -1; static int hf_opcua_transport_rlifetime = -1;
static int hf_opcua_transport_rsbl = -1; static int hf_opcua_transport_rsbl = -1;
static int hf_opcua_transport_rrbl = -1; static int hf_opcua_transport_rrbl = -1;
static int hf_opcua_transport_altendpoint = -1; static int hf_opcua_transport_altendpoint = -1;
static int hf_opcua_transport_rqid = -1; static int hf_opcua_transport_rqid = -1;
static int hf_opcua_transport_status = -1; static int hf_opcua_transport_status = -1;
extern gint ett_opcua_nodeid; extern gint ett_opcua_nodeid;
static hf_register_info hf[] = static hf_register_info hf[] =
{ {
{ &hf_opcua_transport_sig, { &hf_opcua_transport_sig,
/* full name , abbreviation , type , display , strings, bitmask, blurb, id, parent, ref_count, bitshift */ /* full name , abbreviation , type , display , strings, bitmask, blurb, id, parent, ref_count, bitshift */
{ "Signature", "transport.sig", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL } { "Signature", "transport.sig", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }
}, },
{ &hf_opcua_transport_len, { &hf_opcua_transport_len,
{ "Message Length", "transport.len", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } { "Message Length", "transport.len", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }
}, },
{ &hf_opcua_transport_ver, { &hf_opcua_transport_ver,
{ "Version", "transport.ver", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } { "Version", "transport.ver", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }
}, },
{ &hf_opcua_transport_cid, { &hf_opcua_transport_cid,
{ "ConnectionId", "transport.cid", FT_GUID, BASE_NONE, NULL, 0x0, "", HFILL } { "ConnectionId", "transport.cid", FT_GUID, BASE_NONE, NULL, 0x0, "", HFILL }
}, },
{ &hf_opcua_transport_lifetime, { &hf_opcua_transport_lifetime,
{ "Lifetime", "transport.lifetime", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } { "Lifetime", "transport.lifetime", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }
}, },
{ &hf_opcua_transport_sbl, { &hf_opcua_transport_sbl,
{ "SendBufferLength", "transport.sbl", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } { "SendBufferLength", "transport.sbl", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }
}, },
{ &hf_opcua_transport_rbl, { &hf_opcua_transport_rbl,
{ "ReceiveBufferLength", "transport.rbl", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } { "ReceiveBufferLength", "transport.rbl", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }
}, },
{ &hf_opcua_transport_endpoint, { &hf_opcua_transport_endpoint,
{ "EndPoint", "transport.endpoint", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL } { "EndPoint", "transport.endpoint", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }
}, },
{ &hf_opcua_transport_rlifetime, { &hf_opcua_transport_rlifetime,
{ "Revised Lifetime", "transport.rlifetime", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } { "Revised Lifetime", "transport.rlifetime", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }
}, },
{ &hf_opcua_transport_rsbl, { &hf_opcua_transport_rsbl,
{ "Revised SendBufferLength", "transport.rsbl", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } { "Revised SendBufferLength", "transport.rsbl", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }
}, },
{ &hf_opcua_transport_rrbl, { &hf_opcua_transport_rrbl,
{ "Revised ReceiveBufferLength", "transport.rrbl", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } { "Revised ReceiveBufferLength", "transport.rrbl", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }
}, },
{ &hf_opcua_transport_altendpoint, { &hf_opcua_transport_altendpoint,
{ "Alternate EndPoint", "transport.altendpoint", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL } { "Alternate EndPoint", "transport.altendpoint", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }
}, },
{ &hf_opcua_transport_rqid, { &hf_opcua_transport_rqid,
{ "RequestId", "transport.rqid", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } { "RequestId", "transport.rqid", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }
}, },
{ &hf_opcua_transport_status, { &hf_opcua_transport_status,
{ "StatusCode", "transport.status", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } { "StatusCode", "transport.status", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }
} }
}; };
/** subtree types */ /** subtree types */
extern gint ett_opcua_extensionobject; extern gint ett_opcua_extensionobject;
/** Register transport layer types. */ /** Register transport layer types. */
void registerTransportLayerTypes(int proto) void registerTransportLayerTypes(int proto)
{ {
proto_register_field_array(proto, hf, array_length(hf)); proto_register_field_array(proto, hf, array_length(hf));
} }
/** helper functions for adding strings, /** helper functions for adding strings,
* that are not zero terminated. * that are not zero terminated.
*/ */
void addString(proto_tree *tree, void addString(proto_tree *tree,
int hfindex, int hfindex,
tvbuff_t *tvb, tvbuff_t *tvb,
gint start, gint start,
gint length, gint length,
const char *value) const char *value)
{ {
char *szValue = ep_alloc(256); char *szValue = ep_alloc(256);
if (szValue) if (szValue)
{ {
if (length > 255) length = 255; if (length > 255) length = 255;
/* copy non null terminated string data */ /* copy non null terminated string data */
strncpy(szValue, value, length); strncpy(szValue, value, length);
/* set null terminator */ /* set null terminator */
szValue[length] = 0; szValue[length] = 0;
proto_tree_add_string(tree, hfindex, tvb, start, length, szValue); proto_tree_add_string(tree, hfindex, tvb, start, length, szValue);
} }
} }
/* Transport Layer: message parsers */ /* Transport Layer: message parsers */
void parseHello(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseHello(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
addString(tree, hf_opcua_transport_sig, tvb, *pOffset, 4, tvb->real_data); *pOffset+=4; addString(tree, hf_opcua_transport_sig, tvb, *pOffset, 4, tvb->real_data); *pOffset+=4;
proto_tree_add_item(tree, hf_opcua_transport_len, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_transport_len, tvb, *pOffset, 4, TRUE); *pOffset+=4;
proto_tree_add_item(tree, hf_opcua_transport_ver, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_transport_ver, tvb, *pOffset, 4, TRUE); *pOffset+=4;
proto_tree_add_item(tree, hf_opcua_transport_cid, tvb, *pOffset, 16, TRUE); *pOffset+=16; proto_tree_add_item(tree, hf_opcua_transport_cid, tvb, *pOffset, 16, TRUE); *pOffset+=16;
proto_tree_add_item(tree, hf_opcua_transport_lifetime, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_transport_lifetime, tvb, *pOffset, 4, TRUE); *pOffset+=4;
proto_tree_add_item(tree, hf_opcua_transport_sbl, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_transport_sbl, tvb, *pOffset, 4, TRUE); *pOffset+=4;
proto_tree_add_item(tree, hf_opcua_transport_rbl, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_transport_rbl, tvb, *pOffset, 4, TRUE); *pOffset+=4;
parseString(tree, tvb, pOffset, hf_opcua_transport_endpoint); parseString(tree, tvb, pOffset, hf_opcua_transport_endpoint);
} }
void parseAcknowledge(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseAcknowledge(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
addString(tree, hf_opcua_transport_sig, tvb, *pOffset, 4, tvb->real_data); *pOffset+=4; addString(tree, hf_opcua_transport_sig, tvb, *pOffset, 4, tvb->real_data); *pOffset+=4;
proto_tree_add_item(tree, hf_opcua_transport_len, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_transport_len, tvb, *pOffset, 4, TRUE); *pOffset+=4;
proto_tree_add_item(tree, hf_opcua_transport_cid, tvb, *pOffset, 16, TRUE); *pOffset+=16; proto_tree_add_item(tree, hf_opcua_transport_cid, tvb, *pOffset, 16, TRUE); *pOffset+=16;
proto_tree_add_item(tree, hf_opcua_transport_rlifetime, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_transport_rlifetime, tvb, *pOffset, 4, TRUE); *pOffset+=4;
proto_tree_add_item(tree, hf_opcua_transport_rsbl, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_transport_rsbl, tvb, *pOffset, 4, TRUE); *pOffset+=4;
proto_tree_add_item(tree, hf_opcua_transport_rrbl, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_transport_rrbl, tvb, *pOffset, 4, TRUE); *pOffset+=4;
parseString(tree, tvb, pOffset, hf_opcua_transport_altendpoint); parseString(tree, tvb, pOffset, hf_opcua_transport_altendpoint);
} }
void parseDisconnect(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseDisconnect(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
addString(tree, hf_opcua_transport_sig, tvb, *pOffset, 4, tvb->real_data); *pOffset+=4; addString(tree, hf_opcua_transport_sig, tvb, *pOffset, 4, tvb->real_data); *pOffset+=4;
proto_tree_add_item(tree, hf_opcua_transport_len, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_transport_len, tvb, *pOffset, 4, TRUE); *pOffset+=4;
proto_tree_add_item(tree, hf_opcua_transport_cid, tvb, *pOffset, 16, TRUE); *pOffset+=16; proto_tree_add_item(tree, hf_opcua_transport_cid, tvb, *pOffset, 16, TRUE); *pOffset+=16;
} }
void parseData(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseData(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
proto_item *ti; proto_item *ti;
proto_tree *encobj_tree; proto_tree *encobj_tree;
proto_tree *nodeid_tree; proto_tree *nodeid_tree;
int ServiceId = 0; int ServiceId = 0;
addString(tree, hf_opcua_transport_sig, tvb, *pOffset, 4, tvb->real_data); *pOffset+=4; addString(tree, hf_opcua_transport_sig, tvb, *pOffset, 4, tvb->real_data); *pOffset+=4;
proto_tree_add_item(tree, hf_opcua_transport_len, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_transport_len, tvb, *pOffset, 4, TRUE); *pOffset+=4;
proto_tree_add_item(tree, hf_opcua_transport_cid, tvb, *pOffset, 16, TRUE); *pOffset+=16; proto_tree_add_item(tree, hf_opcua_transport_cid, tvb, *pOffset, 16, TRUE); *pOffset+=16;
proto_tree_add_item(tree, hf_opcua_transport_rqid, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_transport_rqid, tvb, *pOffset, 4, TRUE); *pOffset+=4;
/* message data contains the security layer */ /* message data contains the security layer */
parseSecurityLayer(tree, tvb, pOffset); parseSecurityLayer(tree, tvb, pOffset);
/* AT THE MOMENT NO SECURITY IS IMPLEMENTED IN UA. /* AT THE MOMENT NO SECURITY IS IMPLEMENTED IN UA.
* WE CAN JUST JUMP INTO THE APPLICATION LAYER DATA. * WE CAN JUST JUMP INTO THE APPLICATION LAYER DATA.
* THIS WILL CHAHNGE IN THE FUTURE. */ * THIS WILL CHAHNGE IN THE FUTURE. */
/* add encodeable object subtree */ /* add encodeable object subtree */
ti = proto_tree_add_text(tree, tvb, 0, -1, "Message : Encodeable Object"); ti = proto_tree_add_text(tree, tvb, 0, -1, "Message : Encodeable Object");
encobj_tree = proto_item_add_subtree(ti, ett_opcua_extensionobject); encobj_tree = proto_item_add_subtree(ti, ett_opcua_extensionobject);
/* add nodeid subtree */ /* add nodeid subtree */
ti = proto_tree_add_text(encobj_tree, tvb, 0, -1, "TypeId : ExpandedNodeId"); ti = proto_tree_add_text(encobj_tree, tvb, 0, -1, "TypeId : ExpandedNodeId");
nodeid_tree = proto_item_add_subtree(ti, ett_opcua_nodeid); nodeid_tree = proto_item_add_subtree(ti, ett_opcua_nodeid);
ServiceId = parseServiceNodeId(nodeid_tree, tvb, pOffset, "NodeId") - 1; ServiceId = parseServiceNodeId(nodeid_tree, tvb, pOffset, "NodeId") - 1;
dispatchService(encobj_tree, tvb, pOffset, ServiceId); dispatchService(encobj_tree, tvb, pOffset, ServiceId);
} }
void parseAbort(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseAbort(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
addString(tree, hf_opcua_transport_sig, tvb, *pOffset, 4, tvb->real_data); *pOffset+=4; addString(tree, hf_opcua_transport_sig, tvb, *pOffset, 4, tvb->real_data); *pOffset+=4;
proto_tree_add_item(tree, hf_opcua_transport_len, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_transport_len, tvb, *pOffset, 4, TRUE); *pOffset+=4;
proto_tree_add_item(tree, hf_opcua_transport_cid, tvb, *pOffset, 16, TRUE); *pOffset+=16; proto_tree_add_item(tree, hf_opcua_transport_cid, tvb, *pOffset, 16, TRUE); *pOffset+=16;
proto_tree_add_item(tree, hf_opcua_transport_rqid, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_transport_rqid, tvb, *pOffset, 4, TRUE); *pOffset+=4;
} }
void parseError(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) void parseError(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{ {
addString(tree, hf_opcua_transport_sig, tvb, *pOffset, 4, tvb->real_data); *pOffset+=4; addString(tree, hf_opcua_transport_sig, tvb, *pOffset, 4, tvb->real_data); *pOffset+=4;
proto_tree_add_item(tree, hf_opcua_transport_len, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_transport_len, tvb, *pOffset, 4, TRUE); *pOffset+=4;
proto_tree_add_item(tree, hf_opcua_transport_cid, tvb, *pOffset, 16, TRUE); *pOffset+=16; proto_tree_add_item(tree, hf_opcua_transport_cid, tvb, *pOffset, 16, TRUE); *pOffset+=16;
proto_tree_add_item(tree, hf_opcua_transport_rqid, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_transport_rqid, tvb, *pOffset, 4, TRUE); *pOffset+=4;
proto_tree_add_item(tree, hf_opcua_transport_status, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_transport_status, tvb, *pOffset, 4, TRUE); *pOffset+=4;
} }

View File

@ -1,32 +1,32 @@
/****************************************************************************** /******************************************************************************
** $Id: ua_transport_layer.h,v 1.3 2007/02/08 12:19:58 gergap Exp $ ** $Id$
** **
** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved. ** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved.
** Web: http://www.ascolab.com ** Web: http://www.ascolab.com
** **
** This program is free software; you can redistribute it and/or ** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License ** modify it under the terms of the GNU General Public License
** as published by the Free Software Foundation; either version 2 ** as published by the Free Software Foundation; either version 2
** of the License, or (at your option) any later version. ** of the License, or (at your option) any later version.
** **
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
** **
** Project: OpcUa Wireshark Plugin ** Project: OpcUa Wireshark Plugin
** **
** Description: OpcUa Transport Layer Decoder. ** Description: OpcUa Transport Layer Decoder.
** **
** Author: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com> ** Author: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com>
** Last change by: $Author: gergap $ ** Last change by: $Author: gergap $
** **
******************************************************************************/ ******************************************************************************/
/* Transport Layer: message parsers */ /* Transport Layer: message parsers */
void parseHello(proto_tree *tree, tvbuff_t *tvb, gint *pOffset); void parseHello(proto_tree *tree, tvbuff_t *tvb, gint *pOffset);
void parseAcknowledge(proto_tree *tree, tvbuff_t *tvb, gint *pOffset); void parseAcknowledge(proto_tree *tree, tvbuff_t *tvb, gint *pOffset);
void parseDisconnect(proto_tree *tree, tvbuff_t *tvb, gint *pOffset); void parseDisconnect(proto_tree *tree, tvbuff_t *tvb, gint *pOffset);
void parseData(proto_tree *tree, tvbuff_t *tvb, gint *pOffset); void parseData(proto_tree *tree, tvbuff_t *tvb, gint *pOffset);
void parseAbort(proto_tree *tree, tvbuff_t *tvb, gint *pOffset); void parseAbort(proto_tree *tree, tvbuff_t *tvb, gint *pOffset);
void parseError(proto_tree *tree, tvbuff_t *tvb, gint *pOffset); void parseError(proto_tree *tree, tvbuff_t *tvb, gint *pOffset);
void registerTransportLayerTypes(int proto); void registerTransportLayerTypes(int proto);