Import OCTSDR-2G-01.08.05-B29_Wireshark_Source

This commit is contained in:
Harald Welte 2016-01-20 18:05:21 +01:00
commit 685b5a2bcf
168 changed files with 87058 additions and 0 deletions

View File

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

View File

@ -0,0 +1,293 @@
/* $Id: config.h.win32 27098 2008-12-23 18:56:31Z gerald $ */
/* config.h.win32 Generated manually. :-) */
/* config.h. Generated automatically by configure. */
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* Generated Bison and Flex files test whether __STDC__ is defined
in order to check whether to use ANSI C features such as "const".
GCC defines it as 1 even if extensions that render the implementation
non-conformant are enabled; Sun's C compiler (and, I think, other
AT&T-derived C compilers) define it as 0 if extensions that render
the implementation non-conformant are enabled; Microsoft Visual C++
6.0 doesn't define it at all if extensions that render the implementation
non-conformant are enabled.
We define it as 0 here, so that those generated files will use
those features (and thus not get type warnings when compiled with
MSVC++). */
#ifndef __STDC__
#define __STDC__ 0
#endif
/*
* Flex (v 2.5.35) uses this symbol to "exclude" unistd.h
*/
#define YY_NO_UNISTD_H
/* Use Unicode in Windows runtime functions. */
#define UNICODE 1
#define _UNICODE 1
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if your processor stores words with the most significant
byte first (like Motorola and SPARC, unlike Intel and VAX). */
/* #undef WORDS_BIGENDIAN */
/* Define if lex declares yytext as a char * by default, not a char[]. */
#define YYTEXT_POINTER 1
#define HAVE_PLUGINS 1
#define PLUGINS_NEED_ADDRESS_TABLE 1
/* Plugins can also use the import library of libwireshark.dll instead
of the old API. In that case we undefine PLUGINS_NEED_ADDRESS_TABLE
for the plugin. We don't undefine PLUGINS_NEED_ADDRESS_TABLE globally.
Thus Wireshark will be still able to load plugins using the old API.
The macro HAVE_WIN32_LIBWIRESHARK_LIB has to be defined in plugin's
makefile.nmake. A template is available in doc/README.plugins */
#ifdef HAVE_WIN32_LIBWIRESHARK_LIB
#undef PLUGINS_NEED_ADDRESS_TABLE
#endif
/* #undef HAVE_SA_LEN */
/* #undef NEED_STRERROR_H */
#define NEED_MKSTEMP 1
#define HAVE_LIBPCAP 1
#define HAVE_PCAP_FINDALLDEVS 1
#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1
#define HAVE_PCAP_DATALINK_VAL_TO_NAME 1
#define WPCAP_CONSTIFIED 1
#define HAVE_LIBWIRESHARKDLL 1
#define HAVE_PCAP_LIST_DATALINKS 1
#define HAVE_PCAP_SET_DATALINK 1
#define HAVE_REMOTE 1
#define HAVE_PCAP_REMOTE 1
#define HAVE_PCAP_OPEN 1
#define HAVE_PCAP_FINDALLDEVS_EX 1
#define HAVE_PCAP_CREATESRCSTR 1
#define HAVE_PCAP_SETSAMPLING 1
#define HAVE_AIRPCAP 1
#define HAVE_AIRPDCAP 1
/* availability of pcap_freecode() is handled at runtime */
#define HAVE_PCAP_FREECODE 1
/* define macro for importing variables from an dll
* it depends on HAVE_LIBWIRESHARKDLL and _NEED_VAR_IMPORT_
*/
#if defined (_NEED_VAR_IMPORT_) && defined (HAVE_LIBWIRESHARKDLL)
# define WS_VAR_IMPORT __declspec(dllimport) extern
#else
# define WS_VAR_IMPORT extern
#endif
/* Define if you have the gethostbyname2 function. */
/* #undef HAVE_GETHOSTBYNAME2 */
/* Define if you have the getprotobynumber function. */
/* #undef HAVE_GETPROTOBYNUMBER */
/* Define if you have the <arpa/inet.h> header file. */
/* #undef HAVE_ARPA_INET_H */
/* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define if you have the <iconv.h> header file. */
/* #undef HAVE_ICONV */
/* Define if you have the <netdb.h> header file. */
/* #undef HAVE_NETDB_H */
/* Define if you have the <netinet/in.h> header file. */
/* #define HAVE_NETINET_IN_H 1 */
/* Define if you have the <snmp/snmp.h> header file. */
/* #undef HAVE_SNMP_SNMP_H */
/* Define if you have the <snmp/version.h> header file. */
/* #undef HAVE_SNMP_VERSION_H */
/* Define if you have the <stdarg.h> header file. */
#define HAVE_STDARG_H 1
/* Define if you have the <stddef.h> header file. */
/* #undef HAVE_STDDEF_H */
/* Define if you have the <sys/ioctl.h> header file. */
/* #undef HAVE_SYS_IOCTL_H */
/* Define if you have the <sys/socket.h> header file. */
/* #undef HAVE_SYS_SOCKET_H */
/* Define if you have the <sys/sockio.h> header file. */
/* #undef HAVE_SYS_SOCKIO_H */
/* Define if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define if you have the <sys/time.h> header file. */
/* #define HAVE_SYS_TIME_H 1 */
/* Define if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define if you have the <sys/wait.h> header file. */
/* #undef HAVE_SYS_WAIT_H */
/* Define if you have the <unistd.h> header file. */
/* #define HAVE_UNISTD_H 1 */
/* Define if <inttypes.h> defines PRI[doxu]64 macros */
/* #define INTTYPES_H_DEFINES_FORMATS */
/* Format for printing 64-bit signed decimal numbers */
#ifndef PRId64
#ifdef _MSC_EXTENSIONS
#define PRId64 "I64d"
#else /* _MSC_EXTENSIONS */
#define PRId64 "lld"
#endif /* _MSC_EXTENSIONS */
#endif /* PRId64 */
/* Format for printing 64-bit unsigned octal numbers */
#ifndef PRIo64
#ifdef _MSC_EXTENSIONS
#define PRIo64 "I64o"
#else /* _MSC_EXTENSIONS */
#define PRIo64 "llo"
#endif /* _MSC_EXTENSIONS */
#endif /* PRIo64 */
/* Format for printing 64-bit unsigned decimal numbers */
#ifndef PRIu64
#ifdef _MSC_EXTENSIONS
#define PRIu64 "I64u"
#else /* _MSC_EXTENSIONS */
#define PRIu64 "llu"
#endif /* _MSC_EXTENSIONS */
#endif /* PRIu64 */
/* Formats for printing 64-bit unsigned hexadecimal numbers */
/* XXX - it seems that GLib has problems with the MSVC like I64x.
As we use GLib's g_sprintf and alike, it should be safe to use
llx everywhere now, making the macros pretty useless. For details see:
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1025 */
#ifndef PRIx64
#ifdef _MSC_EXTENSIONS
/*#define PRIx64 "I64x"*/
#define PRIx64 "llx"
#else /* _MSC_EXTENSIONS */
#define PRIx64 "llx"
#endif /* _MSC_EXTENSIONS */
#endif /* PRIx64 */
#ifndef PRIX64
#ifdef _MSC_EXTENSIONS
/*#define PRIX64 "I64X"*/
#define PRIX64 "llX"
#else /* _MSC_EXTENSIONS */
#define PRIX64 "llX"
#endif /* _MSC_EXTENSIONS */
#endif /* PRIX64 */
/* Define if you have the z library (-lz). */
#define HAVE_LIBZ 1
/* Define to use GNU ADNS library */
#define HAVE_C_ARES 1
/* Define to use GNU ADNS library */
#ifndef HAVE_C_ARES
#define ADNS_JGAA_WIN32 1
#endif
/* Define to use the PCRE library */
#define HAVE_LIBPCRE 1
/* Define to use the Nettle library */
/* Define to use the gnutls library */
#define HAVE_LIBGNUTLS 1
/* Define to use the libgcrypt library */
#define HAVE_LIBGCRYPT 1
/* Define to use mit kerberos for decryption of kerberos/sasl/dcerpc */
#define HAVE_MIT_KERBEROS 1
#ifdef HAVE_MIT_KERBEROS
#define HAVE_KERBEROS
#endif
/* Define to use Lua */
#define HAVE_LUA 1
#define HAVE_LUA_5_1 1
/* Define to use Portaudio library */
#define HAVE_LIBPORTAUDIO 1
/* Define version of of the Portaudio library API */
/* Define to have SMI */
#define HAVE_LIBSMI 1
/* Define to have GeoIP */
#define HAVE_GEOIP 1
#ifndef WIN32
#define WIN32 1
#endif
/* Define for IPv6 */
#define INET6 1
#define HAVE_WINDOWS_H 1
#define HAVE_WINSOCK2_H 1
#define HAVE_DIRECT_H 1
#define NEED_INET_ATON_H 1
#define NEED_INET_V6DEFS_H 1
/* Visual C 9 (2008) now needs these prototypes */
#if _MSC_VER == 1500
#define NTDDI_VERSION NTDDI_WIN2K
#define _WIN32_WINNT _WIN32_WINNT_WIN2K
#endif
#define NEED_GETOPT_H 1
#define NEED_STRPTIME_H 1
#define strcasecmp stricmp
#define strncasecmp strnicmp
#define popen _popen
#define pclose _pclose
/* Needed for zlib, according to http://www.winimage.com/zLibDll/ */
/*#define ZLIB_DLL 1
#define _WINDOWS 1*/
/* Name of package */
#define PACKAGE "wireshark"
/* Version number of package */
#define VERSION "1.1.3"
/* We shouldn't need this under Windows but we'll define it anyway. */
#define HTML_VIEWER "mozilla"
/* Check for the required _MSC_VER */
#if MSC_VER_REQUIRED != _MSC_VER
#define WS_TO_STRING2(x) #x
#define WS_TO_STRING(x) WS_TO_STRING2(x)
#pragma message( "_MSC_VER is:" WS_TO_STRING(_MSC_VER) " but required is:" WS_TO_STRING(MSC_VER_REQUIRED) )
#error Your MSVC_VARIANT setting in config.nmake doesn't match the MS compiler version!
#endif

View File

@ -0,0 +1,293 @@
/* $Id: config.h.win32 27098 2008-12-23 18:56:31Z gerald $ */
/* config.h.win32 Generated manually. :-) */
/* config.h. Generated automatically by configure. */
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* Generated Bison and Flex files test whether __STDC__ is defined
in order to check whether to use ANSI C features such as "const".
GCC defines it as 1 even if extensions that render the implementation
non-conformant are enabled; Sun's C compiler (and, I think, other
AT&T-derived C compilers) define it as 0 if extensions that render
the implementation non-conformant are enabled; Microsoft Visual C++
6.0 doesn't define it at all if extensions that render the implementation
non-conformant are enabled.
We define it as 0 here, so that those generated files will use
those features (and thus not get type warnings when compiled with
MSVC++). */
#ifndef __STDC__
#define __STDC__ 0
#endif
/*
* Flex (v 2.5.35) uses this symbol to "exclude" unistd.h
*/
#define YY_NO_UNISTD_H
/* Use Unicode in Windows runtime functions. */
#define UNICODE 1
#define _UNICODE 1
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if your processor stores words with the most significant
byte first (like Motorola and SPARC, unlike Intel and VAX). */
/* #undef WORDS_BIGENDIAN */
/* Define if lex declares yytext as a char * by default, not a char[]. */
#define YYTEXT_POINTER 1
#define HAVE_PLUGINS 1
#define PLUGINS_NEED_ADDRESS_TABLE 1
/* Plugins can also use the import library of libwireshark.dll instead
of the old API. In that case we undefine PLUGINS_NEED_ADDRESS_TABLE
for the plugin. We don't undefine PLUGINS_NEED_ADDRESS_TABLE globally.
Thus Wireshark will be still able to load plugins using the old API.
The macro HAVE_WIN32_LIBWIRESHARK_LIB has to be defined in plugin's
makefile.nmake. A template is available in doc/README.plugins */
#ifdef HAVE_WIN32_LIBWIRESHARK_LIB
#undef PLUGINS_NEED_ADDRESS_TABLE
#endif
/* #undef HAVE_SA_LEN */
/* #undef NEED_STRERROR_H */
#define NEED_MKSTEMP 1
@HAVE_LIBPCAP@
@HAVE_PCAP_BREAKLOOP@
@HAVE_PCAP_FINDALLDEVS@
@HAVE_PCAP_DATALINK_NAME_TO_VAL@
@HAVE_PCAP_DATALINK_VAL_TO_NAME@
@WPCAP_CONSTIFIED@
@HAVE_LIBWIRESHARKDLL@
@HAVE_PCAP_LIST_DATALINKS@
@HAVE_PCAP_SET_DATALINK@
@HAVE_REMOTE@
@HAVE_PCAP_REMOTE@
@HAVE_PCAP_OPEN@
@HAVE_PCAP_FINDALLDEVS_EX@
@HAVE_PCAP_CREATESRCSTR@
@HAVE_PCAP_SETSAMPLING@
@HAVE_AIRPCAP@
@HAVE_AIRPDCAP@
/* availability of pcap_freecode() is handled at runtime */
#define HAVE_PCAP_FREECODE 1
/* define macro for importing variables from an dll
* it depends on HAVE_LIBWIRESHARKDLL and _NEED_VAR_IMPORT_
*/
#if defined (_NEED_VAR_IMPORT_) && defined (HAVE_LIBWIRESHARKDLL)
# define WS_VAR_IMPORT __declspec(dllimport) extern
#else
# define WS_VAR_IMPORT extern
#endif
/* Define if you have the gethostbyname2 function. */
/* #undef HAVE_GETHOSTBYNAME2 */
/* Define if you have the getprotobynumber function. */
/* #undef HAVE_GETPROTOBYNUMBER */
/* Define if you have the <arpa/inet.h> header file. */
/* #undef HAVE_ARPA_INET_H */
/* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define if you have the <iconv.h> header file. */
/* #undef HAVE_ICONV */
/* Define if you have the <netdb.h> header file. */
/* #undef HAVE_NETDB_H */
/* Define if you have the <netinet/in.h> header file. */
/* #define HAVE_NETINET_IN_H 1 */
/* Define if you have the <snmp/snmp.h> header file. */
/* #undef HAVE_SNMP_SNMP_H */
/* Define if you have the <snmp/version.h> header file. */
/* #undef HAVE_SNMP_VERSION_H */
/* Define if you have the <stdarg.h> header file. */
#define HAVE_STDARG_H 1
/* Define if you have the <stddef.h> header file. */
/* #undef HAVE_STDDEF_H */
/* Define if you have the <sys/ioctl.h> header file. */
/* #undef HAVE_SYS_IOCTL_H */
/* Define if you have the <sys/socket.h> header file. */
/* #undef HAVE_SYS_SOCKET_H */
/* Define if you have the <sys/sockio.h> header file. */
/* #undef HAVE_SYS_SOCKIO_H */
/* Define if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define if you have the <sys/time.h> header file. */
/* #define HAVE_SYS_TIME_H 1 */
/* Define if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define if you have the <sys/wait.h> header file. */
/* #undef HAVE_SYS_WAIT_H */
/* Define if you have the <unistd.h> header file. */
/* #define HAVE_UNISTD_H 1 */
/* Define if <inttypes.h> defines PRI[doxu]64 macros */
/* #define INTTYPES_H_DEFINES_FORMATS */
/* Format for printing 64-bit signed decimal numbers */
#ifndef PRId64
#ifdef _MSC_EXTENSIONS
#define PRId64 "I64d"
#else /* _MSC_EXTENSIONS */
#define PRId64 "lld"
#endif /* _MSC_EXTENSIONS */
#endif /* PRId64 */
/* Format for printing 64-bit unsigned octal numbers */
#ifndef PRIo64
#ifdef _MSC_EXTENSIONS
#define PRIo64 "I64o"
#else /* _MSC_EXTENSIONS */
#define PRIo64 "llo"
#endif /* _MSC_EXTENSIONS */
#endif /* PRIo64 */
/* Format for printing 64-bit unsigned decimal numbers */
#ifndef PRIu64
#ifdef _MSC_EXTENSIONS
#define PRIu64 "I64u"
#else /* _MSC_EXTENSIONS */
#define PRIu64 "llu"
#endif /* _MSC_EXTENSIONS */
#endif /* PRIu64 */
/* Formats for printing 64-bit unsigned hexadecimal numbers */
/* XXX - it seems that GLib has problems with the MSVC like I64x.
As we use GLib's g_sprintf and alike, it should be safe to use
llx everywhere now, making the macros pretty useless. For details see:
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1025 */
#ifndef PRIx64
#ifdef _MSC_EXTENSIONS
/*#define PRIx64 "I64x"*/
#define PRIx64 "llx"
#else /* _MSC_EXTENSIONS */
#define PRIx64 "llx"
#endif /* _MSC_EXTENSIONS */
#endif /* PRIx64 */
#ifndef PRIX64
#ifdef _MSC_EXTENSIONS
/*#define PRIX64 "I64X"*/
#define PRIX64 "llX"
#else /* _MSC_EXTENSIONS */
#define PRIX64 "llX"
#endif /* _MSC_EXTENSIONS */
#endif /* PRIX64 */
/* Define if you have the z library (-lz). */
@HAVE_LIBZ@
/* Define to use GNU ADNS library */
@HAVE_C_ARES@
/* Define to use GNU ADNS library */
#ifndef HAVE_C_ARES
@HAVE_GNU_ADNS@
#define ADNS_JGAA_WIN32 1
#endif
/* Define to use the PCRE library */
@HAVE_PCRE@
/* Define to use the Nettle library */
@HAVE_NETTLE@
/* Define to use the gnutls library */
@HAVE_LIBGNUTLS@
/* Define to use the libgcrypt library */
@HAVE_LIBGCRYPT@
/* Define to use mit kerberos for decryption of kerberos/sasl/dcerpc */
@HAVE_KFW@
#ifdef HAVE_MIT_KERBEROS
#define HAVE_KERBEROS
#endif
/* Define to use Lua */
@HAVE_LUA@
@HAVE_LUA_5_1@
/* Define to use Portaudio library */
@HAVE_LIBPORTAUDIO@
/* Define version of of the Portaudio library API */
@PORTAUDIO_API_1@
/* Define to have SMI */
@HAVE_SMI@
/* Define to have GeoIP */
@HAVE_GEOIP@
#ifndef WIN32
#define WIN32 1
#endif
/* Define for IPv6 */
@INET6@
#define HAVE_WINDOWS_H 1
#define HAVE_WINSOCK2_H 1
#define HAVE_DIRECT_H 1
#define NEED_INET_ATON_H 1
#define NEED_INET_V6DEFS_H 1
/* Visual C 9 (2008) now needs these prototypes */
#if _MSC_VER == 1500
#define NTDDI_VERSION NTDDI_WIN2K
#define _WIN32_WINNT _WIN32_WINNT_WIN2K
#endif
#define NEED_GETOPT_H 1
#define NEED_STRPTIME_H 1
#define strcasecmp stricmp
#define strncasecmp strnicmp
#define popen _popen
#define pclose _pclose
/* Needed for zlib, according to http://www.winimage.com/zLibDll/ */
/*#define ZLIB_DLL 1
#define _WINDOWS 1*/
/* Name of package */
#define PACKAGE "wireshark"
/* Version number of package */
#define VERSION "@VERSION@"
/* We shouldn't need this under Windows but we'll define it anyway. */
#define HTML_VIEWER "mozilla"
/* Check for the required _MSC_VER */
#if MSC_VER_REQUIRED != _MSC_VER
#define WS_TO_STRING2(x) #x
#define WS_TO_STRING(x) WS_TO_STRING2(x)
#pragma message( "_MSC_VER is:" WS_TO_STRING(_MSC_VER) " but required is:" WS_TO_STRING(MSC_VER_REQUIRED) )
#error Your MSVC_VARIANT setting in config.nmake doesn't match the MS compiler version!
#endif

View File

@ -0,0 +1,964 @@
# $Id: config.nmake 27582 2009-03-02 21:33:11Z gerald $
# Some more informations about the settings in this file, can be found
# in the file README.win32 and the Developer's Guide (available online).
##### Target platform #####
# Only "win32" is valid (for now).
# This can be defined in the system environment.
!IFNDEF PLATFORM
PLATFORM=win32
!ENDIF
##### Versions #####
# The current Wireshark version
# It's highly recommended to leave MAJOR/MINOR/MICRO unchanged
VERSION_MAJOR=1
VERSION_MINOR=1
VERSION_MICRO=3
VERSION_BUILD=0
# It's recommended to change VERSION_EXTRA for your own custom builds
# e.g. "-SVN-12345"
VERSION_EXTRA=
# The version of the wiretap library (recommended: leave unchanged)
WTAP_VERSION_MAJOR=0
WTAP_VERSION_MINOR=3
WTAP_VERSION_MICRO=1
##### Directories #####
#
# Base directory, where your libraries reside, which are needed to
# compile the sources. This setting is used only inside this file.
#
#PPMODIF
#WIRESHARK_LIBS=C:\wireshark-$(PLATFORM)-libs
!IFNDEF DEV_ROOT
DEV_ROOT=../../../../../..
!ENDIF
!IFNDEF WS_DEV_ROOT
!IF EXIST( "$(DEV_ROOT)\application\tool\wireshark\ws_dev_root.nmake")
!include $(DEV_ROOT)\application\tool\wireshark\ws_dev_root.nmake
!ENDIF
!ENDIF
!IFNDEF WS_DEV_ROOT
WIRESHARK_LIBS=$(DEV_ROOT)/application/3rdparty/wireshark/$(TGT_WS_VERSION)/$(PLATFORM)-libs
!ELSE
WIRESHARK_LIBS=$(WS_DEV_ROOT)/$(TGT_WS_VERSION)/$(PLATFORM)-libs
!ENDIF
OCT_INC = $(DEV_ROOT)/software/include
!IF "$(DEBUG)" == "1"
DISSECTOR_OBJ_PATH = $(DISSECTOR_SRC:source=Debug_1.2.6)
SMOKE_OBJ_PATH = $(SMOKE_SRC:smoke_test=Debug_Smoke_1.2.6)
!ELSE
DISSECTOR_OBJ_PATH = $(DISSECTOR_SRC:source=Release_1.2.6)
SMOKE_OBJ_PATH = $(SMOKE_SRC:smoke_test=Release_Smoke_1.2.6)
!ENDIF
#
# Base directory, where your programs reside.
# This setting is used only inside this file.
#
!IFNDEF WIRESHARK_RELEASE
WIRESHARK_RELEASE=$(TGT_WS_VERSION)
!ENDIF
PROGRAM_FILES=$(PROGRAMFILES)
!IFNDEF WS_INSTALL_PATH
#
# Wireshark plugins installation
WS_INSTALL_PATH=$(PROGRAM_FILES)/wireshark
!ENDIF
WIRESHARK_PLUGING_DEST=$(WS_INSTALL_PATH)/plugins/$(WIRESHARK_RELEASE)
#
# Location of the "tools" directory. This affects HTML2TXT below and should
# be overridden by makefiles in any subdirectories that use HTML2TXT.
!IFNDEF TOOLS_DIR
TOOLS_DIR=tools
!ENDIF
#
# Machine type for the compiler and linker
# TARGET_MACHINE (Used for link /MACHINE) should be one of "X86" or "X64"
# (sorry ARM, Alpha, MIPS, and Itanium fans).
# CPU (Used by win32.mak) should be one of "i386" or "AMD64".
!if "$(PLATFORM)" == "win32"
TARGET_MACHINE=X86
CPU=i386
!else if "$(PLATFORM)" == "win64"
TARGET_MACHINE=X64
CPU=AMD64
!endif
!IF !DEFINED(MSVC_VARIANT)
##### Microsoft Visual C / Studio Variant #####
# for the different Studios, see: http://en.wikipedia.org/wiki/Microsoft_Visual_Studio
# only one of the following MSVC_VARIANT settings should be used
# BTW: The "Microsoft Visual C++ Toolkit 2003" DOESN'T WORK for WS!
# "Microsoft Visual Studio 6.0"
# Visual C++ 6.0, _MSC_VER 1200, msvcrt.dll (version 6)
#MSVC_VARIANT=MSVC6
# "Microsoft Visual Studio .NET (2002)"
# Visual C++ 7.0, _MSC_VER 1300, msvcr70.dll
#MSVC_VARIANT=MSVC2002
# "Microsoft .Net Framework SDK Version 1.0"
# needs additional Platform SDK installation
# Visual C++ 7.0, _MSC_VER 1300, msvcr70.dll
#MSVC_VARIANT=DOTNET10
# "Microsoft Visual Studio .NET 2003"
# Visual C++ 7.1, _MSC_VER 1310, msvcr71.dll
#MSVC_VARIANT=MSVC2003
# "Microsoft .Net Framework SDK Version 1.1"
# needs additional Platform SDK installation
# Visual C++ 7.1, _MSC_VER 1310, msvcr71.dll
#MSVC_VARIANT=DOTNET11
# "Microsoft Visual Studio 2005"
# Visual C++ 8.0, _MSC_VER 1400, msvcr80.dll
#MSVC_VARIANT=MSVC2005
# "Microsoft Visual C++ 2005 Express Edition"
# needs additional Platform SDK installation
# Visual C++ 8.0, _MSC_VER 1400, msvcr80.dll
#MSVC_VARIANT=MSVC2005EE
# "Microsoft .Net Framework 2.0 SDK"
# needs additional Platform SDK installation
# Visual C++ 8.0, _MSC_VER 1400, msvcr80.dll
#MSVC_VARIANT=DOTNET20
# "Microsoft Visual Studio 2008"
# Visual C++ 9.0, _MSC_VER 1500, msvcr90.dll
#MSVC_VARIANT=MSVC2008
# "Microsoft Visual C++ 2008 Express Edition"
# Visual C++ 9.0, _MSC_VER 1500, msvcr90.dll
MSVC_VARIANT=MSVC2008EE
#
!ENDIF
#
#
# Optional: To compile some time critical code from assembler instead of C
#
# If you have the NASM compiler, set this to the NASM executable.
# http://nasm.sourceforge.net/
#
# If you don't have NASM, comment this line out, so that NASM
# isn't defined.
#
NASM=$(WIRESHARK_LIBS)\nasm-2.02\nasm.exe
##### Libraries #####
#
# Mandatory: GLib settings
#
# Please note: Since Wireshark release 1.0.0, we no longer support GLib1.x
#
GLIB_VERSION=2.0
GLIB_DIR=$(WIRESHARK_LIBS)\glib
#
# Mandatory: GTK (& related libs) settings
#
# Please note: Since Wireshark release 1.0.0, we no longer support GTK1.x
#
# If you want building with GTK+, set GTK_DIR to the pathname of the
# directory in which the "include" and "lib" directories reside.
#
GTK_DIR=$(WIRESHARK_LIBS)\gtk2
#
# Mandatory: Version numbers of GTK and pango.
#
# (MAJOR + MINOR Version number but without MICRO version number)
# These macros are used by the nsis installer script and by the setup target.
#
# GTK 2.12 is the mainline since Wireshark 0.99.7
GTK_INST_VERSION=2.14
PANGO_INST_VERSION=1.22
#
# Optional: WinPcap developer's pack to capture network traffic.
#
# If you have the WinPcap developer's pack (at least version 3.0),
# set this to the directory in which the WinPcap developer's pack resides.
#
# If you don't have the WPdpack, comment this line out, so that
# PCAP_DIR isn't defined.
#
PCAP_DIR=$(WIRESHARK_LIBS)\WPdpack
#
# Optional: WinPcap remote capture support and new API
# (pcap_open(), pcap_findalldevs_ex(), etc.)
#
PCAP_REMOTE=1
#
# Optional: The ZLib enables unzipping of gzip compressed capture files
# "on the fly".
#
# If you have Zlib, set this to directory in which the Zlib headers
# and .lib file are stored.
#
# If you don't have Zlib, comment this line out, so that ZLIB_DIR isn't
# defined.
#
ZLIB_DIR=$(WIRESHARK_LIBS)\zlib123
#
# Optional: the ADNS library enables asynchronous (nonblocking) DNS
# name resolvings.
#
# If you have GNU ADNS, set this to the directory in which the GNU ADNS
# .lib file is stored.
#
# If you don't have GNU ADNS, comment this line out, so that ADNS_DIR
# isn't defined.
#
# If C_ARES_DIR is defined below, it will override this setting.
#
#ADNS_DIR=$(WIRESHARK_LIBS)\adns-1.0-win32-05ws
#
# Optional: the c-ares library enables asynchronous (nonblocking) DNS
# name resolvings.
#
# If you have c-ares, set this to the directory in which the c-ares
# .lib file is stored. Setting this will override ADNS_DIR above. You
# can't have both.
#
# If you're using Visual C++ 6.0, you'll have to use a platform SDK that
# defines socklen_t, such as Windows Server 2003 PSDK.
#
# If you don't have c-ares, comment this line out, so that C_ARES_DIR
# isn't defined.
#
C_ARES_DIR=$(WIRESHARK_LIBS)\c-ares-1.6.0ws
#
# Optional: the PCRE (Perl Compatible Regular Expressions) library
# enables regular expressions for display filters.
#
# If you have the PCRE library, set this to the directory in which
# the GNUWIN32 pcre-lib package is stored.
#
# If you don't have PCRE, comment this line out, so that PCRE_DIR
# isn't defined.
#
PCRE_DIR=$(WIRESHARK_LIBS)\pcre-7.0
#
# Optional: the GNUTLS library enables ssl decryption.
#
# If you have the GNUTLS library, set this to the directory where
# the lib and include files are stored.
#
# If you don't have GNUTLS, comment this line out, so that GNUTLS_DIR
# isn't defined.
#
# Platform SDK conflicts with openssl.h header
#GNUTLS_DIR=$(WIRESHARK_LIBS)\gnutls-2.6.3-1
GNUTLS_DIR=$(WIRESHARK_LIBS)\gnutls-2.6.4-1
#
# Optional: the KFW library enables kerberos/sasl/dcerpc decryption.
#
# If you have the kerberos for windows (mit) library, set this to the
# directory where the kfw package is stored.
#
# If you don't have KFW, comment this line out, so that KFW_DIR
# isn't defined.
#
KFW_DIR=$(WIRESHARK_LIBS)\kfw-2.5
#
# Optional: the Nettle library enables ??? decryption.
#
# If you have the Nettle encryption library, set this to the
# directory in which the nettle package is stored.
#
# If you don't have Nettle, comment this line out, so that NETTLE_DIR
# isn't defined.
#
# NETTLE_DIR=$(WIRESHARK_LIBS)\nettle-1.10
#
# Optional: the LUA library enables scripting support.
#
# If you have the LUA library, set this to the directory in which
# the LUA package is stored.
#
# If you don't have LUA, comment this line out, so that LUA_DIR
# isn't defined.
#
LUA_DIR=$(WIRESHARK_LIBS)\lua5.1.4
#
# Optional: the PORTAUDIO library enables audio output for RTP streams.
#
# If you have the PORTAUDIO library (used for rtp_player), set this to
# the directory in which the PORTAUDIO library is stored.
#
# If you don't have PORTAUDIO, comment this line out, so that
# PORTAUDIO_DIR isn't defined.
#
#PORTAUDIO_DIR=$(WIRESHARK_LIBS)\portaudio_v18_1
PORTAUDIO_DIR=$(WIRESHARK_LIBS)\portaudio_v19_2
#
# Version number of PortAudio
#
#PORTAUDIO_VERSION=18
PORTAUDIO_VERSION=19
#
# Iconv: Mandatory for Glib >= 2 and <= 2.14.4
# [win-iconv statically linked as part of Glib >= 2.14.5]
# Set ICONV_DIR to the directory in which the
# ICONV include files and library resides.
#
##ICONV_DIR=$(WIRESHARK_LIBS)\libiconv-1.9.1.bin.woe32
#
# Mandatory for GTK >= 2: Gettext
#
# Set GETTEXT_DIR to the directory in which the
# GETTEXT include files and library resides.
#
#GETTEXT_DIR=$(WIRESHARK_LIBS)\gettext-0.14.5
GETTEXT_DIR=$(WIRESHARK_LIBS)\gettext-runtime-0.17-1
#
# Optional: AirPcap developer's pack to capture wireless network traffic
# incl. 802.11 management frames.
#
# If you have the AirPcap developer's pack, set this to the directory
# in which the AirPcap developer's pack resides.
#
# If you don't have the AirPcap developer's pack, comment this line out,
# so that AIRPCAP_DIR isn't defined.
#
AIRPCAP_DIR=$(WIRESHARK_LIBS)\AirPcap_Devpack_1_0_0_594\AirPcap_Devpack
#
# Optional: LIBSMI, System Management Interface
#
# Used for oid-name resolution for SNMP and other protocols
#
SMI_DIR=$(WIRESHARK_LIBS)\libsmi-0.4.8
#
# Optional: GeoIP, IP address database lookups
#
# Used to map IP addresses to MaxMind GeoIP database entries
#
# GeoIP requires IPv6 definitions that don't ship with Visual C++ 6.0.
# However, the Microsoft Platform SDK for Windows Server 2003 R2 provides
# these definitions. The SDK's SetEnv.bat script defines INETSDK.
!IF "$(MSVC_VARIANT)" != "MSVC6" || DEFINED(INETSDK)
GEOIP_DIR=$(WIRESHARK_LIBS)\GeoIP-1.4.5ws
!ENDIF
##### Tools #####
# Set the following mandatory commands to find the tools.
# The easiest way is to use the corresponding packages from cygwin.
# Set up the path to the cygwin binaries
CYGWIN_PATH=c:\cygwin\bin
# command for a shell (cygwin's bash package recommended)
SH_PROG=bash
# bash versions after 3.1.6 need the 'igncr' shell option to be able to
# process scripts in windows 'native format' (dos crlf format).
# The following !IF results in the option being used only if it is available
# since using it on bash version 3.1.6 (or earlier) is not required and
# will cause an error message.
!if "$(SH_PROG)"=="bash" && [$(CYGWIN_PATH)\bash -c "set -o igncr" 2>nul: ] == 0
SH_FLAGS=-o igncr
!endif
SH=$(SH_PROG) $(SH_FLAGS)
# command for perl (cygwin's perl package recommended)
PERL=perl
# command for pod2man and pod2html
# (part of the perl package, usually leave these unchanged)
POD2MAN=$(SH) pod2man
POD2HTML=$(SH) pod2html
# Command for native Windows Python (recommended)
# V2.4 to V2.6 should work
# If you want to specify your Python settings, uncomment the lines below.
#PYTHON="C:\Python26\python.exe"
#PATH=c:\Python26;$(PATH)
# Command for Cygwin's Python (not recommended)
#PYTHON=env python
# Otherwise, find Python automatically.
!IF !DEFINED(PYTHON)
!IF EXIST(c:\Python26\python.exe)
PYTHON="C:\Python26\python.exe"
PATH=c:\Python26;$(PATH)
!ELSE IF EXIST(c:\Python25\python.exe)
PYTHON="C:\Python25\python.exe"
PATH=c:\Python25;$(PATH)
!ELSE IF EXIST(c:\Python24\python.exe)
PYTHON="C:\Python24\python.exe"
PATH=c:\Python24;$(PATH)
!ENDIF
!ENDIF
# command for lex/flexx (cygwin's flex recommended)
LEX=flex
# command for yacc/bison (cygwin's bison recommended)
YACC=bison
#
# Optional: To build the NSIS installer.
#
# If you have the NSIS package, set this to the NSIS executable.
#
# If you don't have NSIS, comment this line out, so that MAKENSIS
# isn't defined.
#
MAKENSIS="$(PROGRAM_FILES)\nsis\makensis.exe"
#
# Optional: To build the developers API documentation with doxygen and dot.
# Currently experimental, outdated and incomplete.
#
# You will have to download and install:
# Doxygen from: http://www.doxygen.org
# Graphviz from: http://www.research.att.com/sw/tools/graphviz/
#
# If you have doxygen, set this to the doxygen executable.
#
# If you don't want the developers documentation (or don't have the tools),
# comment this line out, so that DOXYGEN isn't defined.
#
#DOXYGEN="$(PROGRAM_FILES)/doxygen/bin/doxygen.exe"
#
# Recommended: Use the compressed html help format .chm as the Wireshark integrated help.
#
# The required htmlhelp.h and htmlhelp.lib should be included in MSVC_VARIANT > MSVC6.
#
# For MSVC_VARIANT == MSVC6 you will have to download and install the html help workshop from:
#
# http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html
# /hwMicrosoftHTMLHelpDownloads.asp
#
# Then point HHC_DIR to the html help dir (where hhc.exe resides).
#
# If you don't want the online help (or don't have the tools),
# comment this line out, so that HHC_DIR isn't defined.
#
HHC_DIR=$(PROGRAM_FILES)/HTML Help Workshop
#
# Optional: To reduce the size of dlls and exes, which is especially useful for USB device distributions (U3, PortableApps)
#
# If you have the UPX package, set this to the upx.exe executable.
#
# UPX can be downloaded from:
# http://upx.sourceforge.net/
#
# If you don't have UPX, or don't want to pack exes and dlls,
# comment this line out, so that UPX isn't defined.
#
UPX=$(WIRESHARK_LIBS)\upx301w\upx.exe
##### Flags, PATHs and Miscellaneous #####
# "convert" the MSVC variant into the required MSC compiler version
!IF "$(MSVC_VARIANT)" == "MSVC6"
MSC_VER_REQUIRED=1200
!ELSEIF "$(MSVC_VARIANT)" == "MSVC2002" || "$(MSVC_VARIANT)" == "DOTNET10"
MSC_VER_REQUIRED=1300
!ELSEIF "$(MSVC_VARIANT)" == "MSVC2003" || "$(MSVC_VARIANT)" == "DOTNET11"
MSC_VER_REQUIRED=1310
!ELSEIF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
MSC_VER_REQUIRED=1400
!ELSEIF "$(MSVC_VARIANT)" == "MSVC2008" || "$(MSVC_VARIANT)" == "MSVC2008EE"
MSC_VER_REQUIRED=1500
!ELSE
!ERROR MSVC_VARIANT unknown
!ENDIF
# Compiler flags:
# /W3 warning level 3 (0 less - 4 most, 1 default)
# /Zi create .pdb file for debugging
# /MD use "Multithreading Debug" libraries
# /D_CRT_SECURE_NO_DEPRECATE Don't warn for "insecure" calls, see MSDN "Security Enhancements in the CRT"
# /D_CRT_NONSTDC_NO_DEPRECATE Don't warn for "Deprecated CRT Functions" as MSDN calls this
# /D_BIND_TO_CURRENT_CRT_VERSION=1 Make sure our CRT and manifest versions match (http://msdn.microsoft.com/en-us/library/cc664727.aspx)
# /DWIN32_LEAN_AND_MEAN Don't include unnecessary Windows include files (see windows.h)
# /MP [<number of processes>] [MSVC2008]: Compiles multiple source files by using multiple processes
# Add if desired for compile speedup on machines with 2 or more "effective processors"
# /MANIFEST:no Don't create a SxS manifest. Makes sure our plugins don't load a second copy of the CRT.
#
!IF "$(MSVC_VARIANT)" == "MSVC6" || "$(MSVC_VARIANT)" == "MSVC2002" || "$(MSVC_VARIANT)" == "DOTNET10" || "$(MSVC_VARIANT)" == "MSVC2003" || "$(MSVC_VARIANT)" == "DOTNET11"
LOCAL_CFLAGS=/Zi /W3 /MD /DWIN32_LEAN_AND_MEAN /DMSC_VER_REQUIRED=$(MSC_VER_REQUIRED)
!ELSEIF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20" || "$(MSVC_VARIANT)" == "MSVC2008" || "$(MSVC_VARIANT)" == "MSVC2008EE"
LOCAL_CFLAGS=/Zi /W3 /MD /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DWIN32_LEAN_AND_MEAN /DMSC_VER_REQUIRED=$(MSC_VER_REQUIRED) /D_BIND_TO_CURRENT_CRT_VERSION=1
!ELSE
!ERROR MSVC_VARIANT unknown
!ENDIF
# Linker flags:
# /DEBUG generate debug info
# /PROFILE generate map file(s) for profiling
# /DEFAULTLIB:xxx use xxx as the standard C library
# /NODEFAULTLIB:xxx don't use xxx as the standard C library
#
LOCAL_LDFLAGS=/DEBUG /MACHINE:$(TARGET_MACHINE)
DLL_LDFLAGS =
!IF $(MSC_VER_REQUIRED) >= 1400
DLL_LDFLAGS = /MANIFEST:no
!ENDIF
PLUGIN_LDFLAGS = /NOLOGO /INCREMENTAL:no $(LOCAL_LDFLAGS) $(DLL_LDFLAGS)
#
# According to http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=403
# XCOPY under Windows NT doesn't support the "/Y" flag. This works
# around that bug.
# XXX - This apparently doesn't work for some versions of nmake:
# http://support.microsoft.com/default.aspx?scid=kb;en-us;86814
# It looks like we'll have to call "set copycmd=/y" before we run xcopy.
COPYCMD=/y
#
# If you don't want to build libwireshark.dll, you should comment out the
# following line. (Note: for plugin support this option must stay activated)
ENABLE_LIBWIRESHARK=USE
#
# install (debug) directory for Wireshark (relative to your source dir)
INSTALL_DIR=wireshark-gtk2
##### C-Runtime Redistributable #####
#
# The C-Runtime since Version 7 must be shipped together with
# the program installer, to avoid missing msvcr*.dll files on
# the target machine.
#
# The location of these files differ on the various compiler
# packages, the following will use the default paths depending
# on the package version.
#
!IF "$(MSVC_VARIANT)" == "MSVC6"
# msvcrt.dll will already be available on target machines - nothing additional to install
!ELSEIF "$(MSVC_VARIANT)" == "MSVC2002"
# you probably need to tweak this directory if you don't use the professional edition!
MSVCR_DLL=$(PROGRAM_FILES)\Microsoft Visual Studio .NET\Visual Studio .NET Professional - English\msvcr70.dll
!ELSEIF "$(MSVC_VARIANT)" == "DOTNET10"
# no redistributable available for this package!
!ELSEIF "$(MSVC_VARIANT)" == "MSVC2003"
# you probably need to tweak this directory if you don't use the professional edition!
MSVCR_DLL=$(PROGRAM_FILES)\Microsoft Visual Studio .NET 2003\Visual Studio .NET Professional 2003 - English\msvcr71.dll
!ELSEIF "$(MSVC_VARIANT)" == "DOTNET11"
# no redistributable available for this package!
!ELSEIF "$(MSVC_VARIANT)" == "MSVC2005"
MSVCR_DLL=$(PROGRAM_FILES)\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\*.*
!ELSEIF "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20" || "$(MSVC_VARIANT)" == "MSVC2008EE"
# you need to download the redistributable package vcredist_x86.exe from Microsoft first,
# and copy it to the lib folder!!!
VCREDIST_EXE=$(WIRESHARK_LIBS)\vcredist_x86.exe
!ELSEIF "$(MSVC_VARIANT)" == "MSVC2008"
MSVCR_DLL=$(PROGRAM_FILES)\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\*.*
!ELSE
!ERROR MSVC_VARIANT unknown
!ENDIF
##### Advanced: Docbook/XML documentation generation #####
# If you want to generate the Docbook/XML based docs (User's and Developer's
# Guide, ...), you'll need some additional tools / libraries compared to the
# rest of the build process.
#
# FOR DETAILED INSTRUCTIONS TO GENERATE THE DOCS, SEE: docbook\readme.txt.
#
# If you don't call the Makefile.nmake in the docbook dir to generate the
# docs, the following settings in this section will have no effect.
# formatting objects processor executable
# Comment this out if you don't have fop installed or you don't want the docs
# in PDF format.
!IFNDEF FOP
FOP=fop-0.20.5\fop.bat
!ENDIF
# Additional options to fop.
FOP_OPTS=-Xmx256m
# html help compiler
# Comment this out if you don't have hhc.exe or you don't want the docs in
# .chm format.
#
# Beware: hhc.exe is NOT part of the MSVC packages in HHC_DIR mentioned above,
# so you'll need to install the HTML Help Workshop for this.
HHC_EXE="$(HHC_DIR)\hhc.exe"
# html to text converter for text version of release notes, e.g. elinks.
# This could also be "lynx", or "true" if neither elinks nor lynx is installed
# (cygwin: lynx works, elinks not available, links and true doesn't produce output)
#HTML2TXT=elinks -dump -dump-width 72
#HTML2TXT=links -dump -width 72
#HTML2TXT=lynx -dump -width=72 -nolist -stdin
!IFNDEF HTML2TXT
HTML2TXT=$(PYTHON) $(TOOLS_DIR)\html2text.py --width=72 --no-links
!ENDIF
# the XSL processor (part of cygwin's libxslt package)
XSLTPROC="xsltproc"
# the XML validator (part of cygwin's libxml2 package)
XMLLINT="xmllint"
##############################################################################
#
# You should not have to change anything below this comment.
# If you do, it's a deficiency in the Makefile.nmake files;
# either tell wireshark-dev@wireshark.org about it, including
# details of why you had to change it, or fix config.nmake
# and any Makefile.nmake files that need to be changed, and
# send us the patches, along with details of why the change
# was necessary.
#
##############################################################################
#
# The RC_VERSION should be comma-separated, not dot-separated,
# as per Graham Bloice's message in
#
# http://www.ethereal.com/lists/ethereal-dev/200303/msg00283.html
#
# "The RC_VERSION variable in config.nmake should be comma separated.
# This allows the resources to be built correctly and the version
# number to be correctly displayed in the explorer properties dialog
# for the executables, and XP's tooltip, rather than 0.0.0.0."
#
VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_MICRO)$(VERSION_EXTRA)
RC_VERSION=$(VERSION_MAJOR),$(VERSION_MINOR),$(VERSION_MICRO),$(VERSION_BUILD)
WTAP_VERSION=$(WTAP_VERSION_MAJOR).$(WTAP_VERSION_MINOR).$(WTAP_VERSION_MICRO)
RC_WTAP_VERSION=$(WTAP_VERSION_MAJOR),$(WTAP_VERSION_MINOR),$(WTAP_VERSION_MICRO)
GLIB_CFLAGS=/I$(GLIB_DIR)\include\glib-$(GLIB_VERSION) \
/I$(GLIB_DIR)\lib\glib-$(GLIB_VERSION)\include
GCC_GLIB_CFLAGS=-I$(GLIB_DIR)\include\glib-$(GLIB_VERSION) \
-I$(GLIB_DIR)\lib\glib-$(GLIB_VERSION)\include
GLIB_LIBS=$(GLIB_DIR)\lib\glib-$(GLIB_VERSION).lib \
$(GLIB_DIR)\lib\gmodule-$(GLIB_VERSION).lib \
$(GLIB_DIR)\lib\gobject-$(GLIB_VERSION).lib
# GTK+
GTK_CFLAGS=$(GLIB_CFLAGS) /I$(GTK_DIR)\include\gtk-2.0 \
/I$(GTK_DIR)\lib\gtk-2.0\include \
/I$(GTK_DIR)\include\atk-1.0 \
/I$(GTK_DIR)\include\cairo \
/I$(GTK_DIR)\include\pango-1.0
GTK_LIBS=$(GTK_DIR)\lib\gtk-win32-2.0.lib \
$(GTK_DIR)\lib\gdk-win32-2.0.lib \
$(GTK_DIR)\lib\gdk_pixbuf-2.0.lib \
$(GTK_DIR)\lib\pango-1.0.lib \
$(GLIB_LIBS)
!IF "$(GTK_INST_VERSION)" == "2.14"
GTK_LIB_DIR=2.10.0
NEED_LIBPNG_DLL=USE
NEED_LIBJPEG_DLL=USE
NEED_LIBTIFF_DLL=USE
NEED_CAIRO_DLL=USE
GTK_WIMP_DLLSRC_DIR=$(GTK_DIR)\lib\gtk-2.0\2.10.0\engines
GTK_WIMP_DLLDST_DIR=lib\gtk-2.0\2.10.0\engines
GTK_WIMP_RCSRC_DIR=$(GTK_DIR)\share\themes\MS-Windows\gtk-2.0
GTK_WIMP_RCDST_DIR=etc\gtk-2.0
!ELSEIF "$(GTK_INST_VERSION)" == "2.12"
GTK_LIB_DIR=2.10.0
NEED_LIBPNG_DLL=USE
NEED_LIBJPEG_DLL=USE
NEED_LIBTIFF_DLL=USE
NEED_CAIRO_DLL=USE
GTK_WIMP_DLLSRC_DIR=$(GTK_DIR)\lib\gtk-2.0\2.10.0\engines
GTK_WIMP_DLLDST_DIR=lib\gtk-2.0\2.10.0\engines
GTK_WIMP_RCSRC_DIR=$(GTK_DIR)\share\themes\MS-Windows\gtk-2.0
GTK_WIMP_RCDST_DIR=etc\gtk-2.0
!ELSE
!ERROR ? Unknown or invalid GTK_INST_VERSION
!ENDIF
!IF "$(PANGO_INST_VERSION)" == "1.22"
PANGO_LIB_DIR=1.5.0
!ELSEIF "$(PANGO_INST_VERSION)" == "1.18"
PANGO_LIB_DIR=1.5.0
!ELSEIF "$(PANGO_INST_VERSION)" == "1.16"
PANGO_LIB_DIR=1.5.0
!ELSE
!ERROR ? Unknown or invalid PANGO_INST_VERSION
!ENDIF
!IFDEF AIRPCAP_DIR
AIRPCAP_CONFIG=^#define HAVE_AIRPCAP 1
AIRPDCAP_CONFIG=^#define HAVE_AIRPDCAP 1
#AIRPCAP_CFLAGS=/I$(AIRPCAP_DIR)\include
!ELSE
AIRPCAP_CONFIG=
AIRPDCAP_CONFIG=
!ENDIF
!IFDEF PCAP_DIR
# Nmake uses carets to escape special characters
WINPCAP_CONFIG=^#define HAVE_LIBPCAP 1
PCAP_FINDALLDEVS_CONFIG=^#define HAVE_PCAP_FINDALLDEVS 1
PCAP_DATALINK_NAME_TO_VAL_CONFIG=^#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1
PCAP_DATALINK_VAL_TO_NAME_CONFIG=^#define HAVE_PCAP_DATALINK_VAL_TO_NAME 1
# PCAP_BREAKLOOP won't have any benefit on Win32, but breaks compatibility with 3.0
PCAP_BREAKLOOP_CONFIG=
WPCAP_CONSTIFIED_CONFIG=^#define WPCAP_CONSTIFIED 1
!ELSE
# no WpdPack installed
WINPCAP_CONFIG=
PCAP_FINDALLDEVS_CONFIG=
PCAP_DATALINK_NAME_TO_VAL_CONFIG=
PCAP_DATALINK_VAL_TO_NAME_CONFIG=
PCAP_BREAKLOOP_CONFIG=
WPCAP_CONSTIFIED=
!ENDIF
PCAP_LIST_DATALINKS_CONFIG=^#define HAVE_PCAP_LIST_DATALINKS 1
PCAP_SET_DATALINK_CONFIG=^#define HAVE_PCAP_SET_DATALINK 1
!IF DEFINED(PCAP_DIR) && DEFINED(PCAP_REMOTE)
PCAP_HAVE_REMOTE_CONFIG=^#define HAVE_REMOTE 1
PCAP_REMOTE_CONFIG=^#define HAVE_PCAP_REMOTE 1
PCAP_OPEN_CONFIG=^#define HAVE_PCAP_OPEN 1
PCAP_FINDALLDEVS_EX_CONFIG=^#define HAVE_PCAP_FINDALLDEVS_EX 1
PCAP_CREATESRCSTR_CONFIG=^#define HAVE_PCAP_CREATESRCSTR 1
PCAP_SETSAMPLING_CONFIG=^#define HAVE_PCAP_SETSAMPLING 1
!ELSE
PCAP_HAVE_REMOTE_CONFIG=
PCAP_REMOTE_CONFIG=
PCAP_OPEN_CONFIG=
PCAP_FINDALLDEVS_EX_CONFIG=
PCAP_CREATESRCSTR_CONFIG=
PCAP_SETSAMPLING_CONFIG=
!ENDIF
!IFDEF ZLIB_DIR
ZLIB_PATH=$(ZLIB_DIR)
ZLIB_CFLAGS=/I$(ZLIB_DIR)\include
ZLIB_LIBS=$(ZLIB_DIR)\lib\zdll.lib
ZLIB_DLL=$(ZLIB_DIR)\zlib1.dll
# Nmake uses carets to escape special characters
ZLIB_CONFIG=^#define HAVE_LIBZ 1
!else
ZLIB_CFLAGS=
ZLIB_LIBS=
ZLIB_DLL=
ZLIB_CONFIG=
!ENDIF
!IFDEF C_ARES_DIR
!UNDEF ADNS_DIR
C_ARES_CFLAGS=/I$(C_ARES_DIR)
C_ARES_LIBS=$(C_ARES_DIR)\cares.lib
C_ARES_DLL=$(C_ARES_DIR)\cares.dll
# Nmake uses carets to escape special characters
C_ARES_CONFIG=^#define HAVE_C_ARES 1
!else
C_ARES_CFLAGS=
C_ARES_LIBS=
C_ARES_CONFIG=
!IFDEF ADNS_DIR
ADNS_PATH=$(ADNS_DIR)\adns_win32\lib
ADNS_CFLAGS=/I$(ADNS_DIR)\src /I$(ADNS_DIR)\adns_win32
ADNS_LIBS=$(WIRESHARK_LIBS)\$(MSVC_VARIANT)\adns\adns_dll.lib
ADNS_DLL=$(WIRESHARK_LIBS)\$(MSVC_VARIANT)\adns\adns_dll.dll
# Nmake uses carets to escape special characters
ADNS_CONFIG=^#define HAVE_GNU_ADNS 1
!else
ADNS_CFLAGS=
ADNS_LIBS=
ADNS_CONFIG=
!ENDIF # ADNS
!ENDIF # C_ARES
!IFDEF KFW_DIR
KFW_PATH=$(KFW_DIR)\bin
KFW_CFLAGS=/I$(KFW_DIR)\inc
KFW_LIBS=$(KFW_DIR)\lib\krb5_32.lib
# Nmake uses carets to escape special characters
KFW_CONFIG=^#define HAVE_MIT_KERBEROS 1
!else
KFW_CFLAGS=
KFW_LIBS=
KFW_CONFIG=
!ENDIF
!IFDEF PCRE_DIR
PCRE_PATH=$(PCRE_DIR)\bin
PCRE_CFLAGS=/I$(PCRE_DIR)\include
PCRE_LIBS=$(PCRE_DIR)\lib\pcre.lib
# Nmake uses carets to escape special characters
PCRE_CONFIG=^#define HAVE_LIBPCRE 1
!else
PCRE_CFLAGS=
PCRE_LIBS=
PCRE_CONFIG=
!ENDIF
!IFDEF NETTLE_DIR
NETTLE_CFLAGS=/I$(NETTLE_DIR)
NETTLE_LIBS=$(NETTLE_DIR)\libnettle.lib
# Nmake uses carets to escape special characters
NETTLE_CONFIG=^#define HAVE_LIBNETTLE 1
!else
NETTLE_CFLAGS=
NETTLE_LIBS=
NETTLE_CONFIG=
!ENDIF
!IFDEF GNUTLS_DIR
GNUTLS_PATH=$(GNUTLS_DIR)
# /DNOCRYPT avoids inclusion of Wincrypt.h, avoiding a X509_NAME define clash
GNUTLS_CFLAGS=/I$(GNUTLS_DIR)\include /DNOCRYPT /DIMPORT_LIGNUTLSDLL
GNUTLS_LIBS=\
$(GNUTLS_DIR)\bin\libtasn1-3.lib \
$(GNUTLS_DIR)\bin\libgpg-error-0.lib \
$(GNUTLS_DIR)\bin\libgcrypt-11.lib \
$(GNUTLS_DIR)\bin\libgnutls-26.lib
# Nmake uses carets to escape special characters
GNUTLS_CONFIG=^#define HAVE_LIBGNUTLS 1
LIBGCRYPT_CONFIG=^#define HAVE_LIBGCRYPT 1
!else
GNUTLS_CFLAGS=
GNUTLS_LIBS=
GNUTLS_CONFIG=
LIBGCRYPT_CONFIG=
!ENDIF
!IFDEF LUA_DIR
LUA_CFLAGS=/I$(LUA_DIR)\include
LUA_LIBS=$(LUA_DIR)\lua5.1.lib
# Nmake uses carets to escape special characters
LUA_CONFIG=^#define HAVE_LUA 1
LUA_VERSION=^#define HAVE_LUA_5_1 1
!else
LUA_CFLAGS=
LUA_LIBS=
LUA_CONFIG=
!ENDIF
!IFDEF PORTAUDIO_DIR
# Nmake uses carets to escape special characters
PORTAUDIO_CONFIG=^#define HAVE_LIBPORTAUDIO 1
!IF "$(PORTAUDIO_VERSION)" == "18"
# V18 uses API version 1 and v19 API version 2
PORTAUDIO_CFLAGS=/I$(PORTAUDIO_DIR)\pa_common
PORTAUDIO_API_CONFIG=^#define PORTAUDIO_API_1 1
!ELSE
PORTAUDIO_CFLAGS=/I$(PORTAUDIO_DIR)\include /I$(PORTAUDIO_DIR)\src\common /I$(PORTAUDIO_DIR)\src\os\win /DPA_NO_DS /DPA_NO_ASIO
!ENDIF
!ELSE
PORTAUDIO_CFLAGS=
PORTAUDIO_CONFIG=
!ENDIF
!IFDEF HHC_DIR
!IF "$(MSVC_VARIANT)" == "MSVC6"
HHC_CFLAGS=/I"$(HHC_DIR)\include" -DHHC_DIR
HHC_LIBS="$(HHC_DIR)\lib\htmlhelp.lib"
!ELSE
HHC_CFLAGS=-DHHC_DIR
HHC_LIBS=htmlhelp.lib
!ENDIF
!ELSE
HHC_CFLAGS=
HHC_LIBS=
!ENDIF
!IFDEF SMI_DIR
SMI_CONFIG=^#define HAVE_LIBSMI 1
SMI_CFLAGS=/I$(SMI_DIR)\include
SMI_LIBS=$(SMI_DIR)\lib\smi.lib
!ELSE
SMI_LIBS=
SMI_CFLAGS=
SMI_CONFIG=
!ENDIF
!IFDEF GEOIP_DIR
GEOIP_CONFIG=^#define HAVE_GEOIP 1
GEOIP_CFLAGS=/I$(GEOIP_DIR)\libGeoIP
GEOIP_LIBS=$(GEOIP_DIR)\libGeoIP\GeoIP.lib
!ELSE
GeoIP_LIBS=
GeoIP_CFLAGS=
GeoIP_CONFIG=
!ENDIF
!IFDEF ENABLE_LIBWIRESHARK
LIBWIRESHARK_CONFIG=^#define HAVE_LIBWIRESHARKDLL 1
# Link plugins with the import library of libwireshark.dll
LINK_PLUGINS_WITH_LIBWIRESHARK=USE
!ELSE
LIBWIRESHARK_CONFIG=
!ENDIF
# Construct the path
!IFDEF ICONV_DIR
PATH=$(PATH);$(CYGWIN_PATH);$(GLIB_DIR)\bin;$(GETTEXT_DIR)\bin;$(ICONV_DIR)\bin;$(ZLIB_PATH);$(ADNS_PATH)
!ELSE
PATH=$(PATH);$(CYGWIN_PATH);$(GLIB_DIR)\bin;$(GETTEXT_DIR)\bin;$(ZLIB_PATH);$(ADNS_PATH)
!ENDIF
# We can't use a lot of IPv6 code with plain Visual C++ 6.0
!IF "$(MSVC_VARIANT)" == "MSVC6" && !DEFINED(MSSDK)
INET6_CONFIG=
!ELSE
INET6_CONFIG=^#define INET6 1
!ENDIF

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,84 @@
// Can't create link because WS makefile use relative path
cd /pub/dev.wireshark/1.2.6/wireshark-1.2.6/plugins
// Copy GOOSE plugins
cp /mnt/goose/application/tool/wireshark/plugins/octasic octasic
****************************
cd /pub/dev.wireshark/1.2.6/wireshark-1.2.6
Modify file: configure.in
to allow plugin version to related OCTVC1 build version.
- Added
#PPMODIF
#
AC_MSG_CHECKING([whether a TGT_VERSION was specified])
AC_ARG_WITH([version],
AS_HELP_STRING([--with-version=@<:@*@:>@],
[Specify Target version @<:@default=1.3.1@:>@]),
with_version="$withval", with_version="1.3.2")
AC_SUBST(TGT_VERSION, [$with_version])
AC_MSG_RESULT(TGT_VERSION=$TGT_VERSION)
#
AC_MSG_CHECKING([whether OCT_PATH was specified])
AC_ARG_WITH([oct_path],
AS_HELP_STRING([--with-oct_path=@<:@*@:>@],
[Specify Octasic path @<:@default=/mnt/goose@:>@]),
with_oct_path="$withval", with_oct_path="/mnt/goose")
AC_SUBST(OCT_PATH, [$with_oct_path])
AC_MSG_RESULT(OCT_PATH=$OCT_PATH)
#PPMODIF
AFTER:# Check for doxygen
Modify file: configure.in
find AC_OUTPUT=
ADD
plugins/octasic/oct1010db_ws/Makefile
plugins/octasic/octmfa_ws/Makefile
plugins/octasic/octpkt_ws/Makefile
plugins/octasic/octvocnet_ws/Makefile
plugins/octasic/octvc1_ws/Makefile
plugins/octasic/rfc4175_yuv_ws/Makefile
****************************
cd /pub/dev.wireshark/1.2.6/wireshark-1.2.6/plugins
Modify file: Makefile.am
// remove all plugin under
SUBDIRS = $(_CUSTOM_SUBDIRS_) \
// Added
octasic/oct1010db_ws
octasic/octmfa_ws
octasic/octpkt_ws
octasic/octvocnet_ws
octasic/octvc1_ws
octasic/rfc4175_yuv_ws
...
****************************
# For new plugins
cp /pub/dev.wireshark/1.2.6/wireshark-1.2.6/plugins/octasic/octpkt_ws/Makefile.am /pub/dev.wireshark/1.2.6/wireshark-1.2.6/plugins/octasic/newplugi_dir/Makefile.am
cp /pub/dev.wireshark/1.2.6/wireshark-1.2.6/plugins/octasic/octpkt_ws/Makefile.common /pub/dev.wireshark/1.2.6/wireshark-1.2.6/plugins/octasic/newplugi_dir/Makefile.common
..
update file list and pkg name.
****************************
Making Wireshark plugins:
cd /pub/dev.wireshark/1.2.6/wireshark-1.2.6
./autogen.sh
===> OCTVC1 Pkg Version
===> OCTASIC PATH in /mnt/goose
./configure --with-version=1.4.0.1-PR --with-oct_path=/mnt/goose
make install ==> Result is /usr/local/lib/wireshark/plugins/1.2.6

View File

@ -0,0 +1,278 @@
/* $Id: config.h.win32 39537 2011-10-24 18:44:00Z gerald $ */
/* config.h.win32 Generated manually. :-) */
/* config.h. Generated automatically by configure. */
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* Generated Bison and Flex files test whether __STDC__ is defined
in order to check whether to use ANSI C features such as "const".
GCC defines it as 1 even if extensions that render the implementation
non-conformant are enabled; Sun's C compiler (and, I think, other
AT&T-derived C compilers) define it as 0 if extensions that render
the implementation non-conformant are enabled; Microsoft Visual C++
6.0 doesn't define it at all if extensions that render the implementation
non-conformant are enabled.
We define it as 0 here, so that those generated files will use
those features (and thus not get type warnings when compiled with
MSVC++). */
#ifndef __STDC__
#define __STDC__ 0
#endif
/*
* Flex (v 2.5.35) uses this symbol to "exclude" unistd.h
*/
#define YY_NO_UNISTD_H
/* Use Unicode in Windows runtime functions. */
#define UNICODE 1
#define _UNICODE 1
/* Use threads */
#define USE_THREADS 1
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if your processor stores words with the most significant
byte first (like Motorola and SPARC, unlike Intel and VAX). */
/* #undef WORDS_BIGENDIAN */
/* Define if lex declares yytext as a char * by default, not a char[]. */
#define YYTEXT_POINTER 1
#define HAVE_PLUGINS 1
#define USE_THREADS 1
/* #undef HAVE_SA_LEN */
/* #undef HAVE_MKSTEMP */
/* #undef HAVE_MKDTEMP */
#define HAVE_LIBPCAP 1
#define HAVE_PCAP_FINDALLDEVS 1
#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1
#define HAVE_PCAP_DATALINK_VAL_TO_NAME 1
#define HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION 1
#define HAVE_LIBWIRESHARKDLL 1
#define HAVE_PCAP_LIST_DATALINKS 1
#define HAVE_PCAP_FREE_DATALINKS 1
#define HAVE_PCAP_SET_DATALINK 1
#define HAVE_REMOTE 1
#define HAVE_PCAP_REMOTE 1
#define HAVE_PCAP_OPEN 1
#define HAVE_PCAP_OPEN_DEAD 1
#define HAVE_BPF_IMAGE 1
#define HAVE_PCAP_SETSAMPLING 1
#define HAVE_AIRPCAP 1
#define HAVE_AIRPDCAP 1
/* availability of pcap_freecode() is handled at runtime */
#define HAVE_PCAP_FREECODE 1
/* define macro for importing variables from an dll
* it depends on HAVE_LIBWIRESHARKDLL and _NEED_VAR_IMPORT_
*/
#if defined (_NEED_VAR_IMPORT_) && defined (HAVE_LIBWIRESHARKDLL)
# define WS_VAR_IMPORT __declspec(dllimport) extern
#else
# define WS_VAR_IMPORT extern
#endif
/*
* Define WS_MSVC_NORETURN appropriately for declarations of routines that
* never return (just like Charlie on the MTA).
*
* Note that MSVC++ expects __declspec(noreturn) to precede the function
* name and GCC, as far as I know, expects __attribute__((noreturn)) to
* follow the function name, so we need two different flavors of
* noreturn tag.
*/
#define WS_MSVC_NORETURN __declspec(noreturn)
/* Define if you have the gethostbyname2 function. */
/* #undef HAVE_GETHOSTBYNAME2 */
/* Define if you have the getprotobynumber function. */
/* #undef HAVE_GETPROTOBYNUMBER */
/* Define if you have the <arpa/inet.h> header file. */
/* #undef HAVE_ARPA_INET_H */
/* Define if you have the <direct.h> header file. */
#define HAVE_DIRECT_H 1
/* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define if you have the <iconv.h> header file. */
/* #undef HAVE_ICONV */
/* Define if you have the <netdb.h> header file. */
/* #undef HAVE_NETDB_H */
/* Define if you have the <netinet/in.h> header file. */
/* #define HAVE_NETINET_IN_H 1 */
/* Define if you have the <snmp/snmp.h> header file. */
/* #undef HAVE_SNMP_SNMP_H */
/* Define if you have the <snmp/version.h> header file. */
/* #undef HAVE_SNMP_VERSION_H */
/* Define if you have the <stdarg.h> header file. */
#define HAVE_STDARG_H 1
/* Define if you have the <stddef.h> header file. */
/* #undef HAVE_STDDEF_H */
/* Define if you have the <sys/ioctl.h> header file. */
/* #undef HAVE_SYS_IOCTL_H */
/* Define if you have the <sys/socket.h> header file. */
/* #undef HAVE_SYS_SOCKET_H */
/* Define if you have the <sys/sockio.h> header file. */
/* #undef HAVE_SYS_SOCKIO_H */
/* Define if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define if you have the <sys/time.h> header file. */
/* #define HAVE_SYS_TIME_H 1 */
/* Define if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define if you have the <sys/wait.h> header file. */
/* #undef HAVE_SYS_WAIT_H */
/* Define if tm_zone field exists in struct tm */
/* #undef HAVE_TM_ZONE 1 */
/* Define if tzname array exists */
/* #undef HAVE_TZNAME */
/* Define if you have the <unistd.h> header file. */
/* #define HAVE_UNISTD_H 1 */
/* Define if you have the <windows.h> header file. */
#define HAVE_WINDOWS_H 1
/* Define if you have the <winsock2.h> header file. */
#define HAVE_WINSOCK2_H 1
/* Define if <inttypes.h> defines PRI[doxu]64 macros */
/* #define INTTYPES_H_DEFINES_FORMATS */
/* Define if you have the z library (-lz). */
#define HAVE_LIBZ 1
#ifdef HAVE_LIBZ
#define HAVE_INFLATEPRIME 1
#endif
/* Define to use GNU ADNS library */
#define HAVE_C_ARES 1
/* Define to use GNU ADNS library */
#ifndef HAVE_C_ARES
#define ADNS_JGAA_WIN32 1
#endif
/* Define to use the PCRE library */
/* Define to use the Nettle library */
/* Define to use the gnutls library */
#define HAVE_LIBGNUTLS 1
/* Define to use the libgcrypt library */
#define HAVE_LIBGCRYPT 1
/* Define to use mit kerberos for decryption of kerberos/sasl/dcerpc */
#define HAVE_MIT_KERBEROS 1
#ifdef HAVE_MIT_KERBEROS
#define HAVE_KERBEROS
#endif
/* Define to use Lua */
#define HAVE_LUA 1
#define HAVE_LUA_5_1 1
/* Define to use Python */
/* Define to use Portaudio library */
#define HAVE_LIBPORTAUDIO 1
/* Define version of of the Portaudio library API */
/* Define to have SMI */
#define HAVE_LIBSMI 1
/* Define to have GeoIP */
#define HAVE_GEOIP 1
/* Define for IPv6 */
#define INET6 1
/* Define to have ntddndis.h */
#define HAVE_NTDDNDIS_H 1
#define NEED_INET_ATON_H 1
#define NEED_INET_V6DEFS_H 1
#define NEED_STRPTIME_H 1
#ifndef WIN32
#define WIN32 1
#endif
/* Visual C 9 (2008) & Visual C 10 (2010) need these prototypes */
#if _MSC_VER == 1500 || _MSC_VER == 1600
#define NTDDI_VERSION NTDDI_WIN2K
#define _WIN32_WINNT _WIN32_WINNT_WIN2K
#endif
#define strncasecmp strnicmp
#define popen _popen
#define pclose _pclose
/* Define to use GTK */
#define HAVE_GTK
/* Name of package */
#define PACKAGE "wireshark"
/* Version number of package */
#define VERSION "1.6.5"
/* We shouldn't need this under Windows but we'll define it anyway. */
#define HTML_VIEWER "mozilla"
/* Check for the required _MSC_VER */
#if MSC_VER_REQUIRED != _MSC_VER
#define WS_TO_STRING2(x) #x
#define WS_TO_STRING(x) WS_TO_STRING2(x)
#pragma message( "_MSC_VER is:" WS_TO_STRING(_MSC_VER) " but required is:" WS_TO_STRING(MSC_VER_REQUIRED) )
#error Your MSVC_VARIANT setting in config.nmake doesn't match the MS compiler version!
#endif
/* Disable Code Analysis warnings that result in too many false positives. */
/* http://msdn.microsoft.com/en-US/library/zyhb0b82.aspx */
#if _MSC_VER >= 1400
#pragma warning ( disable : 6011 )
#endif
typedef int ssize_t;

View File

@ -0,0 +1,278 @@
/* $Id: config.h.win32 39537 2011-10-24 18:44:00Z gerald $ */
/* config.h.win32 Generated manually. :-) */
/* config.h. Generated automatically by configure. */
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* Generated Bison and Flex files test whether __STDC__ is defined
in order to check whether to use ANSI C features such as "const".
GCC defines it as 1 even if extensions that render the implementation
non-conformant are enabled; Sun's C compiler (and, I think, other
AT&T-derived C compilers) define it as 0 if extensions that render
the implementation non-conformant are enabled; Microsoft Visual C++
6.0 doesn't define it at all if extensions that render the implementation
non-conformant are enabled.
We define it as 0 here, so that those generated files will use
those features (and thus not get type warnings when compiled with
MSVC++). */
#ifndef __STDC__
#define __STDC__ 0
#endif
/*
* Flex (v 2.5.35) uses this symbol to "exclude" unistd.h
*/
#define YY_NO_UNISTD_H
/* Use Unicode in Windows runtime functions. */
#define UNICODE 1
#define _UNICODE 1
/* Use threads */
#define USE_THREADS 1
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if your processor stores words with the most significant
byte first (like Motorola and SPARC, unlike Intel and VAX). */
/* #undef WORDS_BIGENDIAN */
/* Define if lex declares yytext as a char * by default, not a char[]. */
#define YYTEXT_POINTER 1
#define HAVE_PLUGINS 1
#define USE_THREADS 1
/* #undef HAVE_SA_LEN */
/* #undef HAVE_MKSTEMP */
/* #undef HAVE_MKDTEMP */
@HAVE_LIBPCAP@
@HAVE_PCAP_BREAKLOOP@
@HAVE_PCAP_FINDALLDEVS@
@HAVE_PCAP_DATALINK_NAME_TO_VAL@
@HAVE_PCAP_DATALINK_VAL_TO_NAME@
@HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION@
@HAVE_LIBWIRESHARKDLL@
@HAVE_PCAP_LIST_DATALINKS@
@HAVE_PCAP_FREE_DATALINKS@
@HAVE_PCAP_SET_DATALINK@
@HAVE_REMOTE@
@HAVE_PCAP_REMOTE@
@HAVE_PCAP_OPEN@
@HAVE_PCAP_OPEN_DEAD@
@HAVE_BPF_IMAGE@
@HAVE_PCAP_SETSAMPLING@
@HAVE_AIRPCAP@
@HAVE_AIRPDCAP@
@MAIN_MENU_USE_UIMANAGER@
@WANT_PACKET_EDITOR@
/* availability of pcap_freecode() is handled at runtime */
#define HAVE_PCAP_FREECODE 1
/* define macro for importing variables from an dll
* it depends on HAVE_LIBWIRESHARKDLL and _NEED_VAR_IMPORT_
*/
#if defined (_NEED_VAR_IMPORT_) && defined (HAVE_LIBWIRESHARKDLL)
# define WS_VAR_IMPORT __declspec(dllimport) extern
#else
# define WS_VAR_IMPORT extern
#endif
/*
* Define WS_MSVC_NORETURN appropriately for declarations of routines that
* never return (just like Charlie on the MTA).
*
* Note that MSVC++ expects __declspec(noreturn) to precede the function
* name and GCC, as far as I know, expects __attribute__((noreturn)) to
* follow the function name, so we need two different flavors of
* noreturn tag.
*/
#define WS_MSVC_NORETURN __declspec(noreturn)
/* Define if you have the gethostbyname2 function. */
/* #undef HAVE_GETHOSTBYNAME2 */
/* Define if you have the getprotobynumber function. */
/* #undef HAVE_GETPROTOBYNUMBER */
/* Define if you have the <arpa/inet.h> header file. */
/* #undef HAVE_ARPA_INET_H */
/* Define if you have the <direct.h> header file. */
#define HAVE_DIRECT_H 1
/* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define if you have the <iconv.h> header file. */
/* #undef HAVE_ICONV */
/* Define if you have the <netdb.h> header file. */
/* #undef HAVE_NETDB_H */
/* Define if you have the <netinet/in.h> header file. */
/* #define HAVE_NETINET_IN_H 1 */
/* Define if you have the <snmp/snmp.h> header file. */
/* #undef HAVE_SNMP_SNMP_H */
/* Define if you have the <snmp/version.h> header file. */
/* #undef HAVE_SNMP_VERSION_H */
/* Define if you have the <stdarg.h> header file. */
#define HAVE_STDARG_H 1
/* Define if you have the <stddef.h> header file. */
/* #undef HAVE_STDDEF_H */
/* Define if you have the <sys/ioctl.h> header file. */
/* #undef HAVE_SYS_IOCTL_H */
/* Define if you have the <sys/socket.h> header file. */
/* #undef HAVE_SYS_SOCKET_H */
/* Define if you have the <sys/sockio.h> header file. */
/* #undef HAVE_SYS_SOCKIO_H */
/* Define if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define if you have the <sys/time.h> header file. */
/* #define HAVE_SYS_TIME_H 1 */
/* Define if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define if you have the <sys/wait.h> header file. */
/* #undef HAVE_SYS_WAIT_H */
/* Define if tm_zone field exists in struct tm */
/* #undef HAVE_TM_ZONE 1 */
/* Define if tzname array exists */
/* #undef HAVE_TZNAME */
/* Define if you have the <unistd.h> header file. */
/* #define HAVE_UNISTD_H 1 */
/* Define if you have the <windows.h> header file. */
#define HAVE_WINDOWS_H 1
/* Define if you have the <winsock2.h> header file. */
#define HAVE_WINSOCK2_H 1
/* Define if <inttypes.h> defines PRI[doxu]64 macros */
/* #define INTTYPES_H_DEFINES_FORMATS */
/* Define if you have the z library (-lz). */
@HAVE_LIBZ@
#ifdef HAVE_LIBZ
#define HAVE_INFLATEPRIME 1
#endif
/* Define to use GNU ADNS library */
@HAVE_C_ARES@
/* Define to use GNU ADNS library */
#ifndef HAVE_C_ARES
@HAVE_GNU_ADNS@
#define ADNS_JGAA_WIN32 1
#endif
/* Define to use the PCRE library */
@HAVE_PCRE@
/* Define to use the Nettle library */
@HAVE_NETTLE@
/* Define to use the gnutls library */
@HAVE_LIBGNUTLS@
/* Define to use the libgcrypt library */
@HAVE_LIBGCRYPT@
/* Define to use mit kerberos for decryption of kerberos/sasl/dcerpc */
@HAVE_KFW@
#ifdef HAVE_MIT_KERBEROS
#define HAVE_KERBEROS
#endif
/* Define to use Lua */
@HAVE_LUA@
@HAVE_LUA_5_1@
/* Define to use Python */
@HAVE_PYTHON@
/* Define to use Portaudio library */
@HAVE_LIBPORTAUDIO@
/* Define version of of the Portaudio library API */
@PORTAUDIO_API_1@
/* Define to have SMI */
@HAVE_SMI@
/* Define to have GeoIP */
@HAVE_GEOIP@
/* Define for IPv6 */
@INET6@
/* Define to have ntddndis.h */
@HAVE_NTDDNDIS_H@
#define NEED_INET_ATON_H 1
#define NEED_INET_V6DEFS_H 1
#define NEED_STRPTIME_H 1
#ifndef WIN32
#define WIN32 1
#endif
/* Visual C 9 (2008) & Visual C 10 (2010) need these prototypes */
#if _MSC_VER == 1500 || _MSC_VER == 1600
#define NTDDI_VERSION NTDDI_WIN2K
#define _WIN32_WINNT _WIN32_WINNT_WIN2K
#endif
#define strncasecmp strnicmp
#define popen _popen
#define pclose _pclose
/* Define to use GTK */
#define HAVE_GTK
/* Name of package */
#define PACKAGE "wireshark"
/* Version number of package */
#define VERSION "@VERSION@"
/* We shouldn't need this under Windows but we'll define it anyway. */
#define HTML_VIEWER "mozilla"
/* Check for the required _MSC_VER */
#if MSC_VER_REQUIRED != _MSC_VER
#define WS_TO_STRING2(x) #x
#define WS_TO_STRING(x) WS_TO_STRING2(x)
#pragma message( "_MSC_VER is:" WS_TO_STRING(_MSC_VER) " but required is:" WS_TO_STRING(MSC_VER_REQUIRED) )
#error Your MSVC_VARIANT setting in config.nmake doesn't match the MS compiler version!
#endif
/* Disable Code Analysis warnings that result in too many false positives. */
/* http://msdn.microsoft.com/en-US/library/zyhb0b82.aspx */
#if _MSC_VER >= 1400
#pragma warning ( disable : 6011 )
#endif
typedef int ssize_t;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,101 @@
// Can't create link because WS makefile use relative path
cd /pub/dev.wireshark/1.2.6/wireshark-1.2.6/plugins
// Copy GOOSE plugins
cp /mnt/goose/application/tool/wireshark/plugins/octasic octasic
****************************
cd /pub/dev.wireshark/1.2.6/wireshark-1.2.6
Modify file: configure.in
to allow plugin version to related OCTVC1 build version.
- Added
#PPMODIF
#
AC_MSG_CHECKING([whether a TGT_VERSION was specified])
AC_ARG_WITH([version],
AS_HELP_STRING([--with-version=@<:@*@:>@],
[Specify Target version @<:@default=1.3.1@:>@]),
with_version="$withval", with_version="1.3.2")
AC_SUBST(TGT_VERSION, [$with_version])
AC_MSG_RESULT(TGT_VERSION=$TGT_VERSION)
#
AC_MSG_CHECKING([whether OCT_PATH was specified])
AC_ARG_WITH([oct_path],
AS_HELP_STRING([--with-oct_path=@<:@*@:>@],
[Specify Octasic path @<:@default=/mnt/goose@:>@]),
with_oct_path="$withval", with_oct_path="/mnt/goose")
AC_SUBST(OCT_PATH, [$with_oct_path])
AC_MSG_RESULT(OCT_PATH=$OCT_PATH)
#PPMODIF
AFTER:# Check for doxygen
Modify file: configure.in
find AC_OUTPUT=
ADD
plugins/octasic/oct1010db_ws/Makefile
plugins/octasic/octmfa_ws/Makefile
plugins/octasic/octpkt_ws/Makefile
plugins/octasic/rfc4175_yuv_ws/Makefile
octvc1_place_holder
replace
octvc1_place_holder
by
plugins/octasic/vocallo_mgw/octvocnet_ws/Makefile
plugins/octasic/vocallo_mgw/octvc1/Makefile
with ant
****************************
cd /pub/dev.wireshark/1.2.6/wireshark-1.2.6/plugins
Modify file: Makefile.am
// remove all plugin under
SUBDIRS = $(_CUSTOM_SUBDIRS_) \
// Added
octasic/oct1010db_ws
octasic/octmfa_ws
octasic/octpkt_ws
octasic/rfc4175_yuv_ws
octvc1_place_holder
...
replace
octvc1_place_holder
by
plugins/octasic/vocallo_mgw/octvocnet_ws/Makefile
plugins/octasic/vocallo_mgw/octvc1/Makefile
with ant
****************************
# For new plugins
cp /pub/dev.wireshark/1.2.6/wireshark-1.2.6/plugins/octasic/octpkt_ws/Makefile.am /pub/dev.wireshark/1.2.6/wireshark-1.2.6/plugins/octasic/newplugi_dir/Makefile.am
cp /pub/dev.wireshark/1.2.6/wireshark-1.2.6/plugins/octasic/octpkt_ws/Makefile.common /pub/dev.wireshark/1.2.6/wireshark-1.2.6/plugins/octasic/newplugi_dir/Makefile.common
..
update file list and pkg name.
****************************
Making Wireshark plugins:
cd /pub/dev.wireshark/1.2.6/wireshark-1.2.6
./autogen.sh
===> OCTVC1 Pkg Version
===> OCTASIC PATH in /mnt/goose
./configure --with-version=1.4.0.1-PR --with-oct_path=/mnt/goose
make install ==> Result is /usr/local/lib/wireshark/plugins/1.2.6

View File

@ -0,0 +1,54 @@
# Makefile.am
# Automake file for Wireshark plugins
#
# $Id: Makefile.am 27506 2009-02-22 12:01:19Z jake $
#
# Wireshark - Network traffic analyzer
# By Gerald Combs <gerald@wireshark.org>
# Copyright 1998 Gerald Combs
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-include Custom.make
SUBDIRS = $(_CUSTOM_SUBDIRS_) \
asn1 \
docsis \
ethercat \
giop \
gryphon \
irda \
m2m \
mate \
opcua \
profinet \
sercosiii \
stats_tree \
unistim \
wimax \
wimaxasncp
plugindir = @plugindir@
EXTRA_DIST = \
Makefile.nmake
MAINTAINERCLEANFILES = \
Makefile.in
checkapi:
for i in $(SUBDIRS); do \
(cd "$$i"; $(MAKE) checkapi); \
done

View File

@ -0,0 +1,150 @@
# Makefile.nmake
# nmake file for Wireshark plugin
#
# $Id: Makefile.nmake 24520 2008-03-01 12:31:01Z jake $
#
!IF "$(DEBUG)" == "1"
OUT_DIR=Debug_$(TGT_WS_VERSION)
!ELSE
OUT_DIR=Release_$(TGT_WS_VERSION)
!ENDIF
!IFNDEF WS_ROOT
WS_ROOT=../../..
!ENDIF
OUT_PATH=$(OUT_DIR)/
CFLAGS=/DHAVE_CONFIG_H /I$(WIRESHARK_LIBS)/../ $(GLIB_CFLAGS) \
/I $(WS_ROOT)/$(TGT_WS_VERSION)/ \
/I$(OCT_INC) \
/I$(OCT_INC)/octpkt \
!IF EXIST("$(OCT_INC)/octcodec")
/I$(OCT_INC)/octcodec \
!ENDIF
/I$(OCT_INC)/vocallo \
!IF EXIST("$(OCT_INC)/../octmfa_api/include")
/I$(OCT_INC)/../octmfa_api/include \
!ENDIF
/I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
LDFLAGS = $(PLUGIN_LDFLAGS)
!IFDEF ENABLE_LIBWIRESHARK
LINK_PLUGIN_WITH=$(WIRESHARK_LIBS)/../epan/libwireshark.lib
CFLAGS=/DHAVE_WIN32_LIBWIRESHARK_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
!ENDIF
{$(SRC_PATH)}.c{$(OUT_PATH)}.obj::
@$(CC) $(CFLAGS) -Fd$(OUT_PATH) -Fo$(OUT_PATH) -c $<
!IFNDEF DISSECTOR_OBJ_PATH
!IF "$(DEBUG)" == "1"
DISSECTOR_OBJ_PATH = $(DISSECTOR_SRC:source=Debug)
#!ELSE
DISSECTOR_OBJ_PATH = $(DISSECTOR_SRC:source=Release)
!ENDIF
!ENDIF
DISSECTOR_OBJECTS = $(DISSECTOR_OBJ_PATH:.c=.obj)
DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj)
DLL_NAME=$(PLUGIN_NAME)
OBJECTS = $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) $(OUT_PATH)plugin.obj
RESOURCE=$(OUT_PATH)$(PLUGIN_NAME).res
WIRESHARK_PLUGING_DEST_EXIST = 0
!IF EXIST( "$(WIRESHARK_PLUGING_DEST)")
WIRESHARK_PLUGING_DEST_EXIST = 1
!ENDIF
!if defined( NO_TGT_VERSION )
LOCAL_CFLAGS=/DNO_TGT_VERSION=$(NO_TGT_VERSION) $(LOCAL_CFLAGS)
!endif
all: $(OUT_PATH)$(DLL_NAME).dll
$(OUT_DIR) :
@if not exist "$(OUT_DIR)/$(NULL)" mkdir "$(OUT_DIR)"
$(OUT_PATH)$(PLUGIN_NAME).rc :
-@sed -e s/@PLUGIN_NAME@/$(PLUGIN_NAME)/ \
-e s/@RC_MODULE_VERSION@/$(RC_MODULE_VERSION)/ \
-e s/@RC_VERSION@/$(RC_VERSION)/ \
-e s/@MODULE_VERSION@/$(MODULE_VERSION)/ \
-e s/@PACKAGE@/$(PACKAGE)/ \
-e s/@VERSION@/$(VERSION)/ \
-e s/@INTERNAL_NAME@/$(RC_INTERNAL_NAME)/ \
-e s/@MSVC_VARIANT@/$(MSVC_VARIANT)/ \
< $(WS_ROOT)\plugins\octasic\plugin.rc.in > $@
# @copy source\$(PLUGIN_NAME).rc $(OUT_DIR)\$(PLUGIN_NAME).rc
$(OUT_PATH)$(DLL_NAME).dll $(OUT_PATH)$(PLUGIN_NAME).exp $(OUT_PATH)$(DLL_NAME).lib : $(OUT_DIR) $(OBJECTS) $(LINK_PLUGIN_WITH) $(RESOURCE)
@link -dll /out:$(OUT_PATH)$(DLL_NAME).dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS) $(RESOURCE)
#
# Build plugin.c, which contains the plugin version[] string, a
# function plugin_register() that calls the register routines for all
# protocols, and a function plugin_reg_handoff() that calls the handoff
# registration routines for all protocols.
#
# 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
# of a given name (packet-aarp.o -> proto_register_aarp, etc.).
#
# Formatting conventions: The name of the proto_register_* routines an
# proto_reg_handoff_* routines must start in column zero, or must be
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
# 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
# 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
# reason.
#
# Therefore, we have a script to generate the plugin.c file.
# The shell script runs slowly, as multiple greps and seds are run
# for each input file; this is especially slow on Windows. Therefore,
# if Python is present (as indicated by PYTHON being defined), we run
# a faster Python script to do that work instead.
#
# The first argument is the directory in which the source files live.
# The second argument is "plugin", to indicate that we should build
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
#!IFDEF PYTHON
#plugin.c: $(DISSECTOR_SRC) moduleinfo.h ../../tools/make-dissector-reg.py
# @echo Making plugin.c (using python)
# @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(DISSECTOR_SRC)
#!ELSE
#plugin.c: $(DISSECTOR_SRC) moduleinfo.h ../../tools/make-dissector-reg
# @echo Making plugin.c (using sh)
# @$(SH) ../../tools/make-dissector-reg . plugin $(DISSECTOR_SRC)
#!ENDIF
clean:
-@ erase /Q "$(OUT_PATH)\*.*"
install:
! IF $(WIRESHARK_PLUGING_DEST_EXIST)==0
! MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++++++
! MESSAGE Pluging path "$(WIRESHARK_PLUGING_DEST)" does not exist
! MESSAGE Please install WIRESHARK VERSION $(WIRESHARK_RELEASE)
! MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++++++
! ERROR
! ELSE
@del "$(WIRESHARK_PLUGING_DEST)\$(PLUGIN_NAME)*.dll"
@xcopy /Q $(OUT_DIR)\$(DLL_NAME).dll "$(WIRESHARK_PLUGING_DEST)" /Y
! ENDIF
package:
@cd ../packaging/nsis
@$(MAKENSIS) /DVER_MAJOR=$(MODULE_VERSION_MAJOR) /DVER_MINOR=$(MODULE_VERSION_MINOR) /DVER_REVISION=$(MODULE_VERSION_MICRO) /DVER_BUILD=$(MODULE_VERSION_EXTRA) /DTGT_VERSION=$(TGT_VERSION) /DTGT_WS_VERSION=$(TGT_WS_VERSION) octvoc_ws.nsi
@cd $(MAKEDIR)

View File

@ -0,0 +1,67 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: oct_ws_macro.c
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description: Wireshark macro
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Release: Octasic Application Development Framework OCTADF-01.00.01-B497 (2014/01/09)
$Octasic_Revision: 4 $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#ifndef __OCT_WS_MACRO_H__
#define __OCT_WS_MACRO_H__
/***************************** INCLUDE FILES *******************************/
#include <color.h>
#include <color_filters.h>
/***************************** DEFINES **************************************/
#ifndef UNUSED
#ifdef __GNUC__
# define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
#else
# define UNUSED(x) UNUSED_ ## x
#endif
#endif
#ifndef UNUSED_FUNCTION
#ifdef __GNUC__
# define UNUSED_FUNCTION(x) __attribute__((__unused__)) UNUSED_ ## x
#else
# define UNUSED_FUNCTION(x) UNUSED_ ## x
#endif
#endif
#define mWS_RED_COMPONENT(x) (guint16) (((((x) >> 16) & 0xff) * 65535 / 255))
#define mWS_GREEN_COMPONENT(x) (guint16) (((((x) >> 8) & 0xff) * 65535 / 255))
#define mWS_BLUE_COMPONENT(x) (guint16) ( (((x) & 0xff) * 65535 / 255))
#define mWS_FIELDSIZE( type, field) (sizeof(((type *)0)->field))
#define mWS_FIELDOFFSET(type, field) ((guint32)&(((type *)0)->field))
#define mWS_COUNTOF(array) (sizeof(array)/sizeof(array[0]))
#if defined(VERSION_MAJOR) && (VERSION_MAJOR > 1 || (VERSION_MAJOR == 1 && VERSION_MINOR > 8))
#define OCT_MATCH_STRVAL_IDX(a,b,c) try_val_to_str_idx(a,b,c)
#else
#define OCT_MATCH_STRVAL_IDX(a,b,c) match_strval_idx(a,b,c)
#define dissector_add_uint(a,b,c) dissector_add(a,b,c)
#endif
#endif /* __OCT_WS_MACRO_H__ */

View File

@ -0,0 +1,45 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: oct_ws_priv.c
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description: Wireshark private data
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Release: Octasic Application Development Framework OCTADF-01.00.01-B497 (2014/01/09)
$Octasic_Revision: 4 $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#ifndef __OCT_WS_PRIV_H__
#define __OCT_WS_PRIV_H__
/***************************** INCLUDE FILES *******************************/
/***************************** DEFINES **************************************/
typedef struct
{
guint16 total_packet_size;
guint16 pktHdt_size;
guint8 api_type;
guint8 format; /* PktFormat */
guint8 trace_flag;
guint16 padding;
}tOctWsPrivateData;
#endif /* __OCT_WS_PRIV_H__ */

View File

@ -0,0 +1,40 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: oct_ws_version.c
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description: Octasic plugin version
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Release: Octasic Application Development Framework OCTADF-01.00.01-B497 (2014/01/09)
$Octasic_Revision: 4 $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#ifndef __OCT_WS_VERSION_H__
#define __OCT_WS_VERSION_H__
/***************************** INCLUDE FILES *******************************/
/***************************** DEFINES **************************************/
#define NO_TGT_VERSION
/***************************** DEFINES **************************************/
#endif /* __OCT_WS_VERSION_H__ */

View File

@ -0,0 +1,104 @@
# Makefile.am
OCT_INC = $(OCT_PATH)/software/include
INCLUDES = -I$(top_srcdir) -I$(includedir) -I$(OCT_INC) -I$(OCT_INC)/vocallo -I$(OCT_INC)/octpkt
include Makefile.common
#if HAVE_WARNINGS_AS_ERRORS
#AM_CFLAGS = -Werror
#endif
AM_CFLAGS=-DTGT_VERSION=$(TGT_VERSION) -DMODULE_VERSION=$(MODULE_VERSION)
plugindir = @plugindir@
plugin_LTLIBRARIES = octpkt_ws.la
octpkt_ws_la_SOURCES = \
source/plugin.c \
include/moduleinfo.h \
$(DISSECTOR_SRC) \
$(DISSECTOR_INCLUDES)
octpkt_ws_la_LDFLAGS = -module -avoid-version
octpkt_ws_la_LIBADD = @PLUGIN_LIBS@
# Libs must be cleared, or else libtool won't create a shared module.
# If your module needs to be linked against any particular libraries,
# add them here.
LIBS =
#
# Build plugin.c, which contains the plugin version[] string, a
# function plugin_register() that calls the register routines for all
# protocols, and a function plugin_reg_handoff() that calls the handoff
# registration routines for all protocols.
#
# 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
# of a given name (packet-aarp.o -> proto_register_aarp, etc.).
#
# Formatting conventions: The name of the proto_register_* routines an
# proto_reg_handoff_* routines must start in column zero, or must be
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
# 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
# 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
# reason.
#
# Therefore, we have a script to generate the plugin.c file.
# The shell script runs slowly, as multiple greps and seds are run
# for each input file; this is especially slow on Windows. Therefore,
# if Python is present (as indicated by PYTHON being defined), we run
# a faster Python script to do that work instead.
#
# The first argument is the directory in which the source files live.
# The second argument is "plugin", to indicate that we should build
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
plugin.c: $(DISSECTOR_SRC) $(top_srcdir)/tools/make-dissector-reg \
$(top_srcdir)/tools/make-dissector-reg.py
@if test -n "$(PYTHON)"; then \
echo Making plugin.c with python ; \
$(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
plugin $(DISSECTOR_SRC) ; \
else \
echo Making plugin.c with shell script ; \
$(top_srcdir)/tools/make-dissector-reg $(srcdir) \
$(plugin_src) plugin $(DISSECTOR_SRC) ; \
fi
#
# Currently plugin.c can be included in the distribution because
# 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
# variably build something, making plugin.c non-portable, uncomment
# the dist-hook line below.
#
# 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
# to be built when the first "make" is done; however, Automake insists
# on putting *all* source into the distribution.
#
# We work around this by having a "dist-hook" rule that deletes
# "plugin.c", so that "dist" won't pick it up.
#
#dist-hook:
# @rm -f $(distdir)/plugin.c
CLEANFILES = \
octpkt_ws \
*~
MAINTAINERCLEANFILES = \
Makefile.in \
source/plugin.c
EXTRA_DIST = \
Makefile.common \
Makefile.nmake

View File

@ -0,0 +1,40 @@
# Makefile.common for Gryphon plugin
# Contains the stuff from Makefile.am and Makefile.nmake that is
# a) common to both files and
# b) portable between both files
#
# $Id: Makefile.common 27491 2009-02-21 16:33:48Z jake $
#
# Wireshark - Network traffic analyzer
# By Gerald Combs <gerald@wireshark.org>
# Copyright 1998 Gerald Combs
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# the name of the plugin
PLUGIN_NAME = octpkt_ws
# the dissector sources (without any helpers)
DISSECTOR_SRC = \
source/octpkt.c
# corresponding headers
DISSECTOR_INCLUDES =
# Dissector helpers. They're included in the source files in this
# directory, but they're not dissectors themselves, i.e. they're not
# used to generate "plugin.c".
DISSECTOR_SUPPORT_SRC =

View File

@ -0,0 +1,58 @@
# Makefile.nmake
# nmake file for Wireshark plugin
#
# $Id: Makefile.nmake 24520 2008-03-01 12:31:01Z jake $
#
!include ..\..\..\$(TGT_WS_VERSION)\config.nmake
# The name
PACKAGE=octpkt
# The version
!IF "$(MODULE_VERSION_MAJOR)" == ""
MODULE_VERSION_MAJOR=1
!ENDIF
!IF "$(MODULE_VERSION_MINOR)" == ""
MODULE_VERSION_MINOR=0
!ENDIF
!IF "$(MODULE_VERSION_MICRO)" == ""
MODULE_VERSION_MICRO=1
!ENDIF
!IF "$(MODULE_VERSION_EXTRA)" == ""
MODULE_VERSION_EXTRA=0
!ENDIF
#
# The RC_VERSION should be comma-separated, not dot-separated,
# as per Graham Bloice's message in
#
# http://www.ethereal.com/lists/ethereal-dev/200303/msg00283.html
#
# "The RC_VERSION variable in config.nmake should be comma separated.
# This allows the resources to be built correctly and the version
# number to be correctly displayed in the explorer properties dialog
# for the executables, and XP's tooltip, rather than 0.0.0.0."
#
MODULE_VERSION=$(MODULE_VERSION_MAJOR)_$(MODULE_VERSION_MINOR)_$(MODULE_VERSION_MICRO)_$(MODULE_VERSION_EXTRA)
RC_MODULE_VERSION=$(MODULE_VERSION_MAJOR),$(MODULE_VERSION_MINOR),$(MODULE_VERSION_MICRO),$(MODULE_VERSION_EXTRA)
# the name of the plugin
PLUGIN_NAME = octpkt_ws
# the dissector sources (without any helpers)
SRC_PATH=source
DISSECTOR_SRC = source/octpkt.c
!IF "$(TGT_VERSION)" != ""
LOCAL_CFLAGS=/DTGT_VERSION=$(TGT_VERSION) /DMODULE_VERSION=$(MODULE_VERSION) $(LOCAL_CFLAGS)
RC_INTERNAL_NAME="Base on $(PACKAGE) version $(TGT_VERSION)"
!ELSE
LOCAL_CFLAGS=/DMODULE_VERSION=$(MODULE_VERSION) $(LOCAL_CFLAGS)
RC_INTERNAL_NAME="Base on $(PACKAGE) version $(MODULE_VERSION)"
!ENDIF
include ..\MakeRules.nmake

View File

@ -0,0 +1,56 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: moduleinfo.h
$Octasic_Copyright: $
Description: Included *after* config.h, in order to re-define these macros
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
$Octasic_Release: $
$Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#include "../../include/oct_ws_version.h"
#ifdef PACKAGE
#undef PACKAGE
#endif
/* Name of package */
#define PACKAGE "octpkt"
#ifdef VERSION
#undef VERSION
#endif
#ifndef MODULE_VERSION
#define MODULE_VERSION 0_0_1_DEV
#endif
#define _QUOTEME(x) #x
#define QUOTEME(x) _QUOTEME(x)
/* Version number of package */
/* WAS : #if !defined( TGT_VERSION ) || (TGT_VERSION == 0) but TGT_VERSION may be a string ... can't compare */
#if defined( NO_TGT_VERSION )
#define VERSION QUOTEME(MODULE_VERSION)
#else
#define VERSION QUOTEME(MODULE_VERSION-TGT_VERSION)
#endif

View File

@ -0,0 +1,34 @@
#include "winver.h"
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,1,0
PRODUCTVERSION 1,0,1,0
FILEFLAGSMASK 0x0L
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0
#endif
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_DLL
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Octasic, http://www.octasic.com/\0"
VALUE "FileDescription", "octpkt dissector\0"
VALUE "FileVersion", "1.0.1.2\0"
VALUE "InternalName", "Base on OCTVC1 1.3.0.x-PR\0"
VALUE "LegalCopyright", "Copyright © 2009 Octasic\0"
VALUE "OriginalFilename", "octpkt.dll\0"
VALUE "ProductName", "Wireshark\0"
VALUE "ProductVersion", "1.0.1\0"
VALUE "Comments", "Build with MSVC6\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END

View File

@ -0,0 +1,265 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: octpkt.c
$Octasic_Copyright: $
Description:
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
$Octasic_Release: $
$Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <epan/packet.h>
#include <epan/prefs.h>
#include <epan/expert.h>
#include "../include/moduleinfo.h"
#include "../../include/oct_ws_macro.h"
#include "../../include/oct_ws_priv.h"
#include <color.h>
#include <color_filters.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gmodule.h>
#include <octpkt_hdr.h>
/* Define version if we are not building Wireshark statically */
/* Initialize the protocol and registered fields */
static int proto_octpkt = -1;
static int hf_octpkt_format = -1;
static int hf_octpkt_trace_flag = -1;
static int hf_octpkt_api_type = -1;
static int hf_octpkt_size = -1;
static dissector_handle_t data_handle;
static dissector_handle_t vocallonet_handle;
static dissector_handle_t octmfa_handle;
/* fields defining a subtree */
static gint ett_octpkt = -1;
const value_string octpkt_api_type_vals[] =
{
{ cOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM_OCTVOCNET, "OCTVOCNET" },
{ cOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM_OCTMFA, "OCTMFA" },
{ 0, NULL },
};
#define OCTPKT_TRACE_BIT(octet) ((octet) & 0x80)
#define OCTPKT_TOTAL_PACKET_SIZE(uint16) ((uint16) & 0x07ff)
#define OCTPKT_API_TYPE(octet) (((octet) & 0x78) >> 3 )
/*************************************************************************
*
* Code to actually dissect the Vocallo common packet header
*
**************************************************************************/
static void dissect_octpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_item* ti = NULL;
proto_tree* octpkt_tree = NULL;
unsigned int offset = 0;
gboolean trace_flag;
guint32 format_trace_proto_len = 0;
tOctWsPrivateData *pPrivData;
/* Make entries in Protocol column and Info column on summary display */
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "OCTPKT_FORMAT" );
if( pinfo->private_data == NULL )
pinfo->private_data = ep_alloc( sizeof( tOctWsPrivateData ) );
pPrivData = (tOctWsPrivateData *)pinfo->private_data;
format_trace_proto_len = tvb_get_ntohl( tvb, offset );
offset += sizeof(format_trace_proto_len);
/* Get the format field [bit 24 to 31] */
pPrivData->format = (format_trace_proto_len & cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_FORMAT ) >> cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_FORMAT_BIT_OFFSET;
trace_flag = (format_trace_proto_len & cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_TRACE ) >> cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_TRACE_BIT_OFFSET;
pPrivData->api_type = (format_trace_proto_len & cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_CONTROL_PROTOCOL_TYPE ) >> cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_CONTROL_PROTOCOL_TYPE_BIT_OFFSET;
pPrivData->total_packet_size = (format_trace_proto_len & cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_LENGTH ) >> cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_LENGTH_BIT_OFFSET;
pPrivData->pktHdt_size = offset;
pPrivData->trace_flag = trace_flag;
if( pPrivData->total_packet_size < 46 )
pPrivData->padding = 46 - pPrivData->total_packet_size;
else
pPrivData->padding = 0;
/* Add summary display for the Vocallonet packet */
if ( check_col( pinfo->cinfo, COL_INFO) )
{
col_add_fstr( pinfo->cinfo, COL_INFO,
"Format=%d, Size=%u bytes%s",
pPrivData->format,
pPrivData->total_packet_size,
pPrivData->trace_flag ? ", Trace" : "");
}
if ( tree )
{
/* create display subtree for the protocol */
ti = proto_tree_add_item( tree, proto_octpkt, tvb, 0, offset, FALSE );
octpkt_tree = proto_item_add_subtree(ti, ett_octpkt);
/* Scroll back to the beginning of the header*/
offset -= sizeof(format_trace_proto_len);
/* add the VocalloNet common fields to the UI */
proto_tree_add_uint( octpkt_tree, hf_octpkt_format, tvb,
offset, 1, format_trace_proto_len );
offset++;
proto_tree_add_boolean( octpkt_tree, hf_octpkt_trace_flag, tvb,
offset, 1, format_trace_proto_len );
offset++;
proto_tree_add_uint( octpkt_tree, hf_octpkt_api_type, tvb,
offset, 1, format_trace_proto_len );
proto_tree_add_uint( octpkt_tree, hf_octpkt_size, tvb,
offset, 2, format_trace_proto_len );
offset+=2;
}
if (tvb_reported_length_remaining(tvb, offset) > 0)
{
tvb = tvb_new_subset(tvb, offset, -1, -1);
switch( pPrivData->api_type )
{
case cOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM_OCTVOCNET:
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "OCTVOCNET" );
if( vocallonet_handle )
call_dissector(vocallonet_handle, tvb, pinfo, tree);
else
call_dissector(data_handle, tvb, pinfo, tree);
break;
case cOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM_OCTMFA:
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "OCTMFA" );
if( octmfa_handle )
call_dissector(octmfa_handle, tvb, pinfo, tree);
else
call_dissector(data_handle, tvb, pinfo, tree);
break;
default:
/* Dump the rest in raw format */
call_dissector(data_handle, tvb, pinfo, tree);
break;
}
}
}
/*************************************************************************
*
* Code to register the protocol with Wireshark
*
**************************************************************************/
void proto_register_octpkt(void)
{
/* Setup list of header fields */
static hf_register_info hf_octpkt[] =
{
{ &hf_octpkt_format,
{ "Format", "octpkt.format",
FT_UINT32, BASE_HEX, NULL, 0xff000000,
"Packet format", HFILL }
},
{ &hf_octpkt_trace_flag,
{ "Trace", "octpkt.trace_flag",
FT_BOOLEAN, 32, NULL, 0x00800000,
"Debug trace flag", HFILL }
},
{ &hf_octpkt_api_type,
{ "API Type", "octpkt.api_type",
FT_UINT32, BASE_HEX, VALS(octpkt_api_type_vals), 0x00007800,
"API Type", HFILL }
},
{ &hf_octpkt_size,
{ "Size", "octpkt.size_in_bytes",
FT_UINT32, BASE_DEC, NULL, 0x000007ff,
"Total bit length", HFILL }
}
};
/* Setup protocol subtree array */
static gint* ett[] =
{
&ett_octpkt,
};
/* Register the protocol name and description */
proto_octpkt = proto_register_protocol( "OCTPKT Packets", "Octasic Packets", "octpkt");
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array( proto_octpkt, hf_octpkt, array_length(hf_octpkt) );
proto_register_subtree_array(ett, array_length(ett));
}
/*************************************************************************
*
* If this dissector uses sub-dissector registration add a registration routine.
* This format is required because a script is used to find these routines and
* create the code that calls these routines.
*
**************************************************************************/
void proto_reg_handoff_octpkt(void)
{
dissector_handle_t octpkt_handle;
data_handle = find_dissector("data");
vocallonet_handle = find_dissector("vocallonet");
octmfa_handle = find_dissector("octmfa");
octpkt_handle = create_dissector_handle(dissect_octpkt, proto_octpkt);
dissector_add_uint("ethertype", cOCTPKT_HDR_ETHERTYPE, octpkt_handle);
}

View File

@ -0,0 +1,62 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: plugin.c
$Octasic_Copyright: $
Description:
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
$Octasic_Release: $
$Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <gmodule.h>
#include "../include/moduleinfo.h"
#ifndef ENABLE_STATIC
#if defined(VERSION_MAJOR) && (VERSION_MAJOR > 1 || (VERSION_MAJOR == 1 && VERSION_MINOR > 8))
#define WS_BUILD_DLL
#include "ws_symbol_export.h"
#define WS_EXPORT WS_DLL_PUBLIC_NOEXTERN
#else
#define WS_EXPORT G_MODULE_EXPORT
#endif
WS_EXPORT const gchar version[] = VERSION;
/* Start the functions we need for the plugin stuff */
WS_EXPORT void
plugin_register (void)
{
{extern void proto_register_octpkt (void); proto_register_octpkt ();}
}
WS_EXPORT void
plugin_reg_handoff(void)
{
{extern void proto_reg_handoff_octpkt (void); proto_reg_handoff_octpkt ();}
}
#endif

View File

@ -0,0 +1,24 @@
# Makefile.nmake
# nmake file for Wireshark plugins
DEV_ROOT=../../../../../../..
WS_ROOT=../../../..
all: setup_m
@cd "octvc1"
@$(MAKE) /NOLOGO /$(MAKEFLAGS) -f makefile.nmake
@cd $(MAKEDIR)
clean: setup_m
@cd "octvc1"
@$(MAKE) /NOLOGO /$(MAKEFLAGS) -f makefile.nmake clean
@cd $(MAKEDIR)
install: setup_m
@cd "octvc1"
@$(MAKE) /NOLOGO /$(MAKEFLAGS) -f makefile.nmake install
@cd $(MAKEDIR)
setup_m:
@SET WS_ROOT=$(WS_ROOT)
@SET DEV_ROOT=$(DEV_ROOT)

View File

@ -0,0 +1,25 @@
!IFNDEF TGT_WS_VERSION
#Try to find Wireshark version
WS_APP_PLUGIN=$(PROGRAMFILES)/wireshark/plugins/
!IF EXIST("$(WS_APP_PLUGIN)/1.2.6")
TGT_WS_VERSION=1.2.6
!ENDIF
!IF EXIST("$(WS_APP_PLUGIN)/1.6.5")
TGT_WS_VERSION=1.6.5
!ENDIF
!ENDIF
all: setup_v
@echo +++++++++++++++++++++++++++++++++++++++++++++
@echo Building Wireshark Smoke Test App $(TGT_WS_VERSION)
@echo +++++++++++++++++++++++++++++++++++++++++++++
@$(MAKE) /NOLOGO /$(MAKEFLAGS) -f MakeSmokeApp.nmake
clean: setup_v
@echo +++++++++++++++++++++++++++++++++++++++++++++
@echo Cleaning Wireshark Smoke Test App $(TGT_WS_VERSION)
@echo +++++++++++++++++++++++++++++++++++++++++++++
@$(MAKE) /NOLOGO /$(MAKEFLAGS) -f MakeSmokeApp.nmake clean
!include ..\..\..\..\oasis\makefile\version.nmake

View File

@ -0,0 +1,96 @@
# Makefile.nmake
# nmake file for Wireshark plugin
#
# $Id: Makefile.nmake 24520 2008-03-01 12:31:01Z jake $
#
SRC_PATH=smoke_test
SMOKE_SRC = $(SRC_PATH)/ws_smoke.c
DEV_ROOT=../../../../../../..
!include ..\..\..\..\$(TGT_WS_VERSION)\config.nmake
!include <win32.mak>
# The name
PACKAGE=octvc1
# The version
!IF "$(MODULE_VERSION_MAJOR)" == ""
MODULE_VERSION_MAJOR=1
!ENDIF
!IF "$(MODULE_VERSION_MINOR)" == ""
MODULE_VERSION_MINOR=0
!ENDIF
!IF "$(MODULE_VERSION_MICRO)" == ""
MODULE_VERSION_MICRO=1
!ENDIF
!IF "$(MODULE_VERSION_EXTRA)" == ""
MODULE_VERSION_EXTRA=0
!ENDIF
LINK= link
#
# The RC_VERSION should be comma-separated, not dot-separated,
# as per Graham Bloice's message in
#
# http://www.ethereal.com/lists/ethereal-dev/200303/msg00283.html
#
# "The RC_VERSION variable in config.nmake should be comma separated.
# This allows the resources to be built correctly and the version
# number to be correctly displayed in the explorer properties dialog
# for the executables, and XP's tooltip, rather than 0.0.0.0."
#
MODULE_VERSION=$(MODULE_VERSION_MAJOR)_$(MODULE_VERSION_MINOR)_$(MODULE_VERSION_MICRO)_$(MODULE_VERSION_EXTRA)
RC_MODULE_VERSION=$(MODULE_VERSION_MAJOR),$(MODULE_VERSION_MINOR),$(MODULE_VERSION_MICRO),$(MODULE_VERSION_EXTRA)
# the name of the plugin
PLUGIN_NAME = octvc1_ws
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
# the dissector sources (without any helpers)
#include ..\MakeRules.nmake
!IF "$(DEBUG)" == "1"
OUT_DIR=Debug_Smoke_$(TGT_WS_VERSION)
!ELSE
OUT_DIR=Release_Smoke_$(TGT_WS_VERSION)
!ENDIF
OUT_PATH=$(OUT_DIR)/
CFLAGS=/DHAVE_CONFIG_H /I$(WIRESHARK_LIBS)/../ $(GLIB_CFLAGS) \
$(cflags) \
$(LOCAL_CFLAGS) \
/I ../../ \
/I$(OCT_INC)/vocallo \
/I$(PCAP_DIR)\include -D_U_=""
CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
SMOKE_OBJECTS = $(SMOKE_OBJ_PATH:.c=.obj)
OBJECTS = $(SMOKE_OBJECTS)
{$(SRC_PATH)}.c{$(OUT_PATH)}.obj::
@$(CC) $(CFLAGS) -Fd$(OUT_PATH) -Fo$(OUT_PATH) -c $<
all: octvc1.pcap
tshark_test: octvc1.pcap
@echo *** Testing Wirershark transformation for $(PACKAGE) package ***
@"$(WS_INSTALL_PATH:/=\)\tshark" -r octvc1.pcap -n -V > octvc1_ws.txt
octvc1.pcap : $(OUT_PATH)ws_smoke.exe
$(OUT_PATH:/=\)ws_smoke.exe octvc1.pcap
$(OUT_PATH)ws_smoke.exe : $(OUT_DIR) $(OBJECTS)
@echo Linking $@
@$(LINK) /out:$(OUT_PATH)ws_smoke.exe $(conflags) $(conlibsdll) /SUBSYSTEM:console $(OBJECTS)
$(OUT_DIR) :
@if not exist "$(OUT_DIR)/$(NULL)" mkdir "$(OUT_DIR)"
clean:
-@ erase /Q "$(OUT_PATH)\*.*"

View File

@ -0,0 +1,103 @@
# Makefile.am
OCT_INC = $(OCT_PATH)/software/include
INCLUDES = -I$(top_srcdir) -I$(includedir) -I$(OCT_INC) -I$(OCT_INC)/vocallo -I$(OCT_INC)/octpkt
include Makefile.common
AM_CFLAGS=-DTGT_VERSION=$(TGT_VERSION) -DMODULE_VERSION=$(MODULE_VERSION)
plugindir = @plugindir@
plugin_LTLIBRARIES = octvc1_ws.la
octvc1_ws_la_SOURCES = \
source/plugin.c \
source/octvc1_msg_ctrl.c \
source/octvc1_plugin.c \
source/octvc1_msg_event.c \
source/ws_util.c \
include/plugin_info.h \
$(DISSECTOR_SRC) \
$(DISSECTOR_INCLUDES)
octvc1_ws_la_LDFLAGS = -module -avoid-version
octvc1_ws_la_LIBADD = @PLUGIN_LIBS@
# Libs must be cleared, or else libtool won't create a shared module.
# If your module needs to be linked against any particular libraries,
# add them here.
LIBS =
#
# Build plugin.c, which contains the plugin version[] string, a
# function plugin_register() that calls the register routines for all
# protocols, and a function plugin_reg_handoff() that calls the handoff
# registration routines for all protocols.
#
# 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
# of a given name (packet-aarp.o -> proto_register_aarp, etc.).
#
# Formatting conventions: The name of the proto_register_* routines an
# proto_reg_handoff_* routines must start in column zero, or must be
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
# 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
# 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
# reason.
#
# Therefore, we have a script to generate the plugin.c file.
# The shell script runs slowly, as multiple greps and seds are run
# for each input file; this is especially slow on Windows. Therefore,
# if Python is present (as indicated by PYTHON being defined), we run
# a faster Python script to do that work instead.
#
# The first argument is the directory in which the source files live.
# The second argument is "plugin", to indicate that we should build
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
plugin.c: $(DISSECTOR_SRC) $(top_srcdir)/tools/make-dissector-reg \
$(top_srcdir)/tools/make-dissector-reg.py
@if test -n "$(PYTHON)"; then \
echo Making plugin.c with python ; \
$(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
plugin $(DISSECTOR_SRC) ; \
else \
echo Making plugin.c with shell script ; \
$(top_srcdir)/tools/make-dissector-reg $(srcdir) \
$(plugin_src) plugin $(DISSECTOR_SRC) ; \
fi
#
# Currently plugin.c can be included in the distribution because
# 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
# variably build something, making plugin.c non-portable, uncomment
# the dist-hook line below.
#
# 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
# to be built when the first "make" is done; however, Automake insists
# on putting *all* source into the distribution.
#
# We work around this by having a "dist-hook" rule that deletes
# "plugin.c", so that "dist" won't pick it up.
#
#dist-hook:
# @rm -f $(distdir)/plugin.c
CLEANFILES = \
octvc1_ws \
*~
MAINTAINERCLEANFILES = \
Makefile.in \
plugin.c
EXTRA_DIST = \
Makefile.common \
Makefile.nmake

View File

@ -0,0 +1,16 @@
# Makefile.common
# Use by Makefile.am to create Wireshark plugins on Linux environment
DISSECTOR_SRC= \
source/octdev_common.c \
source/octpkt_common.c \
source/octvocnet_common.c \
source/octvc1_common.c \
source/octvc1_module_ctrl.c \
source/octvc1_module_main.c \
source/octvc1_module_gsm.c \
source/octvc1_module_cpp.c \
source/octvc1_module_net.c \
source/octvc1_cid_eid_value_string.c
PLUGIN_NAME=octvc1_ws

View File

@ -0,0 +1,59 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: module.h
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description: Wireshark module
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Release: Octasic Application Development Framework OCTADF-01.00.01-B497 (2014/01/09)
$Octasic_Revision: 4 $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#ifndef __MODULE_H__
#define __MODULE_H__
/***************************** INCLUDE FILES *******************************/
#include <epan/packet.h>
#include "ws_util.h"
/***************************** INCLUDES *************************************/
/***************************** DEFINES **************************************/
typedef struct
{
const char *pszModuleName;
const value_string *apCodeIdValueString;
const value_string *apEvtIdValueString;
const value_string *apSupIdValueString;
tregister_dissector_fnc Register_fnc;
tmodule_dissector_fnc Dissector_fnc;
const value_string *apPrivateCodeIdValueString;
const value_string *apPrivateEvtIdValueString;
}tModuleColInfo;
extern const value_string vals_OCTVC1_module_UID[];
extern tModuleColInfo aOCTVC1ModuleColInfo[];
extern int proto_octvc1_ctrl;
/***************************** PROTO **************************************/
void ws_register_dissector_module(void);
#endif /* __MODULE_H__ */

View File

@ -0,0 +1,43 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: octdev_common.h
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description: Contain the wireshark module dissector related functions
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
$Octasic_Release: $
$Octasic_Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
/***************************** INCLUDE FILES *******************************/
#ifndef _OCTDEV_COMMON_H__
#define _OCTDEV_COMMON_H__
#include <epan/packet.h>
/****************************************************************************
COMMON API ENUMERATION STRING VALUES
****************************************************************************/
extern const value_string vals_tOCT_BOOL32[];
extern const value_string vals_tOCTDEV_IP_VERSION_ENUM[];
extern const value_string vals_tOCTDEV_DEVICES_TYPE_ENUM[];
extern const value_string vals_tOCTDEV_DEVICES_DSP_CORE_TYPE_ENUM[];
#endif /* _OCTDEV_COMMON_H__ */

View File

@ -0,0 +1,42 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: octpkt_common.h
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description: Contain the wireshark module dissector related functions
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
$Octasic_Release: $
$Octasic_Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
/***************************** INCLUDE FILES *******************************/
#ifndef _OCTPKT_COMMON_H__
#define _OCTPKT_COMMON_H__
#include <epan/packet.h>
/****************************************************************************
COMMON API ENUMERATION STRING VALUES
****************************************************************************/
extern const value_string vals_tOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK[];
extern const value_string vals_tOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM[];
extern const value_string vals_tOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK[];
#endif /* _OCTPKT_COMMON_H__ */

View File

@ -0,0 +1,101 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: octvc1_common.h
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description: Contain the wireshark module dissector related functions
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Release: Octasic Application Development Framework OCTADF-01.00.01-B497 (2014/01/09)
$Octasic_Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
/***************************** INCLUDE FILES *******************************/
#ifndef _OCTVC1_COMMON_H__
#define _OCTVC1_COMMON_H__
#include <epan/packet.h>
#include "octdev_common.h"
#include "octpkt_common.h"
#include "octvocnet_common.h"
/****************************************************************************
COMMON API ENUMERATION STRING VALUES
****************************************************************************/
extern const value_string vals_tOCTVC1_OBJECT_CURSOR_ENUM[];
extern const value_string vals_tOCTVC1_BUFFER_FORMAT_ENUM[];
extern const value_string vals_tOCTVC1_BUFFER_FORMAT_MAIN_ENUM[];
extern const value_string vals_tOCTVC1_ETH_PORT_ID_ENUM[];
extern const value_string vals_tOCTVC1_IP_VERSION_ENUM[];
extern const value_string vals_tOCTVC1_VLAN_PROTOCOL_ID_ENUM[];
extern const value_string vals_tOCTVC1_MSG_FLAGS_MASK[];
extern const value_string vals_tOCTVC1_LOG_TYPE_ENUM[];
extern const value_string vals_tOCTVC1_LOG_LEVEL_ENUM[];
extern const value_string vals_tOCTVC1_LOG_TRACE_MASK[];
extern const value_string vals_tOCTVC1_FILE_TYPE_ENUM[];
extern const value_string vals_tOCTVC1_FILE_FORMAT_ENUM[];
/****************************************************************************
COMMON API DISSECTOR
****************************************************************************/
extern unsigned int dissect_tOCTVC1_CURSOR_HANDLE_GET(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue );
extern unsigned int dissect_tOCTVC1_CURSOR_HANDLE_GET_HANDLE(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue );
extern unsigned int dissect_tOCTVC1_CURSOR_HANDLE_GET_HANDLE_OBJECT(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue );
extern unsigned int dissect_tOCTVC1_CURSOR_HANDLE_GET_SUB_OBJECT_ID(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue );
extern unsigned int dissect_tOCTVC1_CURSOR_HANDLE_OBJECT_GET(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue );
extern unsigned int dissect_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue );
extern unsigned int dissect_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue );
extern unsigned int dissect_tOCTVC1_CURSOR_INDEX_GET(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue );
extern unsigned int dissect_tOCTVC1_VLAN_TAG(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue );
extern unsigned int dissect_tOCTVC1_VLAN_HEADER_INFO(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue );
extern unsigned int dissect_tOCTVC1_LIST_HANDLE_GET(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue );
extern unsigned int dissect_tOCTVC1_LIST_HANDLE_GET_SUB_OBJECT_ID(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue );
extern unsigned int dissect_tOCTVC1_LIST_HANDLE_OBJECT_GET(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue );
extern unsigned int dissect_tOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue );
extern unsigned int dissect_tOCTVC1_LIST_INDEX_GET(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue );
extern unsigned int dissect_tOCTVC1_MSG_HEADER(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue );
extern unsigned int dissect_tOCTVC1_EVENT_HEADER(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue );
extern unsigned int dissect_tOCTVC1_LOG_HEADER(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue );
extern unsigned int dissect_tOCTVC1_FILE_HEADER(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue );
extern unsigned int dissect_tOCTVC1_HANDLE(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue );
/****************************************************************************
COMMON USER REGISTATION
****************************************************************************/
void ws_register_OCTVC1_common(void);
#define cOCTVC1_PRIVATE_ID_STRING "unknowned_private"
#define cOCTVC1_UNKNOWN_STRING "Unknown"
#define cOCTVC1_GOD_USER "oct-super-user"
#define cOCTVC1_GOD_USER_ID "octsu98asic"
#define cOCTVC1_PRIVATE_VISIBILITY_USER "oct-dev"
#ifdef OCT_DECLARE_COMMON
gchar* aOCTVC1_user_list[][2] = {
{ "oct-dev","octdev98asic"},
{ "feature-spec","feature-psw"},
{ "company","company-psw"},
{ "company-2","company-2-psw"},
{NULL,NULL}
};
#else
gchar* aOCTVC1_user_list[][2];
#endif /* OCT_DECLARE_COMMON */
extern const gchar* octvc1_chck_private( guint32 f_event_id_code, const value_string *f_PrivateApi, gint32 * f_piRegistered );
#endif /* _OCTVC1_COMMON_H__ */

View File

@ -0,0 +1,41 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: octvocnet_common.h
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description: Contain the wireshark module dissector related functions
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Release: Octasic Application Development Framework OCTADF-01.00.01-B497 (2014/01/09)
$Octasic_Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
/***************************** INCLUDE FILES *******************************/
#ifndef _OCTVOCNET_COMMON_H__
#define _OCTVOCNET_COMMON_H__
#include <epan/packet.h>
/****************************************************************************
COMMON API ENUMERATION STRING VALUES
****************************************************************************/
extern const value_string vals_tOCTVOCNET_PKT_CONTROL_PROTOCOL_TYPE_ENUM[];
extern const value_string vals_tOCTVOCNET_PKT_D_TYPE_ENUM[];
#endif /* _OCTVOCNET_COMMON_H__ */

View File

@ -0,0 +1,77 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: plugin_info.h
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description: Wireshark plugin common
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Release: Octasic Application Development Framework OCTADF-01.00.01-B497 (2014/01/09)
$Octasic_Revision: 4 $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#ifndef __PLUGIN_INFO_H__
#define __PLUGIN_INFO_H__
/***************************** INCLUDES *************************************/
#include <epan/packet.h>
#include "../../../include/oct_ws_version.h"
#include "../../../include/oct_ws_macro.h"
/***************************** DEFINES **************************************/
#ifdef PACKAGE
#undef PACKAGE
#endif
/* Name of package */
#define PACKAGE "OCTVC1"
#ifdef VERSION
#undef VERSION
#endif
#ifndef MODULE_VERSION
#define MODULE_VERSION 0_0_1_DEV
#endif
#define _QUOTEME(x) #x
#define QUOTEME(x) _QUOTEME(x)
/* Version number of package */
/* WAS : #if !defined( TGT_VERSION ) || (TGT_VERSION == 0) but TGT_VERSION may be a string ... can't compare */
#if defined( NO_TGT_VERSION )
#define VERSION QUOTEME(MODULE_VERSION)
#else
#define VERSION QUOTEME(MODULE_VERSION-TGT_VERSION)
#endif
/***************************** VARIABLE ***********************************/
extern dissector_handle_t data_handle;
/***************************** PROTO **************************************/
void proto_register_octvc1_ctrl(void);
void proto_register_octvc1_event(void);
#endif /* __PLUGIN_INFO_H__ */

View File

@ -0,0 +1,78 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: oct_ws_util.h
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description: Wireshark utility
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Release: Octasic Application Development Framework OCTADF-01.00.01-B497 (2014/01/09)
$Octasic_Revision: 4 $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#ifndef __OCT_WS_UTIL_H__
#define __OCT_WS_UTIL_H__
/***************************** INCLUDE FILES *******************************/
#include <epan/packet.h>
/***************************** DEFINES **************************************/
typedef int ( * tmodule_dissector_fnc )( guint8 message_type, guint32 CID, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree );
typedef int ( * tCID_dissector_fnc )( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset );
typedef void ( * tregister_dissector_fnc )( void );
typedef struct
{
gint ett;
int proto;
}tWS_ENTITY_HANDLE;
typedef struct
{
char *pszValue;
int lValue;
}tWS_EXTRA_VALUE;
extern int hf_octvc1_msg_cmd;
extern int hf_octvc1_msg_rsp;
extern int hf_octvc1_msg_evt;
extern gint ett_octvc1_msg_type;
/***************************** PROTO **************************************/
extern void ws_dissector_not_registered(void);
extern int ws_dissector_module_notimplemented( guint8 message_type, guint32 CID, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree );
extern int ws_dissector_notimplemented( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset );
extern unsigned int dissect_tOCTVC1_MAIN_FILE_HANDLE(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtraValue );
extern const char * dissect_OCTVC1_Return_Code( guint32 ulRc );
#if defined(VERSION_MAJOR) && (VERSION_MAJOR > 1 || (VERSION_MAJOR == 1 && VERSION_MINOR > 8))
WS_DLL_PUBLIC const char *decode_enumerated_bitfield(const guint32 val, const guint32 mask,const int width, const value_string *tab, const char *fmt);
#endif
#endif /* __OCT_WS_UTIL_H__ */

View File

@ -0,0 +1,62 @@
# Makefile.nmake
# nmake file for Wireshark plugin
#
# the dissector sources (without any helpers)
#
SRC_PATH=source
#
DEV_ROOT=../../../../../../..
WS_ROOT=../../../..
TGT_WS_VERSION=1.6.5
#
DISSECTOR_SRC= \
$(SRC_PATH)/octvc1_plugin.c $(SRC_PATH)/octvc1_msg_ctrl.c $(SRC_PATH)/octvc1_msg_event.c \
$(SRC_PATH)/ws_util.c \
$(SRC_PATH)/octdev_common.c \
$(SRC_PATH)/octpkt_common.c \
$(SRC_PATH)/octvocnet_common.c \
$(SRC_PATH)/octvc1_common.c \
$(SRC_PATH)/octvc1_cid_eid_value_string.c \
$(SRC_PATH)/octvc1_module_ctrl.c \
$(SRC_PATH)/octvc1_module_main.c \
$(SRC_PATH)/octvc1_module_gsm.c \
!include ..\..\..\..\$(TGT_WS_VERSION)\config.nmake
PACKAGE=octvc1
# The version
!IF "$(MODULE_VERSION_MAJOR)" == ""
MODULE_VERSION_MAJOR=1
!ENDIF
!IF "$(MODULE_VERSION_MINOR)" == ""
MODULE_VERSION_MINOR=0
!ENDIF
!IF "$(MODULE_VERSION_MICRO)" == ""
MODULE_VERSION_MICRO=1
!ENDIF
!IF "$(MODULE_VERSION_EXTRA)" == ""
MODULE_VERSION_EXTRA=0
!ENDIF
MODULE_VERSION=$(MODULE_VERSION_MAJOR)_$(MODULE_VERSION_MINOR)_$(MODULE_VERSION_MICRO)_$(MODULE_VERSION_EXTRA)
RC_MODULE_VERSION=$(MODULE_VERSION_MAJOR),$(MODULE_VERSION_MINOR),$(MODULE_VERSION_MICRO),$(MODULE_VERSION_EXTRA)
# the name of the plugin
PLUGIN_NAME=octvc1_ws
!IF "$(TGT_VERSION)" != ""
LOCAL_CFLAGS=/DTGT_VERSION=$(TGT_VERSION) /DMODULE_VERSION=$(MODULE_VERSION) $(LOCAL_CFLAGS)
RC_INTERNAL_NAME="Base on $(PACKAGE) version $(TGT_VERSION)"
!ELSE
LOCAL_CFLAGS=/DMODULE_VERSION=$(MODULE_VERSION) $(LOCAL_CFLAGS)
RC_INTERNAL_NAME="Base on $(PACKAGE) version $(MODULE_VERSION)"
!ENDIF
!include ..\..\MakeRules.nmake

View File

@ -0,0 +1,141 @@
# oasis2ws.nmake
# nmake file for Wireshark plugin
#
!include $(OASIS_MAKE)/$(OASIS_PROJECT)/$(OASIS_PROJECT_PACKAGE)/oasis_project.common
!include $(OASIS2WS_PATH)/makefile/common.nmake
WS_TARGET_SRC_FILE_LIST = \
$(WS_PACKAGE_TARGET)/source/octvc1_common.c \
$(WS_PACKAGE_TARGET)/source/octvc1_cid_eid_value_string.c \
$(WS_PACKAGE_TARGET)/source/octdev_common.c \
$(WS_PACKAGE_TARGET)/source/octpkt_common.c \
$(WS_PACKAGE_TARGET)/source/octvocnet_common.c \
$(WS_PACKAGE_TARGET)/source/octvc1_module_ctrl.c \
$(WS_PACKAGE_TARGET)/source/octvc1_module_main.c \
$(WS_PACKAGE_TARGET)/source/octvc1_module_gsm.c \
$(WS_PACKAGE_TARGET)/source/octvc1_module_cpp.c \
$(WS_PACKAGE_TARGET)/source/octvc1_module_net.c \
WS_TARGET_HEADER_FILE_LIST = \
$(WS_PACKAGE_TARGET)/include/octvc1_common.h \
$(WS_PACKAGE_TARGET)/include/octdev_common.h \
$(WS_PACKAGE_TARGET)/include/octpkt_common.h \
$(WS_PACKAGE_TARGET)/include/octvocnet_common.h \
WS_TARGET_SMOKE_TEST_LIST = \
$(WS_PACKAGE_TARGET)/smoke_test/ws_smoke.c
WS_TARGET_DEFAULT_FILE_LIST = \
$(WS_PROJECT_TARGET)/include/module.h
WS_TARGET_COMPANION_FILE_LIST = \
$(WS_PACKAGE_TARGET)/../octvocnet_ws/include/octvocnet_common.h \
$(WS_PACKAGE_TARGET)/../octvocnet_ws/source/octvocnet_common.c \
OASIS_DEPENDENCIES = \
$(OASIS_SOURCE_ALL) \
$(OASIS_SOURCE_COMMON) \
$(OASIS_MAKE)/$(OASIS_PROJECT)/catalog.xml
all: about oasis2ws
# ----------------------------------------------------------------------------------
# OCTVC1 plugin transformations
# ----------------------------------------------------------------------------------
$(WS_PACKAGE_TARGET)/include/octvc1_common.h: $(OASIS_DEPENDENCIES) $(OASIS_XSLT_WS_COMMON_DIS) $(OASIS_SOURCE_MODULE)
@echo Generating: $@
$(OASIS_XSLT_PROC) --stringparam action GEN_PLUGIN --stringparam target $(WS_PACKAGE_TARGET) --output $@ $(OASIS_XSLT_WS_COMMON_DIS) $(OASIS_PACKAGE_BUILD_PATH)/catalog.xml
$(WS_PACKAGE_TARGET)/source/octvc1_common.c: $(OASIS_DEPENDENCIES) $(OASIS_XSLT_WS_MODULE_DIS) $(OASIS_SOURCE_MODULE)
@echo Generating: $@
$(OASIS_XSLT_PROC) --stringparam oasis_module NONE --stringparam action GEN_PLUGIN --output $@ $(OASIS_XSLT_WS_MODULE_DIS) $(OASIS_PACKAGE_BUILD_PATH)/catalog.xml
$(WS_PACKAGE_TARGET)/source/octvc1_cid_eid_value_string.c: $(OASIS_DEPENDENCIES) $(OASIS_XSLT_WS_CID_EID_STR) $(OASIS_SOURCE_MODULE)
@echo Generating: $@
$(OASIS_XSLT_PROC) --output $@ $(OASIS_XSLT_WS_CID_EID_STR) $(OASIS_PACKAGE_BUILD_PATH)/catalog.xml
$(WS_PACKAGE_TARGET)/include/octdev_common.h: $(OASIS_DEPENDENCIES) $(OASIS_XSLT_WS_COMMON_DIS) $(OASIS_MAKE)/$(OASIS_PROJECT)/octdev/component/catalog.xml
@echo Generating: $@
$(OASIS_XSLT_PROC) --stringparam action GEN_COMMON --output $@ $(OASIS_XSLT_WS_COMMON_DIS) $(OASIS_MAKE)/$(OASIS_PROJECT)/octdev/component/catalog.xml
$(WS_PACKAGE_TARGET)/source/octdev_common.c: $(OASIS_DEPENDENCIES) $(OASIS_XSLT_WS_MODULE_DIS) $(OASIS_MAKE)/$(OASIS_PROJECT)/octdev/component/catalog.xml
@echo Generating: $@
$(OASIS_XSLT_PROC) --stringparam oasis_module NONE --stringparam action GEN_COMMON --output $@ $(OASIS_XSLT_WS_MODULE_DIS) $(OASIS_MAKE)/$(OASIS_PROJECT)/octdev/component/catalog.xml
$(WS_PACKAGE_TARGET)/include/octpkt_common.h: $(OASIS_DEPENDENCIES) $(OASIS_XSLT_WS_COMMON_DIS) $(OASIS_MAKE)/$(OASIS_PROJECT)/octpkt/component/catalog.xml
@echo Generating: $@
$(OASIS_XSLT_PROC) --stringparam action GEN_COMMON --output $@ $(OASIS_XSLT_WS_COMMON_DIS) $(OASIS_MAKE)/$(OASIS_PROJECT)/octpkt/component/catalog.xml
$(WS_PACKAGE_TARGET)/source/octpkt_common.c: $(OASIS_DEPENDENCIES) $(OASIS_XSLT_WS_MODULE_DIS) $(OASIS_MAKE)/$(OASIS_PROJECT)/octpkt/component/catalog.xml
@echo Generating: $@
$(OASIS_XSLT_PROC) --stringparam oasis_module NONE --stringparam action GEN_COMMON --output $@ $(OASIS_XSLT_WS_MODULE_DIS) $(OASIS_MAKE)/$(OASIS_PROJECT)/octpkt/component/catalog.xml
$(WS_PACKAGE_TARGET)/include/octvocnet_common.h: $(OASIS_DEPENDENCIES) $(OASIS_XSLT_WS_COMMON_DIS) $(OASIS_MAKE)/$(OASIS_PROJECT)/octvocnet/component/catalog.xml
@echo Generating: $@
$(OASIS_XSLT_PROC) --stringparam action GEN_COMMON --output $@ $(OASIS_XSLT_WS_COMMON_DIS) $(OASIS_MAKE)/$(OASIS_PROJECT)/octvocnet/component/catalog.xml
$(WS_PACKAGE_TARGET)/source/octvocnet_common.c: $(OASIS_DEPENDENCIES) $(OASIS_XSLT_WS_MODULE_DIS) $(OASIS_MAKE)/$(OASIS_PROJECT)/octvocnet/component/catalog.xml
@echo Generating: $@
$(OASIS_XSLT_PROC) --stringparam oasis_module NONE --stringparam action GEN_COMMON --output $@ $(OASIS_XSLT_WS_MODULE_DIS) $(OASIS_MAKE)/$(OASIS_PROJECT)/octvocnet/component/catalog.xml
$(WS_PACKAGE_TARGET)/source/octvc1_module_ctrl.c: $(OASIS_DEPENDENCIES) $(OASIS_XSLT_WS_MODULE_DIS) $(OASIS_PACKAGE_BUILD_PATH)/ctrl/octvc1_ctrl_api.xml
@echo Generating: $@
$(OASIS_XSLT_PROC) --stringparam oasis_module CTRL --output $@ $(OASIS_XSLT_WS_MODULE_DIS) $(OASIS_PACKAGE_BUILD_PATH)/ctrl/octvc1_ctrl_api.xml
$(WS_PACKAGE_TARGET)/source/octvc1_module_main.c: $(OASIS_DEPENDENCIES) $(OASIS_XSLT_WS_MODULE_DIS) $(OASIS_PACKAGE_BUILD_PATH)/main/octvc1_main_api.xml
@echo Generating: $@
$(OASIS_XSLT_PROC) --stringparam oasis_module MAIN --output $@ $(OASIS_XSLT_WS_MODULE_DIS) $(OASIS_PACKAGE_BUILD_PATH)/main/octvc1_main_api.xml
$(WS_PACKAGE_TARGET)/source/octvc1_module_gsm.c: $(OASIS_DEPENDENCIES) $(OASIS_XSLT_WS_MODULE_DIS) $(OASIS_PACKAGE_BUILD_PATH)/gsm/octvc1_gsm_api.xml
@echo Generating: $@
$(OASIS_XSLT_PROC) --stringparam oasis_module GSM --output $@ $(OASIS_XSLT_WS_MODULE_DIS) $(OASIS_PACKAGE_BUILD_PATH)/gsm/octvc1_gsm_api.xml
$(WS_PACKAGE_TARGET)/source/octvc1_module_cpp.c: $(OASIS_DEPENDENCIES) $(OASIS_XSLT_WS_MODULE_DIS) $(OASIS_PACKAGE_BUILD_PATH)/cpp/octvc1_cpp_api.xml
@echo Generating: $@
$(OASIS_XSLT_PROC) --stringparam oasis_module CPP --output $@ $(OASIS_XSLT_WS_MODULE_DIS) $(OASIS_PACKAGE_BUILD_PATH)/cpp/octvc1_cpp_api.xml
$(WS_PACKAGE_TARGET)/source/octvc1_module_net.c: $(OASIS_DEPENDENCIES) $(OASIS_XSLT_WS_MODULE_DIS) $(OASIS_PACKAGE_BUILD_PATH)/net/octvc1_net_api.xml
@echo Generating: $@
$(OASIS_XSLT_PROC) --stringparam oasis_module NET --output $@ $(OASIS_XSLT_WS_MODULE_DIS) $(OASIS_PACKAGE_BUILD_PATH)/net/octvc1_net_api.xml
# ----------------------------------------------------------------------------------
# OCTVC1 plugin smoke test
# ----------------------------------------------------------------------------------
$(WS_PACKAGE_TARGET)/smoke_test/ws_smoke.c: $(OASIS_DEPENDENCIES) $(OASIS_XSLT_WS_COMMON_DIS) $(OASIS_SOURCE_MODULE)
@echo Generating: $@
$(OASIS_XSLT_PROC) --output $@ $(OASIS_XSLT_WS_SMOKE) $(OASIS_PACKAGE_BUILD_PATH)/catalog.xml
# ----------------------------------------------------------------------------------
# OCTVC1 companion plugin
# ----------------------------------------------------------------------------------
$(WS_PACKAGE_TARGET)/../octvocnet_ws/include/octvocnet_common.h: $(OASIS_DEPENDENCIES) $(OASIS_XSLT_WS_COMMON_DIS) $(OASIS_MAKE)/$(OASIS_PROJECT)/octvocnet/component/catalog.xml
@echo Generating: $@
$(OASIS_XSLT_PROC) --stringparam action GEN_COMMON --output $@ $(OASIS_XSLT_WS_COMMON_DIS) $(OASIS_MAKE)/$(OASIS_PROJECT)/octvocnet/component/catalog.xml
$(WS_PACKAGE_TARGET)/../octvocnet_ws/source/octvocnet_common.c: $(OASIS_DEPENDENCIES) $(OASIS_XSLT_WS_MODULE_DIS) $(OASIS_MAKE)/$(OASIS_PROJECT)/octvocnet/component/catalog.xml
@echo Generating: $@
$(OASIS_XSLT_PROC) --stringparam oasis_module NONE --stringparam action GEN_COMMON --output $@ $(OASIS_XSLT_WS_MODULE_DIS) $(OASIS_MAKE)/$(OASIS_PROJECT)/octvocnet/component/catalog.xml
# ----------------------------------------------------------------------------------
#Rules
# ----------------------------------------------------------------------------------
oasis2ws: ws2tgt $(WS_TARGET_SRC_FILE_LIST) $(WS_TARGET_HEADER_FILE_LIST) $(WS_TARGET_SMOKE_TEST_LIST) $(WS_TARGET_COMPANION_FILE_LIST)
clean:
-@ erase /Q $(WS_TARGET_SRC_FILE_LIST:/=\)
-@ erase /Q $(WS_TARGET_HEADER_FILE_LIST:/=\)
-@ erase /Q $(WS_TARGET_SMOKE_TEST_LIST:/=\)
-@ erase /Q $(WS_TARGET_COMPANION_FILE_LIST:/=\)
about:
@echo +++++++++++++++++++++++++++++++++++++++++++++
@echo Generating WS Sources Plugin for OCTVC1
@echo from: $(OASIS_MAKE:\=/)/$(OASIS_PROJECT)
@echo +++++++++++++++++++++++++++++++++++++++++++++
ws2tgt:
@if exist "$(WS_TARGET_ROOT:/=\)\$(OASIS_PROJECT_PACKAGE:/=\)_ws" xcopy $(WS_TARGET_ROOT:/=\)\$(OASIS_PROJECT_PACKAGE:/=\)_ws $(WS_PACKAGE_TARGET:/=\) /D /S /Q /Y /I 1> nul
@if exist "$(WS_TARGET_ROOT:/=\)\octvocnet_ws" xcopy $(WS_TARGET_ROOT:/=\)\octvocnet_ws $(WS_PACKAGE_TARGET:/=\)\..\octvocnet_ws /D /S /Q /Y /I 1>nul

View File

@ -0,0 +1,7 @@
<?xml version="1.0"?>
<commons>
<common lower_name="octdev" href="octdev/component/catalog.xml"/>
<common lower_name="octpkt" href="octpkt/component/catalog.xml"/>
<common lower_name="octvocnet" href="octvocnet/component/catalog.xml"/>
<companion lower_name="octvocnet" href="octvocnet/component/catalog.xml"/>
</commons>

View File

@ -0,0 +1,60 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: octdev_common.c
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description: Contain the wireshark module dissector related functions
$Octasic_Confidentiality: $
Release: Octasic Application Development Framework OCTADF-01.00.01-B497 (2014/01/09)
$Octasic_Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
/***************************** INCLUDE FILES *******************************/
#include <config.h>
#include <epan/packet.h>
#include "../../../include/oct_ws_macro.h"
#include "../include/module.h"
#include "../include/octdev_common.h"
#include <octdev_types.h>
/****************************************************************************
MODULE API ENUMERATION STRING VALUES
****************************************************************************/
const value_string vals_tOCTDEV_IP_VERSION_ENUM[] =
{
{ cOCTDEV_IP_VERSION_ENUM_4, "cOCTDEV_IP_VERSION_ENUM_4" },
{ cOCTDEV_IP_VERSION_ENUM_6, "cOCTDEV_IP_VERSION_ENUM_6" },
{ cOCTDEV_IP_VERSION_ENUM_INVALID, "cOCTDEV_IP_VERSION_ENUM_INVALID" },
{ 0, NULL }
};
#include <octdev_devices.h>
/****************************************************************************
MODULE API ENUMERATION STRING VALUES
****************************************************************************/
const value_string vals_tOCTDEV_DEVICES_TYPE_ENUM[] =
{
{ cOCTDEV_DEVICES_TYPE_ENUM_INVALID, "cOCTDEV_DEVICES_TYPE_ENUM_INVALID" },
{ cOCTDEV_DEVICES_TYPE_ENUM_OCT1010, "cOCTDEV_DEVICES_TYPE_ENUM_OCT1010" },
{ cOCTDEV_DEVICES_TYPE_ENUM_OCT2200, "cOCTDEV_DEVICES_TYPE_ENUM_OCT2200" },
{ 0, NULL }
};
const value_string vals_tOCTDEV_DEVICES_DSP_CORE_TYPE_ENUM[] =
{
{ cOCTDEV_DEVICES_DSP_CORE_TYPE_ENUM_INVALID, "cOCTDEV_DEVICES_DSP_CORE_TYPE_ENUM_INVALID" },
{ cOCTDEV_DEVICES_DSP_CORE_TYPE_ENUM_OPUS1, "cOCTDEV_DEVICES_DSP_CORE_TYPE_ENUM_OPUS1" },
{ cOCTDEV_DEVICES_DSP_CORE_TYPE_ENUM_OPUS2, "cOCTDEV_DEVICES_DSP_CORE_TYPE_ENUM_OPUS2" },
{ 0, NULL }
};

View File

@ -0,0 +1,89 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: octpkt_common.c
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description: Contain the wireshark module dissector related functions
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Release: Octasic Application Development Framework OCTADF-01.00.01-B497 (2014/01/09)
$Octasic_Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
/***************************** INCLUDE FILES *******************************/
#include <config.h>
#include <epan/packet.h>
#include "../../../include/oct_ws_macro.h"
#include "../include/module.h"
#include "../include/octpkt_common.h"
#include <octpkt_hdr.h>
/****************************************************************************
MODULE API ENUMERATION STRING VALUES
****************************************************************************/
const value_string vals_tOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK[] =
{
{ cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_FORMAT_BIT_MASK, "cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_FORMAT_BIT_MASK" },
{ cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_FORMAT_BIT_OFFSET, "cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_FORMAT_BIT_OFFSET" },
{ cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_FORMAT, "cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_FORMAT" },
{ cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_TRACE_BIT_MASK, "cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_TRACE_BIT_MASK" },
{ cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_TRACE_BIT_OFFSET, "cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_TRACE_BIT_OFFSET" },
{ cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_TRACE, "cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_TRACE" },
{ cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_CONTROL_PROTOCOL_TYPE_BIT_MASK, "cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_CONTROL_PROTOCOL_TYPE_BIT_MASK" },
{ cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_CONTROL_PROTOCOL_TYPE_BIT_OFFSET, "cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_CONTROL_PROTOCOL_TYPE_BIT_OFFSET" },
{ cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_CONTROL_PROTOCOL_TYPE, "cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_CONTROL_PROTOCOL_TYPE" },
{ cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_LENGTH_BIT_MASK, "cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_LENGTH_BIT_MASK" },
{ cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_LENGTH_BIT_OFFSET, "cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_LENGTH_BIT_OFFSET" },
{ cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_LENGTH, "cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_LENGTH" },
{ 0, NULL }
};
const value_string vals_tOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM[] =
{
{ cOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM_OCTVOCNET, "cOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM_OCTVOCNET" },
{ cOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM_OCTMFA, "cOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM_OCTMFA" },
{ cOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM_LTE_FAPI, "cOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM_LTE_FAPI" },
{ cOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM_OCTSDR, "cOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM_OCTSDR" },
{ cOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM_TEST, "cOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM_TEST" },
{ cOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM_NONE, "cOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM_NONE" },
{ 0, NULL }
};
#include <octpkt_hdrxl.h>
/****************************************************************************
MODULE API ENUMERATION STRING VALUES
****************************************************************************/
const value_string vals_tOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK[] =
{
{ cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_FORMAT_BIT_MASK, "cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_FORMAT_BIT_MASK" },
{ cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_FORMAT_BIT_OFFSET, "cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_FORMAT_BIT_OFFSET" },
{ cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_FORMAT, "cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_FORMAT" },
{ cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_CONTROL_PROTOCOL_TYPE_BIT_MASK, "cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_CONTROL_PROTOCOL_TYPE_BIT_MASK" },
{ cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_CONTROL_PROTOCOL_TYPE_BIT_OFFSET, "cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_CONTROL_PROTOCOL_TYPE_BIT_OFFSET" },
{ cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_CONTROL_PROTOCOL_TYPE, "cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_CONTROL_PROTOCOL_TYPE" },
{ cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_LENGTH_BIT_MASK, "cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_LENGTH_BIT_MASK" },
{ cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_LENGTH_BIT_OFFSET, "cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_LENGTH_BIT_OFFSET" },
{ cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_LENGTH, "cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_LENGTH" },
{ 0, NULL }
};

View File

@ -0,0 +1,282 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: OCTVC1_cid_eid_value_string.c
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description: Contain the wireshark value_string of all CID and EID
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Release: Octasic Application Development Framework OCTADF-01.00.01-B497 (2014/01/09)
$Octasic_Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
/***************************** INCLUDE FILES *******************************/
#include <config.h>
#include <epan/packet.h>
#include "../../../include/oct_ws_macro.h"
#include "../include/module.h"
#include "../include/octvc1_common.h"
#include <main/octvc1_main_evt.h>
#include <ctrl/octvc1_ctrl_api.h>
#include <gsm/octvc1_gsm_evt.h>
/****************************************************************************
Module unique entry
****************************************************************************/
const value_string vals_OCTVC1_module_UID[] =
{
{ (cOCTVC1_MAIN_UID), "MAIN" },
{ (cOCTVC1_CTRL_UID), "CTRL" },
{ (cOCTVC1_GSM_UID), "GSM" },
{ 0, NULL },
};
/****************************************************************************
CID arrays
****************************************************************************/
const value_string vals_OCTVC1_MAIN_CID[] =
{
{ (cOCTVC1_MAIN_MSG_MODULE_MODIFY_EVT_CID& 0x00000FFF), "MODULE_MODIFY_EVT" },
{ (cOCTVC1_MAIN_MSG_MODULE_INFO_EVT_CID& 0x00000FFF), "MODULE_INFO_EVT" },
{ (cOCTVC1_MAIN_MSG_MODULE_START_TRACING_CID& 0x00000FFF), "MODULE_START_TRACING" },
{ (cOCTVC1_MAIN_MSG_MODULE_STOP_TRACING_CID& 0x00000FFF), "MODULE_STOP_TRACING" },
{ (cOCTVC1_MAIN_MSG_BUFFER_OPEN_CID& 0x00000FFF), "BUFFER_OPEN" },
{ (cOCTVC1_MAIN_MSG_BUFFER_CLOSE_CID& 0x00000FFF), "BUFFER_CLOSE" },
{ (cOCTVC1_MAIN_MSG_BUFFER_INFO_CID& 0x00000FFF), "BUFFER_INFO" },
{ (cOCTVC1_MAIN_MSG_BUFFER_LIST_CID& 0x00000FFF), "BUFFER_LIST" },
{ (cOCTVC1_MAIN_MSG_BUFFER_MODIFY_CID& 0x00000FFF), "BUFFER_MODIFY" },
{ (cOCTVC1_MAIN_MSG_BUFFER_WRITE_CID& 0x00000FFF), "BUFFER_WRITE" },
{ (cOCTVC1_MAIN_MSG_BUFFER_READ_CID& 0x00000FFF), "BUFFER_READ" },
{ (cOCTVC1_MAIN_MSG_BUFFER_INFO_BY_NAME_CID& 0x00000FFF), "BUFFER_INFO_BY_NAME" },
{ (cOCTVC1_MAIN_MSG_DEVICE_INFO_CID& 0x00000FFF), "DEVICE_INFO" },
{ (cOCTVC1_MAIN_MSG_DEVICE_RESET_CID& 0x00000FFF), "DEVICE_RESET" },
{ (cOCTVC1_MAIN_MSG_DEVICE_STATUS_OPUS_CORE_CID& 0x00000FFF), "DEVICE_STATUS_OPUS_CORE" },
{ (cOCTVC1_MAIN_MSG_DEVICE_INFO_OPUS_CORE_CID& 0x00000FFF), "DEVICE_INFO_OPUS_CORE" },
{ (cOCTVC1_MAIN_MSG_OCT1010_INFO_CID& 0x00000FFF), "OCT1010_INFO" },
{ (cOCTVC1_MAIN_MSG_OCT1010_RESET_CID& 0x00000FFF), "OCT1010_RESET" },
{ (cOCTVC1_MAIN_MSG_OCT1010_STATS_CID& 0x00000FFF), "OCT1010_STATS" },
{ (cOCTVC1_MAIN_MSG_OCT1010_STATUS_CORE_CID& 0x00000FFF), "OCT1010_STATUS_CORE" },
{ (cOCTVC1_MAIN_MSG_OCT1010_INFO_CORE_CID& 0x00000FFF), "OCT1010_INFO_CORE" },
{ (cOCTVC1_MAIN_MSG_OCT1010_INFO_OCT1010ID_CID& 0x00000FFF), "OCT1010_INFO_OCT1010ID" },
{ (cOCTVC1_MAIN_MSG_ETH_STATS_CID& 0x00000FFF), "ETH_STATS" },
{ (cOCTVC1_MAIN_MSG_ETH_MODIFY_PORT_CONFIG_CID& 0x00000FFF), "ETH_MODIFY_PORT_CONFIG" },
{ (cOCTVC1_MAIN_MSG_ETH_INFO_PORT_CONFIG_CID& 0x00000FFF), "ETH_INFO_PORT_CONFIG" },
{ (cOCTVC1_MAIN_MSG_REGISTER_READ_CID& 0x00000FFF), "REGISTER_READ" },
{ (cOCTVC1_MAIN_MSG_FILE_OPEN_CID& 0x00000FFF), "FILE_OPEN" },
{ (cOCTVC1_MAIN_MSG_FILE_CLOSE_CID& 0x00000FFF), "FILE_CLOSE" },
{ (cOCTVC1_MAIN_MSG_FILE_WRITE_CID& 0x00000FFF), "FILE_WRITE" },
{ (cOCTVC1_MAIN_MSG_FILE_READ_CID& 0x00000FFF), "FILE_READ" },
{ (cOCTVC1_MAIN_MSG_FILE_INFO_CID& 0x00000FFF), "FILE_INFO" },
{ (cOCTVC1_MAIN_MSG_FILE_LIST_CID& 0x00000FFF), "FILE_LIST" },
{ (cOCTVC1_MAIN_MSG_FILE_SYSTEM_INFO_CID& 0x00000FFF), "FILE_SYSTEM_INFO" },
{ (cOCTVC1_MAIN_MSG_FILE_SYSTEM_INFO_FILE_CID& 0x00000FFF), "FILE_SYSTEM_INFO_FILE" },
{ (cOCTVC1_MAIN_MSG_FILE_SYSTEM_DELETE_FILE_CID& 0x00000FFF), "FILE_SYSTEM_DELETE_FILE" },
{ (cOCTVC1_MAIN_MSG_LOG_ERASE_CID& 0x00000FFF), "LOG_ERASE" },
{ (cOCTVC1_MAIN_MSG_LOG_READ_ENTRY_CID& 0x00000FFF), "LOG_READ_ENTRY" },
{ (cOCTVC1_MAIN_MSG_LICENSING_INFO_CID& 0x00000FFF), "LICENSING_INFO" },
{ (cOCTVC1_MAIN_MSG_GPIO_READ_BANK_CID& 0x00000FFF), "GPIO_READ_BANK" },
{ (cOCTVC1_MAIN_MSG_GPIO_WRITE_BANK_CID& 0x00000FFF), "GPIO_WRITE_BANK" },
{ (cOCTVC1_MAIN_MSG_GPIO_MONITOR_BANK_CID& 0x00000FFF), "GPIO_MONITOR_BANK" },
{ (cOCTVC1_MAIN_MSG_GPIO_MODIFY_BANK_CONFIG_CID& 0x00000FFF), "GPIO_MODIFY_BANK_CONFIG" },
{ (cOCTVC1_MAIN_MSG_SPI_ACCESS_CID& 0x00000FFF), "SPI_ACCESS" },
{ (cOCTVC1_MAIN_MSG_MDIO_READ_PHY_CID& 0x00000FFF), "MDIO_READ_PHY" },
{ (cOCTVC1_MAIN_MSG_MDIO_WRITE_PHY_CID& 0x00000FFF), "MDIO_WRITE_PHY" },
{ (cOCTVC1_MAIN_MSG_MDIO_MONITOR_PHY_CID& 0x00000FFF), "MDIO_MONITOR_PHY" },
{ (cOCTVC1_MAIN_MSG_PROCESS_INFO_CID& 0x00000FFF), "PROCESS_INFO" },
{ (cOCTVC1_MAIN_MSG_PROCESS_LIST_CID& 0x00000FFF), "PROCESS_LIST" },
{ (cOCTVC1_MAIN_MSG_PROCESS_MONITOR_CPU_USAGE_CID& 0x00000FFF), "PROCESS_MONITOR_CPU_USAGE" },
{ (cOCTVC1_MAIN_MSG_PROCESS_INFO_CPU_USAGE_CID& 0x00000FFF), "PROCESS_INFO_CPU_USAGE" },
{ (cOCTVC1_MAIN_MSG_DEBUG_FORWARD_OPEN_CID& 0x00000FFF), "DEBUG_FORWARD_OPEN" },
{ (cOCTVC1_MAIN_MSG_DEBUG_FORWARD_CLOSE_CID& 0x00000FFF), "DEBUG_FORWARD_CLOSE" },
{ (cOCTVC1_MAIN_MSG_DEBUG_FORWARD_INFO_CID& 0x00000FFF), "DEBUG_FORWARD_INFO" },
{ (cOCTVC1_MAIN_MSG_REDUNDANCY_SERVER_START_CID& 0x00000FFF), "REDUNDANCY_SERVER_START" },
{ (cOCTVC1_MAIN_MSG_REDUNDANCY_SERVER_STOP_CID& 0x00000FFF), "REDUNDANCY_SERVER_STOP" },
{ (cOCTVC1_MAIN_MSG_REDUNDANCY_SERVER_INFO_CID& 0x00000FFF), "REDUNDANCY_SERVER_INFO" },
{ (cOCTVC1_MAIN_MSG_REDUNDANCY_SERVER_ADD_MGW_CID& 0x00000FFF), "REDUNDANCY_SERVER_ADD_MGW" },
{ (cOCTVC1_MAIN_MSG_REDUNDANCY_SERVER_REMOVE_MGW_CID& 0x00000FFF), "REDUNDANCY_SERVER_REMOVE_MGW" },
{ (cOCTVC1_MAIN_MSG_REDUNDANCY_SERVER_LIST_MGW_CID& 0x00000FFF), "REDUNDANCY_SERVER_LIST_MGW" },
{ (cOCTVC1_MAIN_MSG_REDUNDANCY_SERVER_INFO_MGW_CID& 0x00000FFF), "REDUNDANCY_SERVER_INFO_MGW" },
{ (cOCTVC1_MAIN_MSG_REDUNDANCY_SERVER_EXECUTE_MGW_FAILOVER_CID& 0x00000FFF), "REDUNDANCY_SERVER_EXECUTE_MGW_FAILOVER" },
{ (cOCTVC1_MAIN_MSG_OCT2200_STATS_CID& 0x00000FFF), "OCT2200_STATS" },
{ 0, NULL },
};
const value_string vals_OCTVC1_MAIN_CID_PRIV[] =
{
{ 0, NULL },
};
const value_string vals_OCTVC1_CTRL_CID[] =
{
{ 0, NULL },
};
const value_string vals_OCTVC1_CTRL_CID_PRIV[] =
{
{ 0, NULL },
};
const value_string vals_OCTVC1_GSM_CID[] =
{
{ (cOCTVC1_GSM_MSG_MODULE_INFO_HARDWARE_CID& 0x00000FFF), "MODULE_INFO_HARDWARE" },
{ (cOCTVC1_GSM_MSG_MODULE_MODIFY_EVT_CID& 0x00000FFF), "MODULE_MODIFY_EVT" },
{ (cOCTVC1_GSM_MSG_MODULE_INFO_EVT_CID& 0x00000FFF), "MODULE_INFO_EVT" },
{ (cOCTVC1_GSM_MSG_MODULE_INFO_CID& 0x00000FFF), "MODULE_INFO" },
{ (cOCTVC1_GSM_MSG_PROCESS_UNIT_MODIFY_EVT_CID& 0x00000FFF), "PROCESS_UNIT_MODIFY_EVT" },
{ (cOCTVC1_GSM_MSG_PROCESS_UNIT_INFO_EVT_CID& 0x00000FFF), "PROCESS_UNIT_INFO_EVT" },
{ (cOCTVC1_GSM_MSG_PROCESS_UNIT_LIST_CID& 0x00000FFF), "PROCESS_UNIT_LIST" },
{ (cOCTVC1_GSM_MSG_PROCESS_UNIT_INFO_CID& 0x00000FFF), "PROCESS_UNIT_INFO" },
{ (cOCTVC1_GSM_MSG_PROCESS_UNIT_STATS_CID& 0x00000FFF), "PROCESS_UNIT_STATS" },
{ (cOCTVC1_GSM_MSG_PHYSICAL_CHANNEL_REQUEST_EMPTY_FRAME_CID& 0x00000FFF), "PHYSICAL_CHANNEL_REQUEST_EMPTY_FRAME" },
{ (cOCTVC1_GSM_MSG_PHYSICAL_CHANNEL_REQUEST_DATA_CID& 0x00000FFF), "PHYSICAL_CHANNEL_REQUEST_DATA" },
{ (cOCTVC1_GSM_MSG_PHYSICAL_CHANNEL_CONFIGURE_CIPHERING_CID& 0x00000FFF), "PHYSICAL_CHANNEL_CONFIGURE_CIPHERING" },
{ (cOCTVC1_GSM_MSG_PHYSICAL_CHANNEL_CONNECT_CID& 0x00000FFF), "PHYSICAL_CHANNEL_CONNECT" },
{ (cOCTVC1_GSM_MSG_PHYSICAL_CHANNEL_DISCONNECT_CID& 0x00000FFF), "PHYSICAL_CHANNEL_DISCONNECT" },
{ (cOCTVC1_GSM_MSG_PHYSICAL_CHANNEL_RESET_CID& 0x00000FFF), "PHYSICAL_CHANNEL_RESET" },
{ (cOCTVC1_GSM_MSG_LOGICAL_CHANNEL_ACTIVATE_CID& 0x00000FFF), "LOGICAL_CHANNEL_ACTIVATE" },
{ (cOCTVC1_GSM_MSG_LOGICAL_CHANNEL_DEACTIVATE_CID& 0x00000FFF), "LOGICAL_CHANNEL_DEACTIVATE" },
{ (cOCTVC1_GSM_MSG_TRX_STATUS_TIMESLOT_CID& 0x00000FFF), "TRX_STATUS_TIMESLOT" },
{ (cOCTVC1_GSM_MSG_TRX_REQUEST_TIMESLOT_MEASUREMENT_REPORT_CID& 0x00000FFF), "TRX_REQUEST_TIMESLOT_MEASUREMENT_REPORT" },
{ (cOCTVC1_GSM_MSG_TRX_RESET_CID& 0x00000FFF), "TRX_RESET" },
{ (cOCTVC1_GSM_MSG_TRX_STATUS_CID& 0x00000FFF), "TRX_STATUS" },
{ (cOCTVC1_GSM_MSG_TRX_CONFIGURE_CID& 0x00000FFF), "TRX_CONFIGURE" },
{ (cOCTVC1_GSM_MSG_TEST_START_ETSI_CID& 0x00000FFF), "TEST_START_ETSI" },
{ (cOCTVC1_GSM_MSG_TEST_END_ETSI_CID& 0x00000FFF), "TEST_END_ETSI" },
{ (cOCTVC1_GSM_MSG_TEST_START_FCC_CID& 0x00000FFF), "TEST_START_FCC" },
{ (cOCTVC1_GSM_MSG_TEST_END_FCC_CID& 0x00000FFF), "TEST_END_FCC" },
{ 0, NULL },
};
const value_string vals_OCTVC1_GSM_CID_PRIV[] =
{
{ 0, NULL },
};
/****************************************************************************
EID arrays
****************************************************************************/
const value_string vals_OCTVC1_MAIN_EID[] =
{
{ (cOCTVC1_MAIN_MSG_MODULE_TRACING_BUFFER_FULL_EID& 0x0000FFFF), "MODULE_TRACING_BUFFER_FULL" },
{ (cOCTVC1_MAIN_MSG_MODULE_TRACING_STOP_EID& 0x0000FFFF), "MODULE_TRACING_STOP" },
{ (cOCTVC1_MAIN_MSG_DEVICE_OPUS_CORE_EXEC_REPORT_EID& 0x0000FFFF), "DEVICE_OPUS_CORE_EXEC_REPORT" },
{ (cOCTVC1_MAIN_MSG_GPIO_BANK_CHANGE_EID& 0x0000FFFF), "GPIO_BANK_CHANGE" },
{ (cOCTVC1_MAIN_MSG_MDIO_PHY_CHANGE_EID& 0x0000FFFF), "MDIO_PHY_CHANGE" },
{ (cOCTVC1_MAIN_MSG_PROCESS_CPU_USAGE_REPORT_EID& 0x0000FFFF), "PROCESS_CPU_USAGE_REPORT" },
{ (cOCTVC1_MAIN_MSG_REDUNDANCY_SERVER_MGW_FAILOVER_DONE_EID& 0x0000FFFF), "REDUNDANCY_SERVER_MGW_FAILOVER_DONE" },
{ 0, NULL },
};
const value_string vals_OCTVC1_MAIN_EID_PRIV[] =
{
{ 0, NULL },
};
const value_string vals_OCTVC1_CTRL_EID[] =
{
{ 0, NULL },
};
const value_string vals_OCTVC1_CTRL_EID_PRIV[] =
{
{ 0, NULL },
};
const value_string vals_OCTVC1_GSM_EID[] =
{
{ (cOCTVC1_GSM_MSG_MODULE_TIME_INDICATION_EID& 0x0000FFFF), "MODULE_TIME_INDICATION" },
{ (cOCTVC1_GSM_MSG_MODULE_DATA_INDICATION_EID& 0x0000FFFF), "MODULE_DATA_INDICATION" },
{ (cOCTVC1_GSM_MSG_MODULE_TRX_RADIO_READY_EID& 0x0000FFFF), "MODULE_TRX_RADIO_READY" },
{ (cOCTVC1_GSM_MSG_MODULE_READY_TO_SEND_INDICATION_EID& 0x0000FFFF), "MODULE_READY_TO_SEND_INDICATION" },
{ (cOCTVC1_GSM_MSG_MODULE_RACH_INDICATION_EID& 0x0000FFFF), "MODULE_RACH_INDICATION" },
{ (cOCTVC1_GSM_MSG_MODULE_ERROR_EID& 0x0000FFFF), "MODULE_ERROR" },
{ (cOCTVC1_GSM_MSG_MODULE_MESSAGE_EID& 0x0000FFFF), "MODULE_MESSAGE" },
{ (cOCTVC1_GSM_MSG_MODULE_CHECKPOINT_EID& 0x0000FFFF), "MODULE_CHECKPOINT" },
{ (cOCTVC1_GSM_MSG_MODULE_TRACING_EID& 0x0000FFFF), "MODULE_TRACING" },
{ (cOCTVC1_GSM_MSG_PROCESS_UNIT_ERROR_EID& 0x0000FFFF), "PROCESS_UNIT_ERROR" },
{ (cOCTVC1_GSM_MSG_PROCESS_UNIT_MESSAGE_EID& 0x0000FFFF), "PROCESS_UNIT_MESSAGE" },
{ (cOCTVC1_GSM_MSG_PROCESS_UNIT_CHECKPOINT_EID& 0x0000FFFF), "PROCESS_UNIT_CHECKPOINT" },
{ (cOCTVC1_GSM_MSG_PROCESS_UNIT_TRACING_EID& 0x0000FFFF), "PROCESS_UNIT_TRACING" },
{ (cOCTVC1_GSM_MSG_TEST_ETSI_TEST_REPORT_EID& 0x0000FFFF), "TEST_ETSI_TEST_REPORT" },
{ 0, NULL },
};
const value_string vals_OCTVC1_GSM_EID_PRIV[] =
{
{ 0, NULL },
};
/****************************************************************************
SID arrays
****************************************************************************/
const value_string vals_OCTVC1_MAIN_SID[] =
{
{ 0, NULL },
};
const value_string vals_OCTVC1_MAIN_SID_PRIV[] =
{
{ 0, NULL },
};
const value_string vals_OCTVC1_CTRL_SID[] =
{
{ (cOCTVC1_CTRL_MSG_MODULE_REJECT_SID& 0x00000FFF), "MODULE_REJECT" },
{ 0, NULL },
};
const value_string vals_OCTVC1_CTRL_SID_PRIV[] =
{
{ 0, NULL },
};
const value_string vals_OCTVC1_GSM_SID[] =
{
{ 0, NULL },
};
const value_string vals_OCTVC1_GSM_SID_PRIV[] =
{
{ 0, NULL },
};
/****************************************************************************
typedef struct tModuleColInfo
****************************************************************************/
extern void ws_register_OCTVC1_MAIN(void);
extern int ws_dissect_OCTVC1_MAIN( guint8 message_type, guint32 CID, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree );
extern void ws_register_OCTVC1_CTRL(void);
extern int ws_dissect_OCTVC1_CTRL( guint8 message_type, guint32 CID, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree );
extern void ws_register_OCTVC1_GSM(void);
extern int ws_dissect_OCTVC1_GSM( guint8 message_type, guint32 CID, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree );
;
tModuleColInfo aOCTVC1ModuleColInfo[] =
{
{ "MAIN", vals_OCTVC1_MAIN_CID,vals_OCTVC1_MAIN_EID,vals_OCTVC1_MAIN_SID, ws_register_OCTVC1_MAIN, ws_dissect_OCTVC1_MAIN,vals_OCTVC1_MAIN_CID_PRIV,vals_OCTVC1_MAIN_EID_PRIV },
{ "CTRL", vals_OCTVC1_CTRL_CID,vals_OCTVC1_CTRL_EID,vals_OCTVC1_CTRL_SID, ws_register_OCTVC1_CTRL, ws_dissect_OCTVC1_CTRL,vals_OCTVC1_CTRL_CID_PRIV,vals_OCTVC1_CTRL_EID_PRIV },
{ "GSM", vals_OCTVC1_GSM_CID,vals_OCTVC1_GSM_EID,vals_OCTVC1_GSM_SID, ws_register_OCTVC1_GSM, ws_dissect_OCTVC1_GSM,vals_OCTVC1_GSM_CID_PRIV,vals_OCTVC1_GSM_EID_PRIV },
};
/*************************************************************************
Registered dissector module
**************************************************************************/
void ws_register_dissector_module(void)
{
/* Register all modules */
unsigned int i;
for( i=0; i<mWS_COUNTOF(aOCTVC1ModuleColInfo); i++ )
aOCTVC1ModuleColInfo[i].Register_fnc();
ws_register_OCTVC1_common();
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,202 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: octvc1_module_ctrl.c
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description: Contain the wireshark module dissector related functions
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Release: Octasic Application Development Framework OCTADF-01.00.01-B497 (2014/01/09)
$Octasic_Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
/***************************** INCLUDE FILES *******************************/
#include <config.h>
#include <epan/packet.h>
#include "../../../include/oct_ws_macro.h"
#include "../include/module.h"
#include "../include/octvc1_common.h"
#include <ctrl/octvc1_ctrl_api.h>
/****************************************************************************
Event Registered
****************************************************************************/
int ahf_tOCTVC1_CTRL_MSG_MODULE_REJECT_SPV[3];
tWS_ENTITY_HANDLE ws_htOCTVC1_CTRL_MSG_MODULE_REJECT_SPV;
void register_tOCTVC1_CTRL_MSG_MODULE_REJECT_SPV(void)
{
static hf_register_info hf[] =
{
{
&ahf_tOCTVC1_CTRL_MSG_MODULE_REJECT_SPV[0],
{ "ulExpectedTransactionId", "octvc1.ctrl.module.reject.ulexpectedtransactionid",
FT_UINT32,BASE_HEX, NULL, 0x0,
"ulExpectedTransactionId",HFILL }
},
{
&ahf_tOCTVC1_CTRL_MSG_MODULE_REJECT_SPV[1],
{ "ulRejectedCmdId", "octvc1.ctrl.module.reject.ulrejectedcmdid",
FT_UINT32,BASE_HEX, NULL, 0x0,
"ulRejectedCmdId",HFILL }
},
};
static gint* ett[] =
{
&ws_htOCTVC1_CTRL_MSG_MODULE_REJECT_SPV.ett
};
proto_register_field_array( proto_octvc1_ctrl, hf, array_length(hf) );
};
/****************************************************************************
CMD/RSP Registered
****************************************************************************/
/****************************************************************************
Event dissectors
****************************************************************************/
unsigned int dissect_tOCTVC1_CTRL_MSG_MODULE_REJECT_SPV(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset )
{
proto_tree *field_tree = tree;
unsigned int offset_0 = offset;
gint bytes = tvb_length_remaining(tvb, offset);
if (bytes < (gint)(sizeof(tOCTVC1_CTRL_MSG_MODULE_REJECT_SPV)-sizeof(tOCTVC1_EVENT_HEADER)))
{
proto_tree_add_text(tree, tvb, offset, bytes,
"tOCTVC1_CTRL_MSG_MODULE_REJECT_SPV (%d byte%s) - Malformated packet...expected(%ld)",
bytes, plurality(bytes, "", "s"),
sizeof(tOCTVC1_CTRL_MSG_MODULE_REJECT_SPV)-sizeof(tOCTVC1_EVENT_HEADER));
return 1;
}
else
{
int temp_data = 0;
proto_item *ti;
ti = proto_tree_add_text(tree, tvb, offset, bytes,
"tOCTVC1_CTRL_MSG_MODULE_REJECT_SPV (%d byte%s)", bytes, plurality(bytes, "", "s"));
field_tree = proto_item_add_subtree(ti, ett_octvc1_msg_type);
temp_data = tvb_get_ntohl( tvb, offset );
{
ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_CTRL_MSG_MODULE_REJECT_SPV[0], tvb, offset,
4, temp_data);
}
offset += mWS_FIELDSIZE(tOCTVC1_CTRL_MSG_MODULE_REJECT_SPV, ulExpectedTransactionId);
temp_data = tvb_get_ntohl( tvb, offset );
{
ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_CTRL_MSG_MODULE_REJECT_SPV[1], tvb, offset,
4, temp_data);
}
offset += mWS_FIELDSIZE(tOCTVC1_CTRL_MSG_MODULE_REJECT_SPV, ulRejectedCmdId);
}
return 0;
};
/****************************************************************************
CMD/RSP dissectors
****************************************************************************/
/****************************************************************************
MODULE REGISTERED EXPORTED FUNCTION
****************************************************************************/
void ws_register_OCTVC1_CTRL(void)
{
/****************************************************************************
Register Common struct
****************************************************************************/
/****************************************************************************
CMD/RSP Registered
****************************************************************************/
/****************************************************************************
Event Registered
****************************************************************************/
}
/****************************************************************************
MODULE DISSECTOR FUNCTIONS
****************************************************************************/
int ws_dissect_OCTVC1_CTRL_CMD( guint32 CID, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
{
if( tree )
{
switch( CID ) {
default: return 1;
}
}
return 0;
}
int ws_dissect_OCTVC1_CTRL_RSP( guint32 CID, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
{
if( tree )
{
switch( CID ) {
default: return 1;
}
}
return 0;
}
int ws_dissect_OCTVC1_CTRL_EVT( guint32 CID, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
{
if( tree )
{
switch( CID ) {
default: return 1;
}
}
return 0;
}
/****************************************************************************
MODULE DISSECTOR EXPORTED FUNCTION
****************************************************************************/
int ws_dissect_OCTVC1_CTRL( guint8 message_type, guint32 CID, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
{
if (message_type == cOCTVC1_MSG_TYPE_RESPONSE)
return ws_dissect_OCTVC1_CTRL_RSP( CID, tvb, pinfo, tree);
if (message_type == cOCTVC1_MSG_TYPE_COMMAND)
return ws_dissect_OCTVC1_CTRL_CMD( CID, tvb, pinfo, tree);
if (message_type == cOCTVC1_MSG_TYPE_NOTIFICATION )
return ws_dissect_OCTVC1_CTRL_EVT( CID, tvb, pinfo, tree);
else
return 1;
}

View File

@ -0,0 +1,740 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: octvc1_msg_ctrl.c
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description: Routines for vocallonet dissection
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Release: Octasic Application Development Framework OCTADF-01.00.01-B497 (2014/01/09)
$Octasic_Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#include <config.h>
#include <epan/packet.h>
#include <epan/prefs.h>
#include <epan/expert.h>
#include "../include/module.h"
#include "../include/octvc1_common.h"
#include "../include/plugin_info.h"
#include "../../../include/oct_ws_macro.h"
#include <color.h>
#include <color_filters.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gmodule.h>
#include "../include/ws_util.h"
#include <octvc1_msg.h>
#include <octvc1_base.h>
#define OCTVC1_RC2STRING_DECLARE
#include <octvc1_rc2string.h>
#include <ctrl/octvc1_ctrl_api.h>
/* Define version if we are not building Wireshark statically */
/* Initialize the protocol and registered fields */
int proto_octvc1_ctrl = -1;
/* tOCTVC1_MSG_HEADER */
int hf_octvc1_msg_cmd = -1;
int hf_octvc1_msg_rsp = -1;
int hf_octvc1_msg_evt = -1;
extern int g_fIsRegistered;
static int hf_octvc1_msg_header_ulLength = -1;
static int hf_octvc1_msg_header_ulTransactionId = -1;
static int hf_octvc1_msg_header_ul_Type_R_CmdId = -1;
static int hf_octvc1_msg_header_ulSessionId = -1;
static int hf_octvc1_msg_header_ulReturnCode = -1;
static int hf_octvc1_msg_header_ulUserInfo = -1;
static int hf_octvc1_msg_header_reject_expected_transaction_id = -1;
static int hf_octvc1_msg_header_reject_rejected_command_id = -1;
static int hf_octvc1_msg_header_ul_Type_R_CmdId_Type = -1;
static int hf_octvc1_msg_header_ul_Type_R_CmdId_Resynch = -1;
static int hf_octvc1_msg_header_ul_Type_R_CmdId_Base = -1;
static int hf_octvc1_msg_header_ul_Type_R_CmdId_ModuleId = -1;
static int hf_octvc1_msg_header_ul_Type_R_CmdId_MsgId = -1;
static int hf_octvc1_msg_header_ul_Type_R_CmdId_Flag = -1;
#define mWD_OCTVC1_CID_TYPE_BASE(uint32) ((uint32) & 0x00f00000)
#define mWD_OCTVC1_CID_UID(uint32) ((uint32) & 0x000f0000)
#define mWD_OCTVC1_CID_CODE(uint32) ((uint32) & 0x00000FFF)
#define mWD_OCTVC1_CID_FLAG(uint32) ((uint32) & 0x0000F000)
#define mWD_OCTVC1_CID_2_FLAG(uint32) (((uint32)& 0x0000F000)>>12)
#define mWD_OCTVC1_CID_2_UID(uint32) (((uint32)& 0x000F0000)>>16)
#define mWD_OCTVC1_CID_2_BASE(uint32) (((uint32)& 0x00F00000)>>20)
const value_string octvc1_message_type_vals[] =
{
{ cOCTVC1_MSG_TYPE_COMMAND, "Command" },
{ cOCTVC1_MSG_TYPE_RESPONSE, "Response" },
{ cOCTVC1_MSG_TYPE_NOTIFICATION, "Notification" },
{ cOCTVC1_MSG_TYPE_SUPERVISORY, "Supervisory" },
{ 0, NULL },
};
const value_string octvc1_message_type_base_vals[] =
{
{ cOCTVC1_CID_BASE>>20, "Cmd/Rsp" },
{ cOCTVC1_EID_BASE>>20, "Notification" },
{ cOCTVC1_SID_BASE>>20, "Supervisory" },
{ 0, NULL },
};
const value_string octvc1_cid_flag_vals[] =
{
{ cOCTVC1_MSG_RETRANSMIT_FLAG >> cOCTVC1_MSG_FLAGS_BIT_OFFSET, "Retransmit" },
{ cOCTVC1_MSG_NO_RESPONSE_FLAG >> cOCTVC1_MSG_FLAGS_BIT_OFFSET, "No Response" },
{ cOCTVC1_MSG_LONG_PROCESSING_FLAG >> cOCTVC1_MSG_FLAGS_BIT_OFFSET, "Long Processing" },
{ 0, "None" },
{ 0, NULL },
};
/* fields defining a subtree */
static gint ett_octvc1_msg_header = -1;
static gint ett_octvc1_type_r_cmd = -1;
gint ett_octvc1_msg_type = -1;
/*************************************************************************
*
* Code to actually dissect the Vocallo event packet header
*
**************************************************************************/
void dissect_octvc1_ctrl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
unsigned int packet_offset = 0;
guint32 message_length;
guint32 transaction_id;
guint32 type_r_cmdid;
guint8 message_type;
guint8 message_resynch;
guint32 message_command_id;
guint32 command_id_type_base;
guint32 command_id_uid;
guint32 command_id_code;
guint32 command_id_flag;
guint32 session_id;
guint32 return_code;
guint32 user_info;
guint32 expected_transaction_id = -1;
guint32 rejected_command_id = -1;
proto_tree* msg_tree = NULL;
gint32 module_index = -1;
guint32 fOldMainCid = FALSE;
const gchar* pszValueStringCID=NULL;
gint32 iRegistered = 1;
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "OCTVC1_CTRL");
/* Now parse the message header */
message_length = tvb_get_ntohl( tvb, packet_offset );
packet_offset += sizeof(message_length);
transaction_id = tvb_get_ntohl( tvb, packet_offset );
packet_offset += sizeof(transaction_id);
type_r_cmdid = tvb_get_ntohl( tvb, packet_offset );
message_type = ( type_r_cmdid >> cOCTVC1_MSG_TYPE_BIT_OFFSET ) & cOCTVC1_MSG_TYPE_BIT_MASK;
message_resynch = ( type_r_cmdid >> cOCTVC1_MSG_RESYNCH_BIT_OFFSET ) & cOCTVC1_MSG_RESYNCH_BIT_MASK;
message_command_id = ( type_r_cmdid >> cOCTVC1_MSG_ID_BIT_OFFSET ) & cOCTVC1_MSG_ID_BIT_MASK;
command_id_type_base = mWD_OCTVC1_CID_TYPE_BASE(message_command_id);
command_id_uid = mWD_OCTVC1_CID_UID(message_command_id);
command_id_code = mWD_OCTVC1_CID_CODE(message_command_id);
command_id_flag = mWD_OCTVC1_CID_FLAG(message_command_id);
/* Find Tbl Module Index */
OCT_MATCH_STRVAL_IDX( mWD_OCTVC1_CID_2_UID(message_command_id), vals_OCTVC1_module_UID, &module_index );
// Special process on main ... CID use to be 0x01yz and we are now 0x0zzz
// if can't find 0x01yz try with 0x00yz
if( cOCTVC1_MAIN_UID == mWD_OCTVC1_CID_2_UID(message_command_id) )
{
int cmd_index;
OCT_MATCH_STRVAL_IDX( command_id_code,
aOCTVC1ModuleColInfo[module_index].apCodeIdValueString, &cmd_index );
// did we found the cid
if( cmd_index == -1 )
{
OCT_MATCH_STRVAL_IDX( command_id_code & 0x000000FF,
aOCTVC1ModuleColInfo[module_index].apCodeIdValueString, &cmd_index );
if( cmd_index != -1 )
{
// This is an old trace ...
command_id_code &= 0xFFFFFEFF;
fOldMainCid = TRUE;
}
}
}
packet_offset += sizeof(type_r_cmdid);
session_id = tvb_get_ntohl( tvb, packet_offset );
packet_offset += sizeof(session_id);
return_code = tvb_get_ntohl( tvb, packet_offset );
packet_offset += sizeof(return_code);
// Get no swap
tvb_memcpy( tvb, &user_info, packet_offset, sizeof(user_info) );
// user_info = tvb_get_ntohl( tvb, packet_offset );
packet_offset += sizeof(user_info);
if( ( message_type == cOCTVC1_MSG_TYPE_SUPERVISORY ) &&
( ( cOCTVC1_SUPERVISORY_MSG_MODULE_REJECT_CID == message_command_id ) ||
( cOCTVC1_CTRL_MSG_MODULE_REJECT_SID == message_command_id ) ) )
{
expected_transaction_id = tvb_get_ntohl( tvb, packet_offset );
packet_offset += sizeof(expected_transaction_id);
rejected_command_id = tvb_get_ntohl( tvb, packet_offset );
packet_offset += sizeof(rejected_command_id);
}
if ( check_col( pinfo->cinfo, COL_INFO) )
{
col_clear(pinfo->cinfo, COL_INFO);
if( message_type != cOCTVC1_MSG_TYPE_SUPERVISORY )
{
if( module_index < 0 )
{
col_add_fstr( pinfo->cinfo, COL_INFO,
"%s %s, CID=0x%04X, Trans ID=0x%x",
val_to_str( mWD_OCTVC1_CID_2_UID(message_command_id), vals_OCTVC1_module_UID, "Unknown (%x)" ),
val_to_str( message_type, octvc1_message_type_vals, "Unknown (%x)" ),
command_id_code,
transaction_id );
}
else
{
pszValueStringCID = val_to_str( command_id_code, aOCTVC1ModuleColInfo[module_index].apCodeIdValueString, cOCTVC1_UNKNOWN_STRING );
// look for private
if( strcmp( pszValueStringCID, cOCTVC1_PRIVATE_ID_STRING ) == 0 )
{
iRegistered = 0;
// look if somebody register
if( g_fIsRegistered )
{
pszValueStringCID = octvc1_chck_private( command_id_code, aOCTVC1ModuleColInfo[module_index].apPrivateCodeIdValueString, &iRegistered );
}
else
pszValueStringCID = cOCTVC1_UNKNOWN_STRING;
}
col_add_fstr( pinfo->cinfo, COL_INFO,
"%s%s_MSG_%s(0x%04X), Trans ID=0x%x",
fOldMainCid ? "*" : "",
aOCTVC1ModuleColInfo[module_index].pszModuleName,
pszValueStringCID,
command_id_code,
transaction_id);
}
if (message_type == cOCTVC1_MSG_TYPE_RESPONSE)
{
if ( check_col(pinfo->cinfo, COL_PROTOCOL) )
col_set_str(pinfo->cinfo, COL_PROTOCOL, "OCTVC1_RSP");
col_append_fstr( pinfo->cinfo, COL_INFO,
", Ret Code=%s (0x%08X)",
mOCTVC1_RC2STRING(return_code), return_code );
}
else
{
if ( check_col(pinfo->cinfo, COL_PROTOCOL) )
col_set_str(pinfo->cinfo, COL_PROTOCOL, "OCTVC1_CMD");
}
}
else
{
if( ( cOCTVC1_SUPERVISORY_MSG_MODULE_REJECT_CID == message_command_id ) ||
( cOCTVC1_CTRL_MSG_MODULE_REJECT_SID == message_command_id ) )
{
gint32 rej_module_index = -1;
gint32 rej_command_id_code = mWD_OCTVC1_CID_CODE(rejected_command_id);
/* Find Tbl Module Index */
OCT_MATCH_STRVAL_IDX( mWD_OCTVC1_CID_2_UID(rejected_command_id), vals_OCTVC1_module_UID, &rej_module_index );
if( ( rej_module_index != -1 ) &&
( cOCTVC1_MAIN_UID == mWD_OCTVC1_CID_2_UID(rejected_command_id ) ) )
{
int cmd_index;
OCT_MATCH_STRVAL_IDX( rejected_command_id,
aOCTVC1ModuleColInfo[rej_module_index].apCodeIdValueString, &cmd_index );
// did we found the cid
if( cmd_index == -1 )
{
OCT_MATCH_STRVAL_IDX( rejected_command_id & 0x000000FF,
aOCTVC1ModuleColInfo[rej_module_index].apCodeIdValueString, &cmd_index );
if( cmd_index != -1 )
{
// This is an old trace ...
rejected_command_id &= 0xFFFFFEFF;
fOldMainCid = TRUE;
}
}
}
if( rej_module_index == -1 )
col_add_fstr( pinfo->cinfo, COL_INFO,
"Reject %s, CID=0x%04X, Exp trans ID=0x%x",
val_to_str( mWD_OCTVC1_CID_2_UID(rejected_command_id), vals_OCTVC1_module_UID, "Unknown (%x)" ),
rej_command_id_code,
expected_transaction_id );
else
{
pszValueStringCID = val_to_str( rej_command_id_code, aOCTVC1ModuleColInfo[rej_module_index].apCodeIdValueString, cOCTVC1_UNKNOWN_STRING );
// look for private
if( strcmp( pszValueStringCID, cOCTVC1_PRIVATE_ID_STRING ) == 0 )
{
iRegistered = 0;
// look if somebody register
if( g_fIsRegistered )
{
pszValueStringCID = octvc1_chck_private( rej_command_id_code, aOCTVC1ModuleColInfo[rej_module_index].apPrivateCodeIdValueString, &iRegistered );
}
else
pszValueStringCID = cOCTVC1_UNKNOWN_STRING;
}
col_add_fstr( pinfo->cinfo, COL_INFO,
"Reject %s%s_MSG_%s, Exp trans ID=0x%x",
fOldMainCid ? "*" : "",
aOCTVC1ModuleColInfo[rej_module_index].pszModuleName,
pszValueStringCID,
expected_transaction_id );
}
}
}
}
if (tree)
{
proto_item* ti = NULL;
proto_item *tf = NULL;
proto_tree *field_tree;
/* Add the subtree for struct tOCTVOCNET_PKT_CTL_HEADER */
ti = proto_tree_add_item( tree, proto_octvc1_ctrl, tvb, 0, -1, FALSE );
msg_tree = proto_item_add_subtree( ti, ett_octvc1_msg_header );
/* Scroll back to the beginning of the packet */
packet_offset = 0;
proto_tree_add_uint( msg_tree, hf_octvc1_msg_header_ulLength, tvb, packet_offset, 4, message_length );
packet_offset += sizeof(message_length);
proto_tree_add_uint( msg_tree, hf_octvc1_msg_header_ulTransactionId, tvb, packet_offset, 4, transaction_id );
packet_offset += sizeof(transaction_id);
/* Validate the cmd */
if( module_index < 0 )
{
proto_tree_add_uint(msg_tree, hf_octvc1_msg_header_ul_Type_R_CmdId, tvb, packet_offset, 4, type_r_cmdid );
}
else
{
if( message_type != cOCTVC1_MSG_TYPE_SUPERVISORY )
{
if( pszValueStringCID == NULL )
{
pszValueStringCID = val_to_str( command_id_code, aOCTVC1ModuleColInfo[module_index].apCodeIdValueString, cOCTVC1_UNKNOWN_STRING );
// look for private
if( strcmp( pszValueStringCID, cOCTVC1_PRIVATE_ID_STRING ) == 0 )
{
iRegistered = 0;
// look if somebody register
if( g_fIsRegistered )
{
pszValueStringCID = octvc1_chck_private( command_id_code, aOCTVC1ModuleColInfo[module_index].apPrivateCodeIdValueString, &iRegistered );
}
else
pszValueStringCID = cOCTVC1_UNKNOWN_STRING;
}
}
tf = proto_tree_add_uint_format(msg_tree, hf_octvc1_msg_header_ul_Type_R_CmdId, tvb,
packet_offset, 4, type_r_cmdid,
"Type/%s(0x%08X): %scOCTVC1_%s_MSG_%s_CID",
(message_type == cOCTVC1_MSG_TYPE_RESPONSE) ? "Rsp" : "Cmd",
type_r_cmdid,
fOldMainCid ? "*" : "",
aOCTVC1ModuleColInfo[module_index].pszModuleName,
pszValueStringCID );
}
else
{
tf = proto_tree_add_uint_format(msg_tree, hf_octvc1_msg_header_ul_Type_R_CmdId, tvb,
packet_offset, 4, type_r_cmdid,
"Type/Sup(0x%08X): cOCTVC1_%s_MSG_%s_SID",
type_r_cmdid,
aOCTVC1ModuleColInfo[module_index].pszModuleName,
val_to_str( command_id_code,aOCTVC1ModuleColInfo[module_index].apSupIdValueString, "Unknown (%x)" ));
}
}
if( tf )
{
int iFlag = 0x00001000;
int i,cFlag = 0;
field_tree = proto_item_add_subtree(tf, ett_octvc1_type_r_cmd);
proto_tree_add_uint( field_tree, hf_octvc1_msg_header_ul_Type_R_CmdId_Type, tvb,
packet_offset, 1, message_type << 29 );
proto_tree_add_uint( field_tree, hf_octvc1_msg_header_ul_Type_R_CmdId_Resynch, tvb,
packet_offset, 1, message_resynch<<28 );
proto_tree_add_uint( field_tree, hf_octvc1_msg_header_ul_Type_R_CmdId_Base, tvb,
packet_offset+1, 1, command_id_type_base );
proto_tree_add_uint( field_tree, hf_octvc1_msg_header_ul_Type_R_CmdId_ModuleId, tvb,
packet_offset+1, 1, command_id_uid );
// Count nb of flag
for( i=0; i<4; i++)
{
if( command_id_flag & iFlag )
cFlag++;
iFlag = iFlag << 1;
}
if( cFlag < 2 )
proto_tree_add_uint( field_tree, hf_octvc1_msg_header_ul_Type_R_CmdId_Flag, tvb,
packet_offset+2, 1, command_id_flag );
else
{
int i;
proto_tree* sub_tree = proto_item_add_subtree(field_tree, ett_octvc1_msg_type);
proto_tree_add_uint_format_value( field_tree, hf_octvc1_msg_header_ul_Type_R_CmdId_Flag, tvb,
packet_offset+2, 1, command_id_flag,
"(0x%X)", (command_id_flag >>cOCTVC1_MSG_FLAGS_BIT_OFFSET) );
for( i=0; i< mWS_COUNTOF(octvc1_cid_flag_vals); i++ )
{
if( ( octvc1_cid_flag_vals[i].value &&
( octvc1_cid_flag_vals[i].value & ( command_id_flag >> cOCTVC1_MSG_FLAGS_BIT_OFFSET )) ==
octvc1_cid_flag_vals[i].value))
proto_tree_add_text(sub_tree, tvb, packet_offset+2,1,"%s",
decode_enumerated_bitfield(octvc1_cid_flag_vals[i].value, 0xFFFFFFFF, (4*1),
VALS(octvc1_cid_flag_vals),"%s"));
}
}
if( message_type != cOCTVC1_MSG_TYPE_SUPERVISORY )
proto_tree_add_uint_format_value(field_tree, hf_octvc1_msg_header_ul_Type_R_CmdId_MsgId, tvb,
packet_offset+2, 2, command_id_code,
"%s%s (0x%03X)",
fOldMainCid ? "*" : "",
pszValueStringCID, command_id_code );
else
proto_tree_add_uint_format_value(field_tree, hf_octvc1_msg_header_ul_Type_R_CmdId_MsgId, tvb,
packet_offset+2, 2, command_id_code,
"%s (0x%03X)",
val_to_str( command_id_code, aOCTVC1ModuleColInfo[module_index].apSupIdValueString,
"Unknown (%x)" ), command_id_code );
}
packet_offset += sizeof(command_id_code);
proto_tree_add_uint( msg_tree, hf_octvc1_msg_header_ulSessionId, tvb,
packet_offset, 4, session_id );
packet_offset += sizeof(session_id);
ti = proto_tree_add_uint_format_value(msg_tree, hf_octvc1_msg_header_ulReturnCode, tvb,
packet_offset, 4, return_code,
"%s (0x%08X)",
mOCTVC1_RC2STRING(return_code), return_code );
if( return_code )
{
if( return_code & cOCTDEV_RC_FATAL_FLAG )
expert_add_info_format(pinfo, ti, PI_RESPONSE_CODE, PI_ERROR, "API:FATAL" );
else
expert_add_info_format(pinfo, ti, PI_RESPONSE_CODE, PI_WARN, "API:ERROR" );
}
packet_offset += sizeof(return_code);
proto_tree_add_uint( msg_tree, hf_octvc1_msg_header_ulUserInfo, tvb,
packet_offset, 4, user_info );
packet_offset += sizeof(user_info);
if( ( message_type == cOCTVC1_MSG_TYPE_SUPERVISORY ) &&
( ( cOCTVC1_SUPERVISORY_MSG_MODULE_REJECT_CID == message_command_id ) ||
( cOCTVC1_CTRL_MSG_MODULE_REJECT_SID == message_command_id ) ) )
{
gint32 rej_module_index = -1;
gint32 rej_command_id_code = mWD_OCTVC1_CID_CODE(rejected_command_id);
/* Find Tbl Module Index */
OCT_MATCH_STRVAL_IDX( mWD_OCTVC1_CID_2_UID(rejected_command_id), vals_OCTVC1_module_UID, &rej_module_index );
if( ( rej_module_index != -1 ) &&
( cOCTVC1_MAIN_UID == mWD_OCTVC1_CID_2_UID(rej_command_id_code) ) )
{
int cmd_index;
OCT_MATCH_STRVAL_IDX( rejected_command_id,
aOCTVC1ModuleColInfo[rej_module_index].apCodeIdValueString, &cmd_index );
// did we found the cid
if( cmd_index == -1 )
{
OCT_MATCH_STRVAL_IDX( rej_command_id_code & 0x000000FF,
aOCTVC1ModuleColInfo[rej_module_index].apCodeIdValueString, &cmd_index );
if( cmd_index != -1 )
{
// This is an old trace ...
rej_command_id_code &= 0xFFFFFEFF;
fOldMainCid = TRUE;
}
}
}
proto_tree_add_uint( msg_tree, hf_octvc1_msg_header_reject_expected_transaction_id, tvb,
packet_offset, 4, expected_transaction_id );
packet_offset += sizeof(expected_transaction_id);
if( rej_module_index == -1 )
proto_tree_add_uint_format(msg_tree, hf_octvc1_msg_header_reject_rejected_command_id, tvb,
packet_offset, 4, rejected_command_id,
"Reject CID: %s, CID=0x%08X",
val_to_str( mWD_OCTVC1_CID_2_UID(rejected_command_id), vals_OCTVC1_module_UID, "Unknown (%x)" ),
rej_command_id_code );
else
{
pszValueStringCID = val_to_str( rej_command_id_code, aOCTVC1ModuleColInfo[rej_module_index].apCodeIdValueString, cOCTVC1_UNKNOWN_STRING );
// look for private
if( strcmp( pszValueStringCID, cOCTVC1_PRIVATE_ID_STRING ) == 0 )
{
iRegistered = 0;
// look if somebody register
if( g_fIsRegistered )
{
pszValueStringCID = octvc1_chck_private( rej_command_id_code, aOCTVC1ModuleColInfo[rej_module_index].apPrivateCodeIdValueString, &iRegistered );
}
else
pszValueStringCID = cOCTVC1_UNKNOWN_STRING;
}
proto_tree_add_uint_format(msg_tree, hf_octvc1_msg_header_reject_rejected_command_id, tvb,
packet_offset, 4, rejected_command_id,
"Rejected CID: %scOCTVC1_%s_MSG_%s_CID (0x%08X)",
fOldMainCid ? "*" : "",
aOCTVC1ModuleColInfo[rej_module_index].pszModuleName,
pszValueStringCID,
rejected_command_id );
}
packet_offset += sizeof(rejected_command_id);
}
}
{
int fDoData = 1;
int reported_length = message_length ? ( message_length - sizeof(tOCTVC1_MSG_HEADER)) : 0;
int available_length = tvb_length_remaining(tvb, packet_offset);
tvbuff_t *tvbData;
tvbData = tvb_new_subset(tvb, packet_offset, available_length, reported_length);
if( ( module_index >= 0 ) && iRegistered )
{
/* Call the module dissector */
fDoData = aOCTVC1ModuleColInfo[module_index].Dissector_fnc( message_type,
message_command_id & ~(cOCTVC1_MSG_RETRANSMIT_FLAG),
tvbData, pinfo, msg_tree );
}
if( fDoData )
{
/* Dump the rest in raw format */
call_dissector(data_handle, tvbData, pinfo, msg_tree);
}
}
// return tvb_length(tvb);
}
/*************************************************************************
*
* Code to register the protocol with Wireshark
*
**************************************************************************/
void proto_register_octvc1_ctrl(void)
{
static hf_register_info hf_octvc1_msg_header[] =
{
{ &hf_octvc1_msg_header_ulLength,
{ "API Message Length (in bytes)", "octvc1.msg_header.ullength",
FT_UINT32, BASE_DEC, NULL, 0x0,
"API Message Length (in bytes)", HFILL }
},
{ &hf_octvc1_msg_header_ulTransactionId,
{ "Transaction Id", "octvc1.msg_header.ultransaction_id",
FT_UINT32, BASE_HEX, 0, 0x0,
"Transcation identifier", HFILL }
},
{ &hf_octvc1_msg_header_ul_Type_R_CmdId,
{ "Msg type/Id", "octvc1.msg_header.ul_Type_R_CmdId", FT_UINT32, BASE_HEX, NULL, 0x0,
"", HFILL }},
{ &hf_octvc1_msg_header_ulSessionId,
{ "Session Id", "octvc1.msg_header.ulsessionid",
FT_UINT32, BASE_HEX, NULL, 0x0,
"Session Id", HFILL }
},
{ &hf_octvc1_msg_header_ulReturnCode,
{ "Return Code", "octvc1.msg_header.ulReturnCode",
FT_UINT32, BASE_HEX, NULL, 0x0,
"Return Code", HFILL }
},
{ &hf_octvc1_msg_header_ulUserInfo,
{ "User Info", "octvc1.msg_header.ulUserInfo",
FT_UINT32, BASE_HEX, NULL, 0x0,
"User Info", HFILL }
},
{ &hf_octvc1_msg_header_reject_expected_transaction_id,
{ "Expected transaction Id", "octvc1.msg_header.reject.expected_transaction_id",
FT_UINT32, BASE_HEX, NULL, 0x0,
"Expected transaction Id", HFILL }
},
{ &hf_octvc1_msg_header_reject_rejected_command_id,
{ "Rejected command ID", "octvc1.msg_header.reject.rejected_command_id",
FT_UINT32, BASE_HEX, NULL, 0x0,
"Rejected command ID", HFILL }
},
{ &hf_octvc1_msg_header_ul_Type_R_CmdId_Type,
{ "Message Type", "octvc1.msg_header.message_type",
FT_UINT32, BASE_HEX, VALS(octvc1_message_type_vals), 0xe0000000,
"Message type", HFILL }
},
{ &hf_octvc1_msg_header_ul_Type_R_CmdId_Resynch,
{ "Control Resynch", "octvc1.msg_header.resynch",
FT_UINT32, BASE_HEX, NULL, 0x10000000,
"Control resynch", HFILL }
},
{ &hf_octvc1_msg_header_ul_Type_R_CmdId_Base,
{ "Message Type Base", "octvc1.msg_header.type_base",
FT_UINT32, BASE_HEX, VALS(octvc1_message_type_base_vals), 0x00f00000,
"Message identifier", HFILL }
},
{ &hf_octvc1_msg_header_ul_Type_R_CmdId_ModuleId,
{ "Module ID", "octvc1.msg_header.module_id",
FT_UINT32, BASE_HEX, VALS(vals_OCTVC1_module_UID), 0x000f0000,
"Module identifier", HFILL }
},
{ &hf_octvc1_msg_header_ul_Type_R_CmdId_Flag,
{ "Msg Flag", "octvc1.msg_header.msg_flag",
FT_UINT32, BASE_HEX, VALS(octvc1_cid_flag_vals), 0x0000f000,
"Message flag", HFILL }
},
{ &hf_octvc1_msg_header_ul_Type_R_CmdId_MsgId,
{ "Msg ID", "octvc1.msg_header.msg_id",
FT_UINT32, BASE_HEX, NULL, 0x00000fff,
"Message identifier", HFILL }
},
{ &hf_octvc1_msg_cmd,
{ "Cmd", "octvc1.msg_header.cmd",
FT_NONE, BASE_NONE, NULL, 0x0,
"Cmd", HFILL }
},
{ &hf_octvc1_msg_rsp,
{ "Rsp", "octvc1.msg_header.rsp",
FT_NONE, BASE_NONE, NULL, 0x0,
"Rsp", HFILL }
},
{ &hf_octvc1_msg_evt,
{ "Evt", "octvc1.msg_header.evt",
FT_NONE, BASE_NONE, NULL, 0x0,
"Evt", HFILL }
},
};
/* Setup protocol subtree array */
static gint* ett[] =
{
&ett_octvc1_msg_header,
&ett_octvc1_type_r_cmd,
&ett_octvc1_msg_type,
};
proto_octvc1_ctrl = proto_register_protocol( "OCTVC1 Control Packets",
"Octasic OCTVC1 Control", "octvc1_ctrl");
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array( proto_octvc1_ctrl, hf_octvc1_msg_header, array_length(hf_octvc1_msg_header) );
proto_register_subtree_array(ett, array_length(ett));
register_dissector("Octvc1_Ctrl", dissect_octvc1_ctrl, proto_octvc1_ctrl);
}

View File

@ -0,0 +1,315 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: octvc1_msg_event.c
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description: Routines for vocallonet dissection
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Release: Octasic Application Development Framework OCTADF-01.00.01-B497 (2014/01/09)
$Octasic_Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#include <config.h>
#include <epan/packet.h>
#include <epan/prefs.h>
#include <epan/expert.h>
#include "../include/module.h"
#include "../include/octvc1_common.h"
#include "../include/plugin_info.h"
#include "../../../include/oct_ws_macro.h"
#include <color.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gmodule.h>
#include <octvc1_msg.h>
#include <octvc1_base.h>
#include <main/octvc1_main_evt.h>
#include <ctrl/octvc1_ctrl_api.h>
/* Define version if we are not building Wireshark statically */
/* Initialize the protocol and registered fields */
int proto_octvc1_event = -1;
extern int g_fIsRegistered;
/* Event packet data fields */
static int hf_octvc1_event_header_ulLength = -1;
static int hf_octvc1_event_header_ulEventId = -1;
static int hf_octvc1_event_header_ulUserEventId = -1;
static int hf_octvc1_event_header_ulEventId_Base = -1;
static int hf_octvc1_event_header_ulEventId_Type = -1;
static int hf_octvc1_event_header_ulEventId_Code = -1;
#define mWD_OCTVC1_EID_BASE(uint32) ((uint32) & 0x00ff0000)
#define mWD_OCTVC1_EID_2_UID(uint32) (((uint32)& 0x000f0000)>>16)
#define mWD_OCTVC1_EID_CODE(uint32) ((uint32) & 0x0000ffff)
/* fields defining a subtree */
static gint ett_octvc1_event_header = -1;
static gint ett_octvc1_event_id = -1;
/*************************************************************************
*
* Code to actually dissect the Vocallo event packet header
*
**************************************************************************/
void dissect_octvc1_event(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
unsigned int packet_offset = 0;
guint32 evt_length;
guint32 event_id;
guint32 event_id_base;
guint32 event_id_code;
guint32 user_event_id;
proto_tree* evt_tree = NULL;
gint32 module_index = -1;
const gchar* pszValueStringEID=NULL;
gint32 iRegistered = 1;
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "OCTVC1_EVT");
/* parse the event header */
evt_length = tvb_get_ntohl( tvb, packet_offset );
packet_offset += sizeof(evt_length);
event_id = tvb_get_ntohl( tvb, packet_offset );
event_id_base = mWD_OCTVC1_EID_BASE(event_id);
event_id_code = mWD_OCTVC1_EID_CODE(event_id);
packet_offset += sizeof(event_id_code);
user_event_id = tvb_get_ntohl( tvb, packet_offset );
packet_offset += sizeof(user_event_id);
/* Find Tbl Module Index */
OCT_MATCH_STRVAL_IDX( mWD_OCTVC1_EID_2_UID(event_id_base), vals_OCTVC1_module_UID, &module_index );
if ( check_col( pinfo->cinfo, COL_INFO) )
{
col_clear(pinfo->cinfo, COL_INFO);
if( module_index < 0 )
{
col_add_fstr( pinfo->cinfo, COL_INFO,
"%s, CID=0x%04X",
val_to_str( mWD_OCTVC1_EID_2_UID(event_id_base), vals_OCTVC1_module_UID, "Unknown (%x)" ),
event_id_code );
}
else
{
pszValueStringEID = val_to_str( event_id_code, aOCTVC1ModuleColInfo[module_index].apEvtIdValueString, cOCTVC1_UNKNOWN_STRING );
// look for private
if( strcmp( pszValueStringEID, cOCTVC1_PRIVATE_ID_STRING ) == 0 )
{
iRegistered = 0;
// look if somebody register
if( g_fIsRegistered )
{
pszValueStringEID = octvc1_chck_private( event_id_code, aOCTVC1ModuleColInfo[module_index].apPrivateEvtIdValueString, &iRegistered );
}
else
pszValueStringEID = cOCTVC1_UNKNOWN_STRING;
}
col_add_fstr( pinfo->cinfo, COL_INFO,
"%s_MSG_%s(0x%04X)",
aOCTVC1ModuleColInfo[module_index].pszModuleName,
pszValueStringEID,
event_id_code );
}
}
if (tree)
{
proto_item *ti;
proto_item *tf = NULL;
packet_offset = 0;
/* Add the subtree for struct octvc1 evt */
ti = proto_tree_add_item( tree, proto_octvc1_event, tvb, 0, -1, FALSE );
evt_tree = proto_item_add_subtree( ti, ett_octvc1_event_header );
proto_tree_add_uint( evt_tree, hf_octvc1_event_header_ulLength, tvb,
packet_offset, 4, evt_length );
packet_offset += sizeof(evt_length);
/* Validate the cmd */
if( module_index < 0 )
{
proto_tree_add_uint(evt_tree, hf_octvc1_event_header_ulEventId, tvb, packet_offset, 4, event_id );
}
else
{
if( pszValueStringEID == NULL )
{
pszValueStringEID = val_to_str( event_id_code, aOCTVC1ModuleColInfo[module_index].apEvtIdValueString, cOCTVC1_UNKNOWN_STRING );
// look for private
if( strcmp( pszValueStringEID, cOCTVC1_PRIVATE_ID_STRING ) == 0 )
{
iRegistered = 0;
// look if somebody register
if( g_fIsRegistered )
{
pszValueStringEID = octvc1_chck_private( event_id_code, aOCTVC1ModuleColInfo[module_index].apPrivateEvtIdValueString, &iRegistered );
}
else
pszValueStringEID = cOCTVC1_UNKNOWN_STRING;
}
}
tf = proto_tree_add_uint_format(evt_tree, hf_octvc1_event_header_ulEventId, tvb,
packet_offset, 4, event_id,
"Event Id(0x%08X): cOCTVC1_%s_MSG_%s_EID",
event_id,
aOCTVC1ModuleColInfo[module_index].pszModuleName,
pszValueStringEID );
}
if( tf )
{
proto_tree *field_tree;
field_tree = proto_item_add_subtree(tf, ett_octvc1_event_id);
proto_tree_add_uint( field_tree, hf_octvc1_event_header_ulEventId_Type, tvb,
packet_offset+1, 1, event_id_base );
proto_tree_add_uint( field_tree, hf_octvc1_event_header_ulEventId_Base, tvb,
packet_offset+1, 1, event_id_base );
proto_tree_add_uint_format_value(field_tree, hf_octvc1_event_header_ulEventId_Code, tvb,
packet_offset+2, 2, event_id_code,
"%s(0x%04X)",
pszValueStringEID, event_id_code );
}
packet_offset += sizeof(event_id_code);
proto_tree_add_uint( evt_tree, hf_octvc1_event_header_ulUserEventId, tvb,
packet_offset, 4, user_event_id );
packet_offset += sizeof(user_event_id);
}
{
int fDoData = 1;
int reported_length = evt_length ? (evt_length - sizeof(tOCTVC1_EVENT_HEADER)) : 0;
int available_length = tvb_length_remaining(tvb, packet_offset);
tvbuff_t *tvbData;
tvbData = tvb_new_subset(tvb, packet_offset, available_length, reported_length);
if( ( module_index >= 0 ) && iRegistered )
{
/* Call the module dissector */
fDoData = aOCTVC1ModuleColInfo[module_index].Dissector_fnc( cOCTVC1_MSG_TYPE_NOTIFICATION,
event_id_base | event_id_code,
tvbData, pinfo, evt_tree );
}
if( fDoData )
{
/* Dump the rest in raw format */
call_dissector(data_handle, tvbData, pinfo, evt_tree);
}
}
// return tvb_length(tvb);
}
/*************************************************************************
*
* Code to register the protocol with Wireshark
*
**************************************************************************/
void proto_register_octvc1_event(void)
{
static hf_register_info hf_octvc1_event[] =
{
/* Packet format F event fields */
{ &hf_octvc1_event_header_ulLength,
{ "Event Length", "octvc1.event_header.ulLength",
FT_UINT32, BASE_HEX, NULL, 0x0,
"Event Length", HFILL }
},
{ &hf_octvc1_event_header_ulEventId,
{ "Event ID", "octvc1.event_header.ulEventId", FT_UINT32, BASE_HEX, NULL, 0x0,
"", HFILL }},
{ &hf_octvc1_event_header_ulUserEventId,
{ "User Event ID", "octvc1.event_header.ulUserEventId",
FT_UINT32, BASE_HEX, NULL, 0x0,
"User Event ID", HFILL }
},
{ &hf_octvc1_event_header_ulEventId_Type,
{ "Message Type Base", "octvc1.event_header.type_base",
FT_UINT32, BASE_HEX, NULL, 0x00f00000,
"Message identifier", HFILL }
},
{ &hf_octvc1_event_header_ulEventId_Base,
{ "Module ID", "octvc1.event_header.module_id",
FT_UINT32, BASE_HEX, VALS(vals_OCTVC1_module_UID), 0x000f0000,
"Module identifier", HFILL }
},
{ &hf_octvc1_event_header_ulEventId_Code,
{ "Event Code Id", "octvc1.event_header.code_id",
FT_UINT32, BASE_HEX, NULL, 0x0000ffff,
"Event code", HFILL }
},
};
/* Setup protocol subtree array */
static gint* ett[] =
{
&ett_octvc1_event_header,
&ett_octvc1_event_id
};
proto_octvc1_event = proto_register_protocol( "OCTVC1 Event Packets",
"Octasic OCTVC1 Event", "octvc1_event");
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array( proto_octvc1_event, hf_octvc1_event, array_length(hf_octvc1_event) );
proto_register_subtree_array(ett, array_length(ett));
register_dissector("Octvc1_Event", dissect_octvc1_event, proto_octvc1_event);
}

View File

@ -0,0 +1,404 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: octvc1_plugin.c
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description:
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Release: Octasic Application Development Framework OCTADF-01.00.01-B497 (2014/01/09)
$Octasic_Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#include <string.h>
#include <config.h>
#include <epan/packet.h>
#include <epan/prefs.h>
#include <epan/expert.h>
#include "../include/plugin_info.h"
#include "../include/module.h"
#define OCT_DECLARE_COMMON
#include "../include/octvc1_common.h"
#include <gsm/octvc1_gsm_api.h>
static int proto_octvc1 = -1;
static int fUserRegistered = 0;
char * pszOctvc1_user_name=NULL;
char * pszOctvc1_user_id=NULL;
int g_fIsRegistered = 0;
static char l_szRegisteredUser[128]={0};
static int l_iRegisteredUserLen = 0;
static int l_id_code_Registered = 0;
static gchar l_szAPIStr[256];
static int l_fIsGod = 0;
dissector_handle_t data_handle;
const gchar* octvc1_chck_private( guint32 f_id_code, const value_string *f_PrivateApi, gint32 *f_piRegistered )
{
const gchar* pszValueString;
//CHck if same as last request
if( l_iRegisteredUserLen && ( l_id_code_Registered == f_id_code ) )
{
*f_piRegistered = 1;
return l_szAPIStr;
}
*f_piRegistered = 0;
pszValueString = val_to_str( f_id_code, f_PrivateApi, cOCTVC1_UNKNOWN_STRING );
if( strcmp( pszValueString, cOCTVC1_UNKNOWN_STRING ) )
{
// Expect API ID STRING:user,user2,user3
gchar *pszColumn = strchr( pszValueString, ':' );
if( pszColumn )
{
gchar *pszStr;
// Keep API string
strncpy( l_szAPIStr, pszValueString, (pszColumn-pszValueString) );
l_szAPIStr[(pszColumn-pszValueString)]=0;
// Chck if god is register
if( !l_fIsGod )
pszStr = strstr( pszColumn+1, l_szRegisteredUser );
// Find if register for this
if( l_fIsGod ||
( pszStr && ((pszStr==(pszColumn+1)) || (*(pszStr-1)==',') ) &&
( (*(pszStr+l_iRegisteredUserLen)==',') || (*(pszStr+l_iRegisteredUserLen)==0 ) ) ) )
{
l_id_code_Registered = f_id_code;
*f_piRegistered = 1;
return l_szAPIStr;
}
}
}
return cOCTVC1_UNKNOWN_STRING;
}
void pref_proto_octvc1_apply_callback( void )
{
char *pszPath;
// by default this callback is called at startup ... skip the first call
if( fUserRegistered )
{
int fReguser=0;
if( ( strcmp( pszOctvc1_user_name, cOCTVC1_GOD_USER ) == 0 ) &&
( strcmp( pszOctvc1_user_id, cOCTVC1_GOD_USER_ID ) == 0 ) )
{
fReguser = 1;
l_fIsGod = 1;
}
else
{
int i;
for( i=0; ; i++ )
{
if( aOCTVC1_user_list[i][0] == NULL )
break;
if( ( strcmp( aOCTVC1_user_list[i][0], pszOctvc1_user_name ) == 0 ) &&
( strcmp( aOCTVC1_user_list[i][1], pszOctvc1_user_id ) == 0 ) )
{
fReguser = 1;
l_fIsGod = 0;
break;
}
}
}
if( fReguser )
{
g_fIsRegistered = 1;
strcpy( l_szRegisteredUser, pszOctvc1_user_name );
l_iRegisteredUserLen = strlen( l_szRegisteredUser );
}
else
{
g_fIsRegistered = 0;
l_fIsGod = 0;
}
}
fUserRegistered = 1;
prefs_set_pref( "octvc1.user_name:user" );
prefs_set_pref( "octvc1.user_id:****" );
write_prefs( &pszPath );
// Reset last check
l_id_code_Registered = 0;
l_szAPIStr[0] = 0;
}
extern tModuleColInfo aOCTVC1ModuleColInfo[];
#define mWD_OCTVC1_CID_CODE(uint32) ((uint32) & 0x00000FFF)
void dissect_OCTVC1_GSM(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
int temp_data, ulMsgType, ulCommandId, ulOctvc1MsgType, remaining_length, module_index;
int offset = 0;
tvbuff_t *message_tvb;
const gchar* pszValueString = NULL;
tModuleColInfo GsmModule;
/* Find Tbl Module Index */
match_strval_idx( cOCTVC1_GSM_UID, vals_OCTVC1_module_UID, &module_index );
/*Get the proper module info */
GsmModule = aOCTVC1ModuleColInfo[module_index];
temp_data = tvb_get_ntohs( tvb, offset );
proto_tree_add_text(tree, tvb, offset, 2, "reserved %d", temp_data );
offset += 2;
ulMsgType = tvb_get_guint8( tvb, offset );
ulCommandId = (ulMsgType & 0x7F) | cOCTVC1_GSM_CID_BASE;
ulOctvc1MsgType = ((ulMsgType & 0x80) == 0 )? cOCTVC1_MSG_TYPE_RESPONSE: cOCTVC1_MSG_TYPE_COMMAND;
/* Hardcoded event mapping */
if( ulMsgType == 0x01 || ulMsgType == 0x02 || ulMsgType == 0x07 || ulMsgType == 0x0e || ulMsgType == 0x16 )
{
ulOctvc1MsgType = cOCTVC1_MSG_TYPE_NOTIFICATION;
ulCommandId = ulMsgType | cOCTVC1_GSM_EID_BASE;
}
proto_tree_add_text(tree, tvb, offset, 1, "MsgType 0x%02x (CID:0x%08x, type:%d)", ulMsgType, ulCommandId, ulOctvc1MsgType );
offset += 1;
temp_data = tvb_get_guint8( tvb, offset );
proto_tree_add_text(tree, tvb, offset, 1, "size: %d", temp_data );
offset += 1;
temp_data = tvb_get_ntohs( tvb, offset );
proto_tree_add_text(tree, tvb, offset, 2, "sequence %d", temp_data );
offset += 2;
if( (ulMsgType & 0x7F) == 0x00 )
{
ulCommandId |= 0x100;
}
/*API is not orthogonal!! remap response to proper Ids */
if( ulOctvc1MsgType == cOCTVC1_MSG_TYPE_RESPONSE )
{
if( ulMsgType == 0x08 || ulMsgType == 0x09 )
ulCommandId = ((ulMsgType-1) & 0x7F) | cOCTVC1_GSM_CID_BASE;
if( ulMsgType == 0x0a )
ulCommandId = (0x11) | cOCTVC1_GSM_CID_BASE;
}
if( ulOctvc1MsgType == cOCTVC1_MSG_TYPE_COMMAND )
{
if( ulMsgType == 0x82 || ulMsgType == 0x81 )
ulCommandId |= cOCTVC1_MSG_NO_RESPONSE_FLAG;
}
if( ulOctvc1MsgType == cOCTVC1_MSG_TYPE_NOTIFICATION )
{
pszValueString = val_to_str( mWD_OCTVC1_CID_CODE( ulCommandId), GsmModule.apEvtIdValueString, cOCTVC1_UNKNOWN_STRING );
}else {
pszValueString = val_to_str( mWD_OCTVC1_CID_CODE( ulCommandId), GsmModule.apCodeIdValueString, cOCTVC1_UNKNOWN_STRING );
}
if ( check_col(pinfo->cinfo, COL_INFO) )
{
col_add_fstr( pinfo->cinfo, COL_INFO,
"%s_MSG_%s(0x%04X)",
GsmModule.pszModuleName,
pszValueString,
ulCommandId );
}
if ( check_col(pinfo->cinfo, COL_PROTOCOL) )
col_set_str(pinfo->cinfo, COL_PROTOCOL, "oct_gsm");
remaining_length = tvb_reported_length_remaining(tvb, offset);
message_tvb = tvb_new_subset(tvb, offset, remaining_length, remaining_length);
GsmModule.Dissector_fnc( ulOctvc1MsgType, ulCommandId, message_tvb, pinfo, tree);
/* We can call the amr plugin */
/* think it can support IF2 Frame (GPP TS 26.101), need to double check */
}
#ifdef cOCTVC1_WCDMA_UID
void dissect_OCTVC1_WCDMA(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
int temp_data, ulMsgType, ulCommandId, ulOctvc1MsgType, remaining_length, module_index;
int offset = 0;
tvbuff_t *message_tvb;
const gchar* pszValueString = NULL;
tModuleColInfo WcdmaModule;
/* Find Tbl Module Index */
match_strval_idx( cOCTVC1_WCDMA_UID, vals_OCTVC1_module_UID, &module_index );
/*Get the proper module info */
WcdmaModule = aOCTVC1ModuleColInfo[module_index];
ulMsgType = 0;
ulOctvc1MsgType = cOCTVC1_MSG_TYPE_COMMAND;
temp_data = tvb_get_ntohs( tvb, offset );
proto_tree_add_text(tree, tvb, offset, 1, "L1c etherType 0x%02x", temp_data );
offset += 2;
temp_data = tvb_get_ntohs( tvb, offset );
proto_tree_add_text(tree, tvb, offset, 1, "Body Size: %d", temp_data );
offset += 2;
temp_data = tvb_get_ntohs( tvb, offset );
proto_tree_add_text(tree, tvb, offset, 2, "Message Type: %d", temp_data );
offset += 2;
temp_data = tvb_get_ntohs( tvb, offset );
proto_tree_add_text(tree, tvb, offset, 2, "Message Id: %d", temp_data );
ulCommandId = (temp_data & 0x7F) | cOCTVC1_WCDMA_CID_BASE;
offset += 2;
temp_data = tvb_get_guint8( tvb, offset );
proto_tree_add_text(tree, tvb, offset, 2, "FP Header size: %d", temp_data );
offset += 2;
temp_data = tvb_get_guint8( tvb, offset );
proto_tree_add_text(tree, tvb, offset, 2, "Transaction Id: %d", temp_data );
offset += 2;
/*API is not orthogonal!! remap response to proper Ids */
if( ulOctvc1MsgType == cOCTVC1_MSG_TYPE_RESPONSE )
{
if( ulMsgType == 0x08 || ulMsgType == 0x09 )
ulCommandId = ((ulMsgType-1) & 0x7F) | cOCTVC1_GSM_CID_BASE;
if( ulMsgType == 0x0a )
ulCommandId = (0x11) | cOCTVC1_GSM_CID_BASE;
}
if( ulOctvc1MsgType == cOCTVC1_MSG_TYPE_NOTIFICATION )
{
pszValueString = val_to_str( mWD_OCTVC1_CID_CODE( ulCommandId), WcdmaModule.apEvtIdValueString, cOCTVC1_UNKNOWN_STRING );
}else {
pszValueString = val_to_str( mWD_OCTVC1_CID_CODE( ulCommandId), WcdmaModule.apCodeIdValueString, cOCTVC1_UNKNOWN_STRING );
}
if ( check_col(pinfo->cinfo, COL_INFO) )
{
col_add_fstr( pinfo->cinfo, COL_INFO,
"%s_MSG_%s(0x%04X)",
WcdmaModule.pszModuleName,
pszValueString,
ulCommandId );
}
if ( check_col(pinfo->cinfo, COL_PROTOCOL) )
col_set_str(pinfo->cinfo, COL_PROTOCOL, "oct_wcdma");
remaining_length = tvb_reported_length_remaining(tvb, offset);
message_tvb = tvb_new_subset(tvb, offset, remaining_length, remaining_length);
WcdmaModule.Dissector_fnc( ulOctvc1MsgType, ulCommandId, message_tvb, pinfo, tree);
/* We can call the amr plugin */
/* think it can support IF2 Frame (GPP TS 26.101), need to double check */
}
#endif
/*************************************************************************
*
* Code to register the protocol with Wireshark
*
**************************************************************************/
void proto_register_octvc1(void)
{
module_t *octvc1_module;
int proto_gsm = -1;
int proto_wcdma = -1;
proto_octvc1 = proto_register_protocol( "OCTVC1 Packets", "Octasic OCTVC1", "octvc1");
octvc1_module = prefs_register_protocol(proto_octvc1, pref_proto_octvc1_apply_callback);
prefs_register_string_preference(octvc1_module, "user_name", "User name", "OCTVC1 user name", &pszOctvc1_user_name);
prefs_register_string_preference(octvc1_module, "user_id", "User id", "OCTVC1 user id", &pszOctvc1_user_id);
/* register ctrl dissector */
proto_register_octvc1_ctrl();
/* register event dissector */
proto_register_octvc1_event();
/* Call module register fnc */
ws_register_dissector_module();
proto_gsm = proto_register_protocol( "OCTASIC GSM MODULE", "OCTGSM", "oct_gsm");
register_dissector("OCTGSM", dissect_OCTVC1_GSM, proto_gsm);
#ifdef cOCTVC1_WCDMA_UID
proto_wcdma = proto_register_protocol( "OCTASIC WCDMA MODULE", "OCTWCDMA", "oct_wcdma");
register_dissector("OCTWCDMA", dissect_OCTVC1_WCDMA, proto_wcdma);
#endif
}
/*************************************************************************
*
* If this dissector uses sub-dissector registration add a registration routine.
* This format is required because a script is used to find these routines and
* create the code that calls these routines.
*
**************************************************************************/
void proto_reg_handoff_octvc1(void)
{
extern int proto_octvc1_event;
extern int proto_octvc1_ctrl;
extern int dissect_octvc1_ctrl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
extern int dissect_octvc1_event(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
dissector_handle_t octvc1_ctrl_handle;
dissector_handle_t octvc1_event_handle;
register_dissector_table( "vocallonet.api_type", "Vocallonet API", FT_UINT32, BASE_HEX);
octvc1_ctrl_handle = new_create_dissector_handle(dissect_octvc1_ctrl, proto_octvc1_ctrl);
dissector_add_uint("vocallonet.api_type", 0, octvc1_ctrl_handle);
octvc1_event_handle = new_create_dissector_handle(dissect_octvc1_event, proto_octvc1_event);
dissector_add_uint("vocallonet.api_type", 0, octvc1_event_handle);
data_handle = find_dissector("data");
}

View File

@ -0,0 +1,101 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: octvocnet_common.c
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description: Contain the wireshark module dissector related functions
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Release: Octasic Application Development Framework OCTADF-01.00.01-B497 (2014/01/09)
$Octasic_Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
/***************************** INCLUDE FILES *******************************/
#include <config.h>
#include <epan/packet.h>
#include "../../../include/oct_ws_macro.h"
#include "../include/module.h"
#include "../include/octvocnet_common.h"
#include <octvocnet_pkt.h>
/****************************************************************************
MODULE API ENUMERATION STRING VALUES
****************************************************************************/
const value_string vals_tOCTVOCNET_PKT_CONTROL_PROTOCOL_TYPE_ENUM[] =
{
{ cOCTVOCNET_PKT_CONTROL_PROTOCOL_TYPE_ENUM_OCTVC1, "cOCTVOCNET_PKT_CONTROL_PROTOCOL_TYPE_ENUM_OCTVC1" },
{ 0, NULL }
};
const value_string vals_tOCTVOCNET_PKT_D_TYPE_ENUM[] =
{
{ cOCTVOCNET_PKT_D_TYPE_ENUM_TONE, "cOCTVOCNET_PKT_D_TYPE_ENUM_TONE" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_GEN_SID, "cOCTVOCNET_PKT_D_TYPE_ENUM_GEN_SID" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_LINEAR_8KSS, "cOCTVOCNET_PKT_D_TYPE_ENUM_LINEAR_8KSS" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_LINEAR_16KSS, "cOCTVOCNET_PKT_D_TYPE_ENUM_LINEAR_16KSS" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_PCM_U_LAW, "cOCTVOCNET_PKT_D_TYPE_ENUM_PCM_U_LAW" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_PCM_A_LAW, "cOCTVOCNET_PKT_D_TYPE_ENUM_PCM_A_LAW" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_PCM_U_LAW_VBD, "cOCTVOCNET_PKT_D_TYPE_ENUM_PCM_U_LAW_VBD" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_PCM_A_LAW_VBD, "cOCTVOCNET_PKT_D_TYPE_ENUM_PCM_A_LAW_VBD" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_G726_16, "cOCTVOCNET_PKT_D_TYPE_ENUM_G726_16" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_G726_24, "cOCTVOCNET_PKT_D_TYPE_ENUM_G726_24" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_G726_32, "cOCTVOCNET_PKT_D_TYPE_ENUM_G726_32" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_G726_40, "cOCTVOCNET_PKT_D_TYPE_ENUM_G726_40" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_G726_16_RTP, "cOCTVOCNET_PKT_D_TYPE_ENUM_G726_16_RTP" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_G726_24_RTP, "cOCTVOCNET_PKT_D_TYPE_ENUM_G726_24_RTP" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_G726_32_RTP, "cOCTVOCNET_PKT_D_TYPE_ENUM_G726_32_RTP" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_G726_40_RTP, "cOCTVOCNET_PKT_D_TYPE_ENUM_G726_40_RTP" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_G722_48, "cOCTVOCNET_PKT_D_TYPE_ENUM_G722_48" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_G722_56, "cOCTVOCNET_PKT_D_TYPE_ENUM_G722_56" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_G722_64, "cOCTVOCNET_PKT_D_TYPE_ENUM_G722_64" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_G723_1, "cOCTVOCNET_PKT_D_TYPE_ENUM_G723_1" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_G729A, "cOCTVOCNET_PKT_D_TYPE_ENUM_G729A" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_G729AB_8, "cOCTVOCNET_PKT_D_TYPE_ENUM_G729AB_8" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_AMR, "cOCTVOCNET_PKT_D_TYPE_ENUM_AMR" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_AMR_RTP, "cOCTVOCNET_PKT_D_TYPE_ENUM_AMR_RTP" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_EFR, "cOCTVOCNET_PKT_D_TYPE_ENUM_EFR" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_EFR_RTP, "cOCTVOCNET_PKT_D_TYPE_ENUM_EFR_RTP" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_FR, "cOCTVOCNET_PKT_D_TYPE_ENUM_FR" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_FR_RTP, "cOCTVOCNET_PKT_D_TYPE_ENUM_FR_RTP" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_AMR_WB, "cOCTVOCNET_PKT_D_TYPE_ENUM_AMR_WB" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_AMR_WB_RTP, "cOCTVOCNET_PKT_D_TYPE_ENUM_AMR_WB_RTP" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_ILBC, "cOCTVOCNET_PKT_D_TYPE_ENUM_ILBC" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_G722_1_24, "cOCTVOCNET_PKT_D_TYPE_ENUM_G722_1_24" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_G722_1_32, "cOCTVOCNET_PKT_D_TYPE_ENUM_G722_1_32" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_G729_1, "cOCTVOCNET_PKT_D_TYPE_ENUM_G729_1" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_G729_1_RTP, "cOCTVOCNET_PKT_D_TYPE_ENUM_G729_1_RTP" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_T38_UDPTL, "cOCTVOCNET_PKT_D_TYPE_ENUM_T38_UDPTL" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_T38_RTP, "cOCTVOCNET_PKT_D_TYPE_ENUM_T38_RTP" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_VOX, "cOCTVOCNET_PKT_D_TYPE_ENUM_VOX" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_YUV_RTP_RFC4175, "cOCTVOCNET_PKT_D_TYPE_ENUM_YUV_RTP_RFC4175" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_RAW_YUV, "cOCTVOCNET_PKT_D_TYPE_ENUM_RAW_YUV" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_RAW_RGB, "cOCTVOCNET_PKT_D_TYPE_ENUM_RAW_RGB" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_RAW_YUV_EXTENDED, "cOCTVOCNET_PKT_D_TYPE_ENUM_RAW_YUV_EXTENDED" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_H263_RTP_RFC2190, "cOCTVOCNET_PKT_D_TYPE_ENUM_H263_RTP_RFC2190" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_H263_RTP_RFC2190_BYTE_BOUNDARY, "cOCTVOCNET_PKT_D_TYPE_ENUM_H263_RTP_RFC2190_BYTE_BOUNDARY" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_H263_RTP_RFC2429, "cOCTVOCNET_PKT_D_TYPE_ENUM_H263_RTP_RFC2429" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_MPEG4_RTP_RFC3016, "cOCTVOCNET_PKT_D_TYPE_ENUM_MPEG4_RTP_RFC3016" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_H264_RTP_RFC3984, "cOCTVOCNET_PKT_D_TYPE_ENUM_H264_RTP_RFC3984" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_FAST_YUV, "cOCTVOCNET_PKT_D_TYPE_ENUM_FAST_YUV" },
{ cOCTVOCNET_PKT_D_TYPE_ENUM_UNKNOWN_RTP_PAYLOAD_TYPE, "cOCTVOCNET_PKT_D_TYPE_ENUM_UNKNOWN_RTP_PAYLOAD_TYPE" },
{ 0, NULL }
};

View File

@ -0,0 +1,61 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: plugin.c
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description:
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Release: Octasic Application Development Framework OCTADF-01.00.01-B497 (2014/01/09)
$Octasic_Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <gmodule.h>
#include "../include/plugin_info.h"
#ifndef ENABLE_STATIC
#if defined(VERSION_MAJOR) && (VERSION_MAJOR > 1 || (VERSION_MAJOR == 1 && VERSION_MINOR > 8))
#define WS_BUILD_DLL
#include "ws_symbol_export.h"
#define WS_EXPORT WS_DLL_PUBLIC_NOEXTERN
#else
#define WS_EXPORT G_MODULE_EXPORT
#endif
WS_EXPORT const gchar version[] = VERSION;
/* Start the functions we need for the plugin stuff */
WS_EXPORT void
plugin_register (void)
{
{extern void proto_register_octvc1(void); proto_register_octvc1();}
}
WS_EXPORT void
plugin_reg_handoff(void)
{
{extern void proto_reg_handoff_octvc1(void); proto_reg_handoff_octvc1();}
}
#endif

View File

@ -0,0 +1,85 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: ws_util.c
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description:
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Release: Octasic Application Development Framework OCTADF-01.00.01-B497 (2014/01/09)
$Octasic_Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
/***************************** INCLUDE FILES *******************************/
#include <config.h>
#include <epan/packet.h>
#include <octvc1_rc2string.h>
#include "../../../include/oct_ws_macro.h"
/***************************** DEFINES **************************************/
void ws_dissector_not_registered(void)
{
}
/*************************************************************************
*
* Return 0 on success
**************************************************************************/
int ws_dissector_notimplemented( tvbuff_t * UNUSED(tvb), packet_info * UNUSED(pinfo), proto_tree * UNUSED(tree), unsigned int UNUSED(offset) )
{
return 1;
}
/*************************************************************************
*
* Return 0 on success
**************************************************************************/
int ws_dissector_module_notimplemented( guint8 UNUSED( message_type ), guint32 UNUSED(CID), tvbuff_t * UNUSED(tvb), packet_info * UNUSED(pinfo),
proto_tree * UNUSED(tree) )
{
return 1;
}
unsigned int dissect_tOCTVC1_MAIN_FILE_HANDLE(tvbuff_t * UNUSED(tvb), packet_info * UNUSED(pinfo), proto_tree * UNUSED(tree), unsigned int UNUSED(offset))
{
return 0;
}
const char * dissect_OCTVC1_Return_Code( guint32 ulRc )
{
return octvc1_rc2string( ulRc );
}
#if defined(VERSION_MAJOR) && (VERSION_MAJOR > 1 || (VERSION_MAJOR == 1 && VERSION_MINOR > 8))
/*************************************************************************
*
*
**************************************************************************/
/* Generate a string describing an enumerated bitfield (an N-bit field with various specific values having particular names). */
const char *decode_enumerated_bitfield(const guint32 val, const guint32 mask, const int width, const value_string *tab, const char *fmt)
{
static char buf[1025];
char *p;
p = decode_bitfield_value(buf, val, mask, width);
g_snprintf(p, (gulong) (1024-(p-buf)), fmt, val_to_str(val & mask, tab, "Unknown"));
return buf;
}
#endif

View File

@ -0,0 +1,34 @@
#include "winver.h"
VS_VERSION_INFO VERSIONINFO
FILEVERSION @RC_MODULE_VERSION@
PRODUCTVERSION @RC_VERSION@
FILEFLAGSMASK 0x0L
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0
#endif
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_DLL
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Octasic, http://www.octasic.com/\0"
VALUE "FileDescription", "@PACKAGE@ dissector\0"
VALUE "FileVersion", "@MODULE_VERSION@\0"
VALUE "InternalName", "@INTERNAL_NAME@\0"
VALUE "LegalCopyright", "Copyright © 2013 Octasic\0"
VALUE "OriginalFilename", "@PLUGIN_NAME@.dll\0"
VALUE "ProductName", "Wireshark\0"
VALUE "ProductVersion", "@VERSION@\0"
VALUE "Comments", "Build with @MSVC_VARIANT@\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END

View File

@ -0,0 +1 @@
WS_DEV_ROOT=Y:\work\3rdParty\wireshark

7
readme.txt Normal file
View File

@ -0,0 +1,7 @@
GSM Wireshark Plugin Source Code
This source code works with Wireshark version 1.6.5.
Makefile for octvc1 plugin is located in application\tool\wireshark\plugins\octasic\octsdr
Makefile for octpkt_ws plugin is located in application\tool\wireshark\plugins\octasic\octpkt_ws

View File

@ -0,0 +1,63 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: OCTDEV_DEVICES.h
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description:
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Octasic_Release: OCTSDR-2G-01.08.05-B29-ALPHA (2014/08/14)
$Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#ifndef __OCTDEV_DEVICES_H__
#define __OCTDEV_DEVICES_H__
/***************************** INCLUDE FILES *******************************/
#include "octdev_types.h"
/************************ COMMON DEFINITIONS *******************************/
/*-------------------------------------------------------------------------------------
tOCTDEV_DEVICES_TYPE_ENUM : Octasic Device type.
-------------------------------------------------------------------------------------*/
#define tOCTDEV_DEVICES_TYPE_ENUM tOCT_UINT32
#define cOCTDEV_DEVICES_TYPE_ENUM_INVALID 0x0
#define cOCTDEV_DEVICES_TYPE_ENUM_OCT1010 0x1
#define cOCTDEV_DEVICES_TYPE_ENUM_OCT2200 0x2
/*-------------------------------------------------------------------------------------
tOCTDEV_DEVICES_DSP_CORE_TYPE_ENUM : Octasic DSP Core type.
-------------------------------------------------------------------------------------*/
#define tOCTDEV_DEVICES_DSP_CORE_TYPE_ENUM tOCT_UINT32
#define cOCTDEV_DEVICES_DSP_CORE_TYPE_ENUM_INVALID 0x0
#define cOCTDEV_DEVICES_DSP_CORE_TYPE_ENUM_OPUS1 0x1
#define cOCTDEV_DEVICES_DSP_CORE_TYPE_ENUM_OPUS2 0x2
/*-------------------------------------------------------------------------------------
OCT1010 specific definitions.
-------------------------------------------------------------------------------------*/
#define cOCTDEV_DEVICES_OCT1010_MAX_CORE_NUMBER 15 /* Maximum number of core in the OCT1010. */
#define cOCTDEV_DEVICES_OCT1010_MAX_VSPMGR_THREADS 12 /* Maximum number of VSP Mgr threads that can be started on the OCT1010. */
#define cOCTDEV_DEVICES_OCT1010_CORE_TYPE cOCTDEV_DEVICES_DSP_CORE_TYPE_ENUM_OPUS1 /* Type of DSP Core in the OCT1010. */
#define cOCTDEV_DEVICES_OCT1010_MAX_ETH_PORT_NUMBER 2 /* Maximum number of Ethernet port in the OCT1010. */
/*-------------------------------------------------------------------------------------
OCT2200 specific definitions.
-------------------------------------------------------------------------------------*/
#define cOCTDEV_DEVICES_OCT2200_MAX_CORE_NUMBER 24 /* Maximum number of core in the OCT2200. */
#define cOCTDEV_DEVICES_OCT2200_MAX_VSPMGR_THREADS 21 /* Maximum number of VSP Mgr threads that can be started on the OCT2200. */
#define cOCTDEV_DEVICES_OCT2200_CORE_TYPE cOCTDEV_DEVICES_DSP_CORE_TYPE_ENUM_OPUS2 /* Type of DSP Core in the OCT2200. */
#define cOCTDEV_DEVICES_OCT2200_MAX_ETH_PORT_NUMBER 4 /* Maximum number of Ethernet port in the OCT2200. */
#endif /* __OCTDEV_DEVICES_H__ */

View File

@ -0,0 +1,91 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: OCTDEV_MACRO.h
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description:
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Octasic_Release: OCTSDR-2G-01.08.05-B29-ALPHA (2014/08/14)
$Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#ifndef __OCTDEV_MACRO_H__
#define __OCTDEV_MACRO_H__
/***************************** INCLUDE FILES *******************************/
#include "octdev_types.h"
/************************ COMMON DEFINITIONS *******************************/
/*-------------------------------------------------------------------------------------
Generic swap macros
-------------------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------
32-bit Endian Swapping when target is Little Endian
----------------------------------------------------------------------------*/
#if !defined( mOCT_SWAP32_IF_LE )
#if defined( __linux__ )
/* Linux (and probably other unices') htonl implementation is far more
* efficient than our own; Win32 implementation, howerever is similar to
* our own BUT with the added cost of a function call */
#include <arpa/inet.h>
#define mOCT_SWAP32_IF_LE htonl
#else /* __linux__ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCT_SWAP32_IF_LE( f_ulValue ) \
( (((f_ulValue) & 0xff000000 ) >> 24) | \
(((f_ulValue) & 0x00ff0000 ) >> 8) | \
(((f_ulValue) & 0x0000ff00 ) << 8) | \
(((f_ulValue) & 0x000000ff ) << 24) )
#else
#define mOCT_SWAP32_IF_LE( f_ulValue ) (f_ulValue)
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#endif /* __linux__ */
#endif /* mOCT_SWAP32_IF_LE */
/*--------------------------------------------------------------------------
16-bit Endian Swapping when target is Little Endian
----------------------------------------------------------------------------*/
#if !defined( mOCT_SWAP16_IF_LE )
#if defined( __linux__ )
/* Linux (and probably other unices') htons implementation is far more
* efficient than our own; Win32 implementation, howerever is similar to
* our own BUT with the added cost of a function call */
#include <arpa/inet.h>
#define mOCT_SWAP16_IF_LE htons
#else /* __linux__ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCT_SWAP16_IF_LE( f_usValue ) \
( (((f_usValue) & 0x00ff ) << 8) | \
(((f_usValue) & 0xff00 ) >> 8) )
#else
#define mOCT_SWAP16_IF_LE( f_usValue ) (f_usValue)
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#endif /* __linux__ */
#endif /* mOCT_SWAP16_IF_LE */
#endif /* __OCTDEV_MACRO_H__ */

View File

@ -0,0 +1,105 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: OCTDEV_OPUS_REV.h
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description:
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Octasic_Release: OCTSDR-2G-01.08.05-B29-ALPHA (2014/08/14)
$Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#ifndef __OCTDEV_OPUS_REV_H__
#define __OCTDEV_OPUS_REV_H__
/************************ COMMON DEFINITIONS *******************************/
/*-------------------------------------------------------------------------------------
Revision history
-------------------------------------------------------------------------------------*/
#ifdef _M_OPUS1
#define OCT1010_REV_B
#endif /* _M_OPUS1 */
#ifdef OCT1010_REV_A
#define d1jnsrc d1jnsrp
#define d2jnsrc d2jnsrp
#define d4jnsrc d4jnsrp
#define d8jnsrc d8jnsrp
#define d16jnsrc d16jnsrp
#define d32jnsrc d32jnsrp
#define d64jnsrc d64jnsrp
#define d128jnsrc d128jnsrp
#define d1jnsc d1jnsrp
#define d2jnsc d2jnsrp
#define d4jnsc d4jnsrp
#define d8jnsc d8jnsrp
#define d16jnsc d16jnsrp
#define d32jnsc d32jnsrp
#define d64jnsc d64jnsrp
#define d128jnsc d128jnsrp
/* need for the migration from Rev A to Rev B
*/
#define mOCTDEV_OPUS_RDTSC_CORRECTION( f_ulTimestamp ) \
_asm and f_ulTimestamp, 0x7FFFFFFF
#define mOCTDEV_OPUS_RDTSC_CORRECTION_C( f_ulTimestamp ) \
f_ulTimestamp &= 0x7FFFFFFF;
#define mOCTDEV_OPUS_UNSEIZABLE_FIX( f_ulRegister ) \
_asm { halt ( ( f_ulRegister & 0 ) != 0 ) }
#define mOCTDEV_OPUS_UNSEIZABLE_FIX_C( f_ulRegister ) \
{_chalt(( f_ulRegister & 0 ) != 0 );}
#endif /* OCT1010_REV_A */
#ifdef OCT1010_REV_B
#define mOCTDEV_OPUS_RDTSC_CORRECTION( f_ulTimestamp ) \
_asm and f_ulTimestamp, 0x7FFFFFFF
#define mOCTDEV_OPUS_RDTSC_CORRECTION_C( f_ulTimestamp ) \
f_ulTimestamp &= 0x7FFFFFFF;
#define mOCTDEV_OPUS_UNSEIZABLE_FIX( f_ulRegister ) \
_asm { halt ( ( f_ulRegister & 0 ) != 0 ) }
#define mOCTDEV_OPUS_UNSEIZABLE_FIX_C( f_ulRegister ) \
{_chalt(( f_ulRegister & 0 ) != 0 );}
#endif /* OCT1010_REV_B */
#ifdef _M_OPUS2
#define OCT2200_REV_B
#endif /* _M_OPUS2 */
#ifdef OCT2200_REV_A
#define mOCTDEV_OPUS_RDTSC_CORRECTION( f_ulTimestamp )
#define mOCTDEV_OPUS_RDTSC_CORRECTION_C( f_ulTimestamp )
#define mOCTDEV_OPUS_UNSEIZABLE_FIX( f_ulRegister )
#define mOCTDEV_OPUS_UNSEIZABLE_FIX_C( f_ulRegister )
#endif /* OCT2200_REV_A */
#ifdef OCT2200_REV_B
#define mOCTDEV_OPUS_RDTSC_CORRECTION( f_ulTimestamp )
#define mOCTDEV_OPUS_RDTSC_CORRECTION_C( f_ulTimestamp )
#define mOCTDEV_OPUS_UNSEIZABLE_FIX( f_ulRegister )
#define mOCTDEV_OPUS_UNSEIZABLE_FIX_C( f_ulRegister )
#endif /* OCT2200_REV_B */
#endif /* __OCTDEV_OPUS_REV_H__ */

View File

@ -0,0 +1,39 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: OCTDEV_RC_BASE.h
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description:
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Octasic_Release: OCTSDR-2G-01.08.05-B29-ALPHA (2014/08/14)
$Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#ifndef __OCTDEV_RC_BASE_H__
#define __OCTDEV_RC_BASE_H__
/************************ COMMON DEFINITIONS *******************************/
/*-------------------------------------------------------------------------------------
Gemeric Return Code bases
-------------------------------------------------------------------------------------*/
#define cOCTADF_TARGET_RC_BASE 0x01000000
#define cOCTVC1_API_RC_BASE 0x0A000000
#define cOCTCOMMON_API_RC_BASE 0x0E000000
#define cOCTDEVICE_API_RC_BASE 0x0F000000
/*-------------------------------------------------------------------------------------
Return Code fatal flag
-------------------------------------------------------------------------------------*/
#define cOCTDEV_RC_FATAL_FLAG 0x80000000
#endif /* __OCTDEV_RC_BASE_H__ */

View File

@ -0,0 +1,277 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: OCTDEV_TYPES.h
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description:
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Octasic_Release: OCTSDR-2G-01.08.05-B29-ALPHA (2014/08/14)
$Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#ifndef __OCTDEV_TYPES_H__
#define __OCTDEV_TYPES_H__
/***************************** INCLUDE FILES *******************************/
#include <limits.h>
/************************ COMMON DEFINITIONS *******************************/
/*-------------------------------------------------------------------------------------
API Data Types
-------------------------------------------------------------------------------------*/
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#if SHRT_MAX == 32767
/* short is 16-bit */
typedef unsigned short tOCT_UINT16;
typedef short tOCT_INT16;
#elif INT_MAX == 32767
/* integer is 16-bit */
typedef unsigned int tOCT_UINT16;
typedef int tOCT_INT16;
#else
/* unexpected 16-bit type */
#error Cannot determine 16-bit type
#endif
#if INT_MAX == 2147483647L
/* integer is 32-bit */
typedef int tOCT_INT32;
typedef unsigned int tOCT_UINT32;
#elif LONG_MAX == 2147483647L
/* long is 32-bit */
typedef long tOCT_INT32;
typedef unsigned long tOCT_UINT32;
#else
/* unexpected 32-bit type */
#error Cannot determine 32-bit type
#endif
typedef char tOCT_INT8;
typedef unsigned char tOCT_UINT8;
/*-------------------------------------------------------------------------------------
TRUE/FALSE
-------------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------------
tOCT_BOOL32 :
-------------------------------------------------------------------------------------*/
#define tOCT_BOOL32 tOCT_UINT32
#define cOCT_TRUE 1
#define cOCT_FALSE 0
/*-------------------------------------------------------------------------------------
Generic Timeout value
-------------------------------------------------------------------------------------*/
#define cOCTDEV_TIMEOUT_FOREVER 0xFFFFFFFF
/*--------------------------------------------------------------------------
ENDIAN Determination
_OCT_ENDIAN_TYPE_BE_: Defined when target is Big Endian
_OCT_ENDIAN_TYPE_LE_: Defined when target is Little Endian
These must be set by the user. If not set the system will try to
automatically determine them based on some common compiler #define
values.
----------------------------------------------------------------------------*/
#if !defined( _OCT_ENDIAN_TYPE_BE_ ) && !defined( _OCT_ENDIAN_TYPE_LE_ )
/* Not Set - try to determine automatically */
/* Look for Intel target */
#if defined( __OCT_ENV_OPUS__ ) || defined( _M_OPUS1 ) || defined( _M_OPUS2 ) || defined( _M_OPUS3 )
#define _OCT_ENDIAN_TYPE_BE_
#elif defined( _M_IX86 ) || defined(__x86_64__)
#define _OCT_ENDIAN_TYPE_LE_
#elif defined( __i386 )
#define _OCT_ENDIAN_TYPE_LE_
#elif defined( i386 )
#define _OCT_ENDIAN_TYPE_LE_
/* Look for Motorola PPC target */
#elif defined( _M_MPPC ) || defined( _M_PPC ) || defined( __ppc__ ) || defined( __PPC )
#define _OCT_ENDIAN_TYPE_BE_
/* Look for Sparc target */
#elif defined( __sparc )
#define _OCT_ENDIAN_TYPE_BE_
#elif defined( __sun__ )
#define _OCT_ENDIAN_TYPE_BE_
/* Look for ARM target */
#elif defined( __ARMEL__ )
#define _OCT_ENDIAN_TYPE_LE_
/* Look for MIPS target */
#elif defined( __mips__ ) || defined( __MIPSEB )
#define _OCT_ENDIAN_TYPE_BE_
/* others */
#elif defined( CPU )
#if CPU==PPC860
#define _OCT_ENDIAN_TYPE_BE_
#endif
#endif
#endif
/* Now insure the endian format is set properly */
#if !defined( _OCT_ENDIAN_TYPE_BE_ ) && !defined( _OCT_ENDIAN_TYPE_LE_ )
#error Processor Endian not determined
#endif
#if defined( _OCT_ENDIAN_TYPE_BE_ ) && defined( _OCT_ENDIAN_TYPE_LE_ )
#error Processor Endian Set to both Values
#endif
/*--------------------------------------------------------------------------
PLATFORM Determination
OCT_WINDOWS_ENV : Defined when target running under windows
OCT_LINUX_ENV : Defined when target running under linux
OCT_OPUS_ENV : OPUS env
OCT_UNKNOWN_ENV : Unknown env
----------------------------------------------------------------------------*/
#define __OCTDEV_TYPE_STR2__(x) #x
#define __OCTDEV_TYPE_STR1__(x) __OCTDEV_TYPE_STR2__(x)
#define __OCTDEV_TYPE_WARNLOC__ __FILE__ "("__OCTDEV_TYPE_STR1__(__LINE__)") : Warning Msg: "
#if defined( __OCT_ENV_OPUS__ ) || defined( _M_OPUS1 ) || defined( _M_OPUS2 ) || defined( _M_OPUS3 )
#define OCT_ENV_TYPE_OPUS
#ifdef _DEBUG
#define OCT_ENV_MODE_DEBUG
#endif
#elif defined( _LINUX_ ) || defined( __linux__ )
#define OCT_ENV_TYPE_LINUX
#ifndef NDEBUG
#define OCT_ENV_MODE_DEBUG
#endif
#elif defined( _WIN32 ) || defined( _WIN64 ) || defined( WIN32 ) || defined( WIN64 )
#define OCT_ENV_TYPE_WINDOWS
#ifdef _DEBUG
#define OCT_ENV_MODE_DEBUG
#endif
#else
#define OCT_ENV_TYPE_UNKNOWN
#pragma message(__OCTDEV_TYPE_WARNLOC__"Environment platform not determined")
#endif
/*-------------------------------------------------------------------------------------
Generic IP Address
-------------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------------
tOCTDEV_IP_VERSION_ENUM :
-------------------------------------------------------------------------------------*/
#define tOCTDEV_IP_VERSION_ENUM tOCT_UINT32
#define cOCTDEV_IP_VERSION_ENUM_4 0 /* IP address version 4 */
#define cOCTDEV_IP_VERSION_ENUM_6 1 /* IP address version 6 */
#define cOCTDEV_IP_VERSION_ENUM_INVALID 0xFFFFFFFF
/*-------------------------------------------------------------------------------------
tOCTDEV_IP_ADDRESS
IP address structure
Members:
ulIpVersion
Default: cOCTDEV_IP_VERSION_ENUM_4
Version of the IP address
aulIpAddress
Ip address, Version 4 -> aulIpAddress[0] only.
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTDEV_IP_VERSION_ENUM ulIpVersion;
tOCT_UINT32 aulIpAddress[4];
} tOCTDEV_IP_ADDRESS;
/*-------------------------------------------------------------------------------------
Generic UDP Address
-------------------------------------------------------------------------------------*/
#define cOCTDEV_UDP_PORT_INVALID 0xFFFFFFFF /* Invalid UDP port specification. */
/*-------------------------------------------------------------------------------------
tOCTDEV_UDP_ADDRESS
UDP address structure
Members:
IpAddress
IP version and address.
ulUdpPort
Default: cOCTDEV_UDP_PORT_INVALID
UDP port used with IP address
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTDEV_IP_ADDRESS IpAddress;
tOCT_UINT32 ulUdpPort;
} tOCTDEV_UDP_ADDRESS;
/*-------------------------------------------------------------------------------------
Generic TCP Address
-------------------------------------------------------------------------------------*/
#define cOCTDEV_TCP_PORT_INVALID 0xFFFFFFFF /* Invalid TCP port specification. */
/*-------------------------------------------------------------------------------------
tOCTDEV_TCP_ADDRESS
TCP address structure
Members:
IpAddress
IP version and address.
ulTcpPort
Default: cOCTDEV_TCP_PORT_INVALID
TCP port used with IP address
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTDEV_IP_ADDRESS IpAddress;
tOCT_UINT32 ulTcpPort;
} tOCTDEV_TCP_ADDRESS;
/*-------------------------------------------------------------------------------------
Generic MAC Address
-------------------------------------------------------------------------------------*/
#define cOCTDEV_MAC_ADDRESS_BYTE_COUNT 6
/*-------------------------------------------------------------------------------------
tOCTDEV_MAC_ADDRESS
MAC address structure
Members:
abyReserved
Reserved fields inserted to ensure that the structure is an integer multiple of
DWORDS.
abyMacAddress
MAC address; abyMacAddress[0] = msb, abyMacAddress[5] = lsb.
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCT_UINT8 abyReserved[2];
tOCT_UINT8 abyMacAddress[cOCTDEV_MAC_ADDRESS_BYTE_COUNT];
} tOCTDEV_MAC_ADDRESS;
#endif /* __OCTDEV_TYPES_H__ */

View File

@ -0,0 +1,67 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
File: octdev_types_swap.h
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description:
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Octasic_Release: OCTSDR-2G-01.08.05-B29-ALPHA (2014/08/14)
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#ifndef __OCTDEV_TYPES_SWAP_H__
#define __OCTDEV_TYPES_SWAP_H__
#ifdef __cplusplus
extern "C" {
#endif
/***************************** INCLUDE FILES *******************************/
#include "vocallo/octvc1_swap_hdrs.h"
#include "octdev_types.h"
/********************************* MACROS **********************************/
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTDEV_IP_ADDRESS_SWAP( _f_pParms ){ tOCTDEV_IP_ADDRESS * pOCTDEV_IP_ADDRESS = (_f_pParms); \
((tOCTDEV_IP_ADDRESS *)pOCTDEV_IP_ADDRESS)->ulIpVersion = \
mOCT_SWAP32_IF_LE(((tOCTDEV_IP_ADDRESS *)pOCTDEV_IP_ADDRESS)->ulIpVersion); \
{ tOCT_UINT32 iOCTDEV_IP_ADDRESS; \
for( iOCTDEV_IP_ADDRESS=0; \
iOCTDEV_IP_ADDRESS<(4);iOCTDEV_IP_ADDRESS++ ) \
((tOCTDEV_IP_ADDRESS *)pOCTDEV_IP_ADDRESS)->aulIpAddress[iOCTDEV_IP_ADDRESS] = \
mOCT_SWAP32_IF_LE(((tOCTDEV_IP_ADDRESS *)pOCTDEV_IP_ADDRESS)->aulIpAddress[iOCTDEV_IP_ADDRESS]);}\
}
#else
#define mOCTDEV_IP_ADDRESS_SWAP( pOCTDEV_IP_ADDRESS )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTDEV_UDP_ADDRESS_SWAP( _f_pParms ){ tOCTDEV_UDP_ADDRESS * pOCTDEV_UDP_ADDRESS = (_f_pParms); \
{ mOCTDEV_IP_ADDRESS_SWAP( &((tOCTDEV_UDP_ADDRESS *)pOCTDEV_UDP_ADDRESS)->IpAddress ); } \
((tOCTDEV_UDP_ADDRESS *)pOCTDEV_UDP_ADDRESS)->ulUdpPort = \
mOCT_SWAP32_IF_LE(((tOCTDEV_UDP_ADDRESS *)pOCTDEV_UDP_ADDRESS)->ulUdpPort); \
}
#else
#define mOCTDEV_UDP_ADDRESS_SWAP( pOCTDEV_UDP_ADDRESS )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTDEV_TCP_ADDRESS_SWAP( _f_pParms ){ tOCTDEV_TCP_ADDRESS * pOCTDEV_TCP_ADDRESS = (_f_pParms); \
{ mOCTDEV_IP_ADDRESS_SWAP( &((tOCTDEV_TCP_ADDRESS *)pOCTDEV_TCP_ADDRESS)->IpAddress ); } \
((tOCTDEV_TCP_ADDRESS *)pOCTDEV_TCP_ADDRESS)->ulTcpPort = \
mOCT_SWAP32_IF_LE(((tOCTDEV_TCP_ADDRESS *)pOCTDEV_TCP_ADDRESS)->ulTcpPort); \
}
#else
#define mOCTDEV_TCP_ADDRESS_SWAP( pOCTDEV_TCP_ADDRESS )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#ifdef __cplusplus
}
#endif
#endif /* __OCTDEV_TYPES_SWAP_H__ */

View File

@ -0,0 +1,91 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: OCTPKT_HDR.h
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description:
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Octasic_Release: OCTSDR-2G-01.08.05-B29-ALPHA (2014/08/14)
$Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#ifndef __OCTPKT_HDR_H__
#define __OCTPKT_HDR_H__
/***************************** INCLUDE FILES *******************************/
#include "../octdev_types.h"
/************************ COMMON DEFINITIONS *******************************/
#define cOCTPKT_HDR_ETHERTYPE 0x5200
#define cOCTPKT_HDR_WCDMA 0xCDAB
#define cOCTPKT_HDR_GSM 0xF00D
/*-------------------------------------------------------------------------------------
OctPkt-Packet Format Values
-------------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------------
tOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK :
-------------------------------------------------------------------------------------*/
#define tOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK tOCT_UINT32
#define cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_FORMAT_BIT_MASK 0x000000FF
#define cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_FORMAT_BIT_OFFSET 24
#define cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_FORMAT ((tOCT_UINT32)(cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_FORMAT_BIT_MASK<<cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_FORMAT_BIT_OFFSET) )
#define cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_TRACE_BIT_MASK 0x00000001
#define cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_TRACE_BIT_OFFSET 23
#define cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_TRACE ((tOCT_UINT32)(cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_TRACE_BIT_MASK<<cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_TRACE_BIT_OFFSET) )
#define cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_CONTROL_PROTOCOL_TYPE_BIT_MASK 0x0000000F
#define cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_CONTROL_PROTOCOL_TYPE_BIT_OFFSET 11
#define cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_CONTROL_PROTOCOL_TYPE ((tOCT_UINT32)(cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_CONTROL_PROTOCOL_TYPE_BIT_MASK<<cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_CONTROL_PROTOCOL_TYPE_BIT_OFFSET) )
#define cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_LENGTH_BIT_MASK 0x000007FF
#define cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_LENGTH_BIT_OFFSET 0
#define cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_LENGTH ((tOCT_UINT32)(cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_LENGTH_BIT_MASK<<cOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK_LENGTH_BIT_OFFSET) )
/*-------------------------------------------------------------------------------------
tOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM :
-------------------------------------------------------------------------------------*/
#define tOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM tOCT_UINT32
#define cOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM_OCTVOCNET 0x0 /* Vocallo MGW Control Protocol */
#define cOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM_OCTMFA 0x1 /* Media Flow Aggregator Control Protocol */
#define cOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM_LTE_FAPI 0x2 /* SDR LTE femtocells API Protocol */
#define cOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM_OCTSDR 3 /* Sdr packets */
#define cOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM_TEST 0xE /* TEST Protocol */
#define cOCTPKT_HDR_CONTROL_PROTOCOL_TYPE_ENUM_NONE 0xFFFFFFFF /* Not used */
/*-------------------------------------------------------------------------------------
tOCTPKT_HDR
COMMON Packet Header
32-bit value
bits[31:24] = Format
bit[23] = Trace Flag
bits[22:15] = 0=Reserved
bits[14:11] = Control Protocol Type
bits[10:0] = Total Packet Size in bytes
Members:
ul_Format_Trace_Length
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTPKT_HDR_FORMAT_PROTO_TYPE_LEN_MASK ul_Format_Trace_Length;
} tOCTPKT_HDR;
#endif /* __OCTPKT_HDR_H__ */

View File

@ -0,0 +1,42 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
File: octpkt_hdr_swap.h
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description:
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Octasic_Release: OCTSDR-2G-01.08.05-B29-ALPHA (2014/08/14)
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#ifndef __OCTPKT_HDR_SWAP_H__
#define __OCTPKT_HDR_SWAP_H__
#ifdef __cplusplus
extern "C" {
#endif
/***************************** INCLUDE FILES *******************************/
#include "../vocallo/octvc1_swap_hdrs.h"
#include "octpkt_hdr.h"
/********************************* MACROS **********************************/
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTPKT_HDR_SWAP( _f_pParms ){ tOCTPKT_HDR * pOCTPKT_HDR = (_f_pParms); \
((tOCTPKT_HDR *)pOCTPKT_HDR)->ul_Format_Trace_Length = \
mOCT_SWAP32_IF_LE(((tOCTPKT_HDR *)pOCTPKT_HDR)->ul_Format_Trace_Length); \
}
#else
#define mOCTPKT_HDR_SWAP( pOCTPKT_HDR )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#ifdef __cplusplus
}
#endif
#endif /* __OCTPKT_HDR_SWAP_H__ */

View File

@ -0,0 +1,85 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: OCTPKT_HDRXL.h
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description:
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Octasic_Release: OCTSDR-2G-01.08.05-B29-ALPHA (2014/08/14)
$Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#ifndef __OCTPKT_HDRXL_H__
#define __OCTPKT_HDRXL_H__
/***************************** INCLUDE FILES *******************************/
#include "../octdev_types.h"
#include "octpkt_hdr.h"
/************************ COMMON DEFINITIONS *******************************/
#define cOCTPKT_HDRXL_ETHERTYPE 0x5201
/*-------------------------------------------------------------------------------------
OctPkt-Packet Format Values
-------------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------------
tOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK :
-------------------------------------------------------------------------------------*/
#define tOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK tOCT_UINT32
#define cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_FORMAT_BIT_MASK 0x000000FF
#define cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_FORMAT_BIT_OFFSET 16
#define cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_FORMAT ((tOCT_UINT32)(cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_FORMAT_BIT_MASK<<cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_FORMAT_BIT_OFFSET) )
#define cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_CONTROL_PROTOCOL_TYPE_BIT_MASK 0x0000000F
#define cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_CONTROL_PROTOCOL_TYPE_BIT_OFFSET 28
#define cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_CONTROL_PROTOCOL_TYPE ((tOCT_UINT32)(cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_CONTROL_PROTOCOL_TYPE_BIT_MASK<<cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_CONTROL_PROTOCOL_TYPE_BIT_OFFSET) )
#define cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_LENGTH_BIT_MASK 0x0000FFFF
#define cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_LENGTH_BIT_OFFSET 0
#define cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_LENGTH ((tOCT_UINT32)(cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_LENGTH_BIT_MASK<<cOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK_LENGTH_BIT_OFFSET) )
/*-------------------------------------------------------------------------------------
tOCTPKT_HDRXL
COMMON Packet Header Extended Length
32-bit value
bits[31:28] = Control Protocol Type
bits[27:24] = Reserved
bits[23:16] = Format (depend of the Protocol)
bits[15:0] = Total Packet Length (size in bytes)
Members:
ul_Proto_Format_Length
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTPKT_HDRXL_FORMAT_PROTO_TYPE_LEN_MASK ul_Proto_Format_Length;
} tOCTPKT_HDRXL;
/*-------------------------------------------------------------------------------------
tOCTPKT_HDRXL_ETH
Ethernet alignement header
Members:
usReserved
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCT_UINT16 usReserved;
} tOCTPKT_HDRXL_ETH;
#endif /* __OCTPKT_HDRXL_H__ */

View File

@ -0,0 +1,51 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
File: octpkt_hdrxl_swap.h
Copyright (c) 2014 Octasic Inc. All rights reserved.
Description:
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Octasic_Release: OCTSDR-2G-01.08.05-B29-ALPHA (2014/08/14)
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#ifndef __OCTPKT_HDRXL_SWAP_H__
#define __OCTPKT_HDRXL_SWAP_H__
#ifdef __cplusplus
extern "C" {
#endif
/***************************** INCLUDE FILES *******************************/
#include "../vocallo/octvc1_swap_hdrs.h"
#include "octpkt_hdrxl.h"
/********************************* MACROS **********************************/
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTPKT_HDRXL_SWAP( _f_pParms ){ tOCTPKT_HDRXL * pOCTPKT_HDRXL = (_f_pParms); \
((tOCTPKT_HDRXL *)pOCTPKT_HDRXL)->ul_Proto_Format_Length = \
mOCT_SWAP32_IF_LE(((tOCTPKT_HDRXL *)pOCTPKT_HDRXL)->ul_Proto_Format_Length); \
}
#else
#define mOCTPKT_HDRXL_SWAP( pOCTPKT_HDRXL )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTPKT_HDRXL_ETH_SWAP( _f_pParms ){ tOCTPKT_HDRXL_ETH * pOCTPKT_HDRXL_ETH = (_f_pParms); \
((tOCTPKT_HDRXL_ETH *)pOCTPKT_HDRXL_ETH)->usReserved = \
mOCT_SWAP16_IF_LE(((tOCTPKT_HDRXL_ETH *)pOCTPKT_HDRXL_ETH)->usReserved); \
}
#else
#define mOCTPKT_HDRXL_ETH_SWAP( pOCTPKT_HDRXL_ETH )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#ifdef __cplusplus
}
#endif
#endif /* __OCTPKT_HDRXL_SWAP_H__ */

View File

@ -0,0 +1,930 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: OCTVC1_CPP_API.h
$Octasic_Copyright: $
Description: Contains the definition of the CPP API.
$Octasic_Confidentiality: $
$Octasic_Release: $
$Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#ifndef __OCTVC1_CPP_API_H__
#define __OCTVC1_CPP_API_H__
/***************************** INCLUDE FILES *******************************/
#include "../../octdev_types.h"
#include "../octvc1_msg.h"
#include "../octvc1_handle.h"
#include "../octvc1_cursor.h"
#include "../octvc1_ip.h"
#include "../octvc1_udp.h"
#include "../octvc1_mac.h"
#include "../octvc1_eth.h"
#include "../octvc1_fifo.h"
#include "../octvocnet_pkt.h"
#include "octvc1_cpp_id.h"
#include "octvc1_cpp_rc.h"
/************************ COMMON DEFINITIONS *******************************/
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_UDP_SEARCH_TYPE_ENUM : RX UDP connection types.
-------------------------------------------------------------------------------------*/
#define tOCTVC1_CPP_UDP_SEARCH_TYPE_ENUM tOCT_UINT32
#define cOCTVC1_CPP_UDP_SEARCH_TYPE_ENUM_NONE 0x0
#define cOCTVC1_CPP_UDP_SEARCH_TYPE_ENUM_SRCIPUDP 0x1
#define cOCTVC1_CPP_UDP_SEARCH_TYPE_ENUM_SSRC 0x2
#define cOCTVC1_CPP_UDP_SEARCH_TYPE_ENUM_SRCIPUDP_SSRC 0x3
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_TCP_SEARCH_TYPE_ENUM : RX TCP connection types.
-------------------------------------------------------------------------------------*/
#define tOCTVC1_CPP_TCP_SEARCH_TYPE_ENUM tOCT_UINT32
#define cOCTVC1_CPP_TCP_SEARCH_TYPE_ENUM_NONE 0x0
#define cOCTVC1_CPP_TCP_SEARCH_TYPE_ENUM_SRCIPTCP 0x1
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_TX_HDR_TYPE_ENUM : Tx Header Types.
-------------------------------------------------------------------------------------*/
#define tOCTVC1_CPP_TX_HDR_TYPE_ENUM tOCT_UINT32
#define cOCTVC1_CPP_TX_HDR_TYPE_ENUM_ETHERNET 0x0
#define cOCTVC1_CPP_TX_HDR_TYPE_ENUM_ETH_PQ 0x1
#define cOCTVC1_CPP_TX_HDR_TYPE_ENUM_LLC 0x2
#define cOCTVC1_CPP_TX_HDR_TYPE_ENUM_NLPID 0x3
#define cOCTVC1_CPP_TX_HDR_TYPE_ENUM_SNAP 0x4
#define cOCTVC1_CPP_TX_HDR_TYPE_ENUM_IPV4 0x5
#define cOCTVC1_CPP_TX_HDR_TYPE_ENUM_UDP 0x6
#define cOCTVC1_CPP_TX_HDR_TYPE_ENUM_RTP 0x7
#define cOCTVC1_CPP_TX_HDR_TYPE_ENUM_IPV6 0x8
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_ETHERTYPE_ENUM : Ethernet Encoding Types.
-------------------------------------------------------------------------------------*/
#define tOCTVC1_CPP_ETHERTYPE_ENUM tOCT_UINT32
#define cOCTVC1_CPP_ETHERTYPE_ENUM_ETH_II 0x0
#define cOCTVC1_CPP_ETHERTYPE_ENUM_IEEE_802_3 0x1
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_DEST_REMOVE_MODE_ENUM : Remove destination modes.
-------------------------------------------------------------------------------------*/
#define tOCTVC1_CPP_DEST_REMOVE_MODE_ENUM tOCT_UINT32
#define cOCTVC1_CPP_DEST_REMOVE_MODE_ENUM_SPECIFIC 0x0
#define cOCTVC1_CPP_DEST_REMOVE_MODE_ENUM_ALL 0x1
#define cOCTVC1_CPP_DEST_REMOVE_MODE_ENUM_SPECIFIC_PORT 0x2
#define cOCTVC1_CPP_DEST_REMOVE_MODE_ENUM_SPECIFIC_DEST_OBJ 0x3
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_DEST_INFO_ENUM : Destination info modes.
-------------------------------------------------------------------------------------*/
#define tOCTVC1_CPP_DEST_INFO_ENUM tOCT_UINT32
#define cOCTVC1_CPP_DEST_INFO_ENUM_OBJ_FIRST 0x0
#define cOCTVC1_CPP_DEST_INFO_ENUM_OBJ_NEXT 0x1
/*-------------------------------------------------------------------------------------
Maximum number of Destination Entry returned in a Destination Info
response.
-------------------------------------------------------------------------------------*/
#define cOCTVC1_CPP_MAX_DEST_ENTRY 4
/*-------------------------------------------------------------------------------------
Maximum number of Ethernet Route Entries allocated in a ETH_ROUTE_INFO_RSP.
-------------------------------------------------------------------------------------*/
#define cOCTVC1_CPP_MAX_ETH_ROUTE_ENTRY 10
/*-------------------------------------------------------------------------------------
CPP API configuration default values
-------------------------------------------------------------------------------------*/
#define cOCTVC1_CPP_DEFAULT_ADDITIONAL_OBJECT_DEST_POOL 0
#define cOCTVC1_CPP_DEFAULT_MAX_FORWARD 256
#define cOCTVC1_CPP_DEFAULT_IP_FRAGMENT_ID_MASK 0x0
#define cOCTVC1_CPP_DEFAULT_IP_FRAGMENT_ID_MATCH 0x0
#define cOCTVC1_CPP_DEFAULT_MAX_NON_ETHERNET_BANDWIDTH 0
#define cOCTVC1_CPP_DEFAULT_MAX_NON_UDP_BANDWIDTH 0
#define cOCTVC1_CPP_DEFAULT_MAX_RTP_CONNECTION 800
#define cOCTVC1_CPP_DEFAULT_MAX_TCP_CONNECTION 8
#define cOCTVC1_CPP_DEFAULT_MAX_UDP_CONNECTION 8
/*-------------------------------------------------------------------------------------
CPP API Object Type.
-------------------------------------------------------------------------------------*/
#define cOCTVC1_CPP_OBJ_TYPE_FORWARD (0x0001|cOCTVC1_HANDLE_BASE_OBJ_TYPE_CPP)
#define cOCTVC1_CPP_OBJ_TYPE_RX_UDP_PORT (0x0002|cOCTVC1_HANDLE_BASE_OBJ_TYPE_CPP)
#define cOCTVC1_CPP_OBJ_TYPE_TX_UDP_CNCT (0x0003|cOCTVC1_HANDLE_BASE_OBJ_TYPE_CPP)
#define cOCTVC1_CPP_OBJ_TYPE_RX_IP_PORT (0x0004|cOCTVC1_HANDLE_BASE_OBJ_TYPE_CPP)
#define cOCTVC1_CPP_OBJ_TYPE_RX_TCP_PORT (0x0005|cOCTVC1_HANDLE_BASE_OBJ_TYPE_CPP)
#define cOCTVC1_CPP_OBJ_TYPE_INTERNAL_FORWARD (0x0006|cOCTVC1_HANDLE_BASE_OBJ_TYPE_CPP)
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_CONFIG_STATIC
Members:
ulMaxDestination
ulMaxRxUdpPort
ulMaxRxUdpCnct
ulMaxTxUdpCnct
ulMaxRxRtpPort
ulMaxRxRtpCnct
ulMaxTxRtpCnct
ulMaxRxTcpPort
ulMaxRxTcpCnct
ulMaxRxIpPort
ulMaxForwardObj
ulIpFragmentIdMask
ulIpFragmentIdMatch
ulMaxNonEthernetBandwidth
ulMaxNonUdpBandwidth
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCT_UINT32 ulMaxDestination;
tOCT_UINT32 ulMaxRxUdpPort;
tOCT_UINT32 ulMaxRxUdpCnct;
tOCT_UINT32 ulMaxTxUdpCnct;
tOCT_UINT32 ulMaxRxRtpPort;
tOCT_UINT32 ulMaxRxRtpCnct;
tOCT_UINT32 ulMaxTxRtpCnct;
tOCT_UINT32 ulMaxRxTcpPort;
tOCT_UINT32 ulMaxRxTcpCnct;
tOCT_UINT32 ulMaxRxIpPort;
tOCT_UINT32 ulMaxForwardObj;
tOCT_UINT32 ulIpFragmentIdMask;
tOCT_UINT32 ulIpFragmentIdMatch;
tOCT_UINT32 ulMaxNonEthernetBandwidth;
tOCT_UINT32 ulMaxNonUdpBandwidth;
} tOCTVC1_CPP_CONFIG_STATIC;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_RX_RTP_PROFILE_ENTRY
Members:
ulPacketEncodeType
Packet encoding type
ulRtpPayloadType
RTP payload type
ulPktPortIndex
Index of the associated packet port
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVOCNET_PKT_D_TYPE_ENUM ulPacketEncodeType;
tOCT_UINT32 ulRtpPayloadType;
tOCT_UINT32 ulPktPortIndex;
} tOCTVC1_CPP_RX_RTP_PROFILE_ENTRY;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_TX_RTP_PROFILE_ENTRY
Members:
ulPacketEncodeType
Packet encoding type
ulRtpPayloadType
RTP payload type
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVOCNET_PKT_D_TYPE_ENUM ulPacketEncodeType;
tOCT_UINT32 ulRtpPayloadType;
} tOCTVC1_CPP_TX_RTP_PROFILE_ENTRY;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_DEST_ENTRY
Members:
hCppObj
CPP SVP Source Object handle
ulCppObjPort
CPP SVP Source packet port to bind.
hDestObj
Destination Object handle
ulDestObjPort
Destination packet port to bind.
ulDestObjFifoId
Destination object FIFO ID.
DestMacAddress
Mac Address of the Vocallo port of the destination object
BridgeMacAddress
Mac Address that must be used to create the Packet Bridging Header
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_HANDLE hCppObj;
tOCT_UINT32 ulCppObjPort;
tOCTVC1_HANDLE hDestObj;
tOCT_UINT32 ulDestObjPort;
tOCT_UINT32 ulDestObjFifoId;
tOCTVC1_MAC_ADDRESS DestMacAddress;
tOCTVC1_MAC_ADDRESS BridgeMacAddress;
} tOCTVC1_CPP_DEST_ENTRY;
/*-------------------------------------------------------------------------------------
Header structures
-------------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_TX_HDR_COMMON
Members:
ulHeaderType
ulHeaderLength
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_CPP_TX_HDR_TYPE_ENUM ulHeaderType;
tOCT_UINT32 ulHeaderLength;
} tOCTVC1_CPP_TX_HDR_COMMON;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_TX_HDR_ETHERNET
Members:
CommonHeader
ulEthertypeEncoding
ulEthertype
SourceMacAddr
DestinationMacAddr
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_CPP_TX_HDR_COMMON CommonHeader;
tOCTVC1_CPP_ETHERTYPE_ENUM ulEthertypeEncoding;
tOCT_UINT32 ulEthertype;
tOCTVC1_MAC_ADDRESS SourceMacAddr;
tOCTVC1_MAC_ADDRESS DestinationMacAddr;
} tOCTVC1_CPP_TX_HDR_ETHERNET;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_TX_HDR_ETH_PQ
Members:
CommonHeader
ulEthertypeEncoding
ulEthertype
ulTci
SourceMacAddr
DestinationMacAddr
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_CPP_TX_HDR_COMMON CommonHeader;
tOCTVC1_CPP_ETHERTYPE_ENUM ulEthertypeEncoding;
tOCT_UINT32 ulEthertype;
tOCT_UINT32 ulTci;
tOCTVC1_MAC_ADDRESS SourceMacAddr;
tOCTVC1_MAC_ADDRESS DestinationMacAddr;
} tOCTVC1_CPP_TX_HDR_ETH_PQ;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_TX_HDR_LLC
Members:
CommonHeader
ulLlcValue
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_CPP_TX_HDR_COMMON CommonHeader;
tOCT_UINT32 ulLlcValue;
} tOCTVC1_CPP_TX_HDR_LLC;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_TX_HDR_NLPID
Members:
CommonHeader
ulNlpidValue
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_CPP_TX_HDR_COMMON CommonHeader;
tOCT_UINT32 ulNlpidValue;
} tOCTVC1_CPP_TX_HDR_NLPID;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_TX_HDR_SNAP
Members:
CommonHeader
ulOuiValue
ulPidValue
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_CPP_TX_HDR_COMMON CommonHeader;
tOCT_UINT32 ulOuiValue;
tOCT_UINT32 ulPidValue;
} tOCTVC1_CPP_TX_HDR_SNAP;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_TX_HDR_IPV4
Members:
CommonHeader
ulTypeOfService
ulTimeToLive
ulProtocol
ulFlags
ulSourceAddr
ulDestinationAddr
ulUdpChecksumAddr
ulOptionsLength
aulOptions
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_CPP_TX_HDR_COMMON CommonHeader;
tOCT_UINT32 ulTypeOfService;
tOCT_UINT32 ulTimeToLive;
tOCT_UINT32 ulProtocol;
tOCT_UINT32 ulFlags;
tOCT_UINT32 ulSourceAddr;
tOCT_UINT32 ulDestinationAddr;
tOCT_UINT32 ulUdpChecksumAddr;
tOCT_UINT32 ulOptionsLength;
tOCT_UINT32 aulOptions[1];/* NOSWAPMAC */
} tOCTVC1_CPP_TX_HDR_IPV4;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_TX_HDR_IPV6
Members:
CommonHeader
ulTrafficClass
ulFlowLabel
ulHopLimit
aulSourceAddr
aulDestinationAddr
aulUdpChecksumAddr
ulNextHeader
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_CPP_TX_HDR_COMMON CommonHeader;
tOCT_UINT32 ulTrafficClass;
tOCT_UINT32 ulFlowLabel;
tOCT_UINT32 ulHopLimit;
tOCT_UINT32 aulSourceAddr[4];
tOCT_UINT32 aulDestinationAddr[4];
tOCT_UINT32 aulUdpChecksumAddr[4];
tOCT_UINT32 ulNextHeader;
} tOCTVC1_CPP_TX_HDR_IPV6;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_TX_HDR_UDP
Members:
CommonHeader
ulSourcePort
ulDestinationPort
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_CPP_TX_HDR_COMMON CommonHeader;
tOCT_UINT32 ulSourcePort;
tOCT_UINT32 ulDestinationPort;
} tOCTVC1_CPP_TX_HDR_UDP;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_TX_HDR_RTP
Members:
CommonHeader
ulNumContributingSources
ulSynchronizationSource
ulExtensionFlag
ulExtensionType
ulExtensionLength
aulCsrcs
aulExtensions
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_CPP_TX_HDR_COMMON CommonHeader;
tOCT_UINT32 ulNumContributingSources;
tOCT_UINT32 ulSynchronizationSource;
tOCT_BOOL32 ulExtensionFlag;
tOCT_UINT32 ulExtensionType;
tOCT_UINT32 ulExtensionLength;
tOCT_UINT32 aulCsrcs[15];
tOCT_UINT32 aulExtensions[1];/* NOSWAPMAC */
} tOCTVC1_CPP_TX_HDR_RTP;
/***************************** METHODS *************************************/
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_CMD
Members:
Header
OCTVC1 Message Header
ulResetStatsFlag
Reset the statistics
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_MSG_HEADER Header;
tOCT_BOOL32 ulResetStatsFlag;
} tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_CMD;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP
Members:
Header
OCTVC1 Message Header
ulControlRxPktCnt
ulDataRxPktCnt
ulControlBadHdrLenCnt
ulDataBadHdrLenCnt
ulInvalidPktFormatCnt
ulNoFwdPktCnt
ulCppCmdOverflowCnt
ulTxPktQueueOverflowFlag
ulTxPktQueueOverflowFifoPoolId
ulTxPktQueueOverflowFifoIndex
ulRxFifoResynchFlag
ulRxFifoResynchFifoPoolId
ulRxFifoResynchFifoIndex
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_MSG_HEADER Header;
tOCT_UINT32 ulControlRxPktCnt;
tOCT_UINT32 ulDataRxPktCnt;
tOCT_UINT32 ulControlBadHdrLenCnt;
tOCT_UINT32 ulDataBadHdrLenCnt;
tOCT_UINT32 ulInvalidPktFormatCnt;
tOCT_UINT32 ulNoFwdPktCnt;
tOCT_UINT32 ulCppCmdOverflowCnt;
tOCT_BOOL32 ulTxPktQueueOverflowFlag;
tOCT_UINT32 ulTxPktQueueOverflowFifoPoolId;
tOCT_UINT32 ulTxPktQueueOverflowFifoIndex;
tOCT_BOOL32 ulRxFifoResynchFlag;
tOCT_UINT32 ulRxFifoResynchFifoPoolId;
tOCT_UINT32 ulRxFifoResynchFifoIndex;
} tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_MSG_MODULE_STATS_ETH_CMD
Members:
Header
OCTVC1 Message Header
ulEthPort
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_MSG_HEADER Header;
tOCTVC1_ETH_PORT_ID_ENUM ulEthPort;
} tOCTVC1_CPP_MSG_MODULE_STATS_ETH_CMD;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP
Members:
Header
OCTVC1 Message Header
ulEthPort
ulEthRxPktCnt
ulEthTxPktCnt
ulEthRxByteCnt
ulEthTxByteCnt
ulEthBadHdrCnt
ulEthBadHdrLenCnt
ulEth8023BadLlcOuiCnt
ulRxFifoReSyncCnt
ulTxPktQueueOverflowCnt
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_MSG_HEADER Header;
tOCTVC1_ETH_PORT_ID_ENUM ulEthPort;
tOCT_UINT32 ulEthRxPktCnt;
tOCT_UINT32 ulEthTxPktCnt;
tOCT_UINT32 ulEthRxByteCnt;
tOCT_UINT32 ulEthTxByteCnt;
tOCT_UINT32 ulEthBadHdrCnt;
tOCT_UINT32 ulEthBadHdrLenCnt;
tOCT_UINT32 ulEth8023BadLlcOuiCnt;
tOCT_UINT32 ulRxFifoReSyncCnt;
tOCT_UINT32 ulTxPktQueueOverflowCnt;
} tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_MSG_MODULE_GET_CONFIG_CMD
Members:
Header
OCTVC1 Message Header
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_MSG_HEADER Header;
} tOCTVC1_CPP_MSG_MODULE_GET_CONFIG_CMD;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_MSG_MODULE_GET_CONFIG_RSP
Members:
Header
OCTVC1 Message Header
Static
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_MSG_HEADER Header;
tOCTVC1_CPP_CONFIG_STATIC Static;
} tOCTVC1_CPP_MSG_MODULE_GET_CONFIG_RSP;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_MSG_FORWARD_OPEN_CMD
Members:
Header
OCTVC1 Message Header
hDestObj
Destination Object handle
ulDestObjPort
Destination packet port to bind.
ulDestObjFifoId
Default: cOCTVC1_FIFO_ID_INVALID
Destination object FIFO ID.
DestMacAddress
Mac Address of the Vocallo port of the destination object
SrcMacAddress
Mac Address of the Vocallo port of the source object, only effective if
the destination Mac Address is not equal to 0
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_MSG_HEADER Header;
tOCTVC1_HANDLE hDestObj;
tOCT_UINT32 ulDestObjPort;
tOCT_UINT32 ulDestObjFifoId;
tOCTVC1_MAC_ADDRESS DestMacAddress;
tOCTVC1_MAC_ADDRESS SrcMacAddress;
} tOCTVC1_CPP_MSG_FORWARD_OPEN_CMD;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_MSG_FORWARD_OPEN_RSP
Members:
Header
OCTVC1 Message Header
hForward
Forward Object Handle
ulFifoId
Fifo ID used to reach the Forward object.
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_MSG_HEADER Header;
tOCTVC1_HANDLE hForward;
tOCT_UINT32 ulFifoId;
} tOCTVC1_CPP_MSG_FORWARD_OPEN_RSP;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_MSG_FORWARD_CLOSE_CMD
Members:
Header
OCTVC1 Message Header
hForward
Forward Object Handle
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_MSG_HEADER Header;
tOCTVC1_HANDLE hForward;
} tOCTVC1_CPP_MSG_FORWARD_CLOSE_CMD;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_MSG_FORWARD_CLOSE_RSP
Members:
Header
OCTVC1 Message Header
hForward
Forward Object Handle
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_MSG_HEADER Header;
tOCTVC1_HANDLE hForward;
} tOCTVC1_CPP_MSG_FORWARD_CLOSE_RSP;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_MSG_FORWARD_STATS_CMD
Members:
Header
OCTVC1 Message Header
ObjectGet
Generic object get structure.
ulResetStatsFlag
Reset the statistics
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_MSG_HEADER Header;
tOCTVC1_CURSOR_HANDLE_GET ObjectGet;
tOCT_BOOL32 ulResetStatsFlag;
} tOCTVC1_CPP_MSG_FORWARD_STATS_CMD;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_MSG_FORWARD_STATS_RSP
Members:
Header
OCTVC1 Message Header
ObjectGet
Generic object get structure.
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_MSG_HEADER Header;
tOCTVC1_CURSOR_HANDLE_GET ObjectGet;
} tOCTVC1_CPP_MSG_FORWARD_STATS_RSP;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_MSG_FORWARD_INFO_CMD
Members:
Header
OCTVC1 Message Header
ObjectGet
Generic object get structure.
ulGetType
Default: cOCTVC1_CPP_DEST_INFO_ENUM_OBJ_FIRST
hDestObj
Destination Object handle of the entry to search from. Must be specified only
when ulGetType is set to cOCTVC1_CPP_DEST_INFO_ENUM_OBJ_NEXT.
ulDestObjPort
Destination packet port of the entry to search from. Must be specified only
when ulGetType is set to cOCTVC1_CPP_DEST_INFO_ENUM_OBJ_NEXT.
ulDestObjFifoId
Default: cOCTVC1_FIFO_ID_INVALID
Destination object FIFO ID of the entry to search from. Must be specified only
when ulGetType is set to cOCTVC1_CPP_DEST_INFO_ENUM_OBJ_NEXT.
DestMacAddress
Mac Address of the Vocallo port of the entry's destination object to search
from. Must be specified only when ulGetType is set to
cOCTVC1_CPP_DEST_INFO_ENUM_OBJ_NEXT.
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_MSG_HEADER Header;
tOCTVC1_CURSOR_HANDLE_GET ObjectGet;
tOCTVC1_CPP_DEST_INFO_ENUM ulGetType;
tOCTVC1_HANDLE hDestObj;
tOCT_UINT32 ulDestObjPort;
tOCT_UINT32 ulDestObjFifoId;
tOCTVC1_MAC_ADDRESS DestMacAddress;
} tOCTVC1_CPP_MSG_FORWARD_INFO_CMD;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_MSG_FORWARD_INFO_RSP
Members:
Header
OCTVC1 Message Header
ObjectGet
Generic object get structure.
ulFifoId
FifoId ID used to send packet to this object.
ulMoreFlag
If TRUE, there are more destination entries matching the queried info. To
retrieve them, the command can be used with ulGetType parameter set to
cOCTVC1_CPP_DEST_INFO_ENUM_OBJ_NEXT and with valid destination information.
ulNumDestEntry
Number of valid destination entries stored in the array aDestEntry.
aDestEntry
Array of destination entries.
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_MSG_HEADER Header;
tOCTVC1_CURSOR_HANDLE_GET ObjectGet;
tOCT_UINT32 ulFifoId;
tOCT_BOOL32 ulMoreFlag;
tOCT_UINT32 ulNumDestEntry;
tOCTVC1_CPP_DEST_ENTRY aDestEntry[cOCTVC1_CPP_MAX_DEST_ENTRY];
} tOCTVC1_CPP_MSG_FORWARD_INFO_RSP;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD
Members:
Header
OCTVC1 Message Header
hCppObj
CPP SVP Source Object handle
ulCppObjPort
CPP SVP Source packet port to bind.
hDestObj
Destination Object handle
ulDestObjPort
Destination packet port to bind.
ulDestObjFifoId
Default: cOCTVC1_FIFO_ID_INVALID
Destination object FIFO ID.
DestMacAddress
Mac Address of the Vocallo port of the destination object
SrcMacAddress
Mac Address of the Vocallo port of the source object, only effective if
the destination Mac Address is not equal to 0
BridgeMacAddress
Mac Address that must be used to create the Packet Bridging Header
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_MSG_HEADER Header;
tOCTVC1_HANDLE hCppObj;
tOCT_UINT32 ulCppObjPort;
tOCTVC1_HANDLE hDestObj;
tOCT_UINT32 ulDestObjPort;
tOCT_UINT32 ulDestObjFifoId;
tOCTVC1_MAC_ADDRESS DestMacAddress;
tOCTVC1_MAC_ADDRESS SrcMacAddress;
tOCTVC1_MAC_ADDRESS BridgeMacAddress;
} tOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_MSG_MODULE_ADD_DEST_RSP
Members:
Header
OCTVC1 Message Header
hCppObj
CPP SVP Source Object handle
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_MSG_HEADER Header;
tOCTVC1_HANDLE hCppObj;
} tOCTVC1_CPP_MSG_MODULE_ADD_DEST_RSP;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD
Members:
Header
OCTVC1 Message Header
ulRemoveMode
Default: cOCTVC1_CPP_DEST_REMOVE_MODE_ENUM_SPECIFIC
Remove method that is requested.
hCppObj
CPP SVP Source Object handle
ulCppObjPort
CPP SVP Source packet port to bind.
hDestObj
Destination Object handle
ulDestObjPort
Destination packet port to bind.
ulDestObjFifoId
Default: cOCTVC1_FIFO_ID_INVALID
Destination object FIFO ID.
DestMacAddress
Mac Address of the Vocallo port of the destination object
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_MSG_HEADER Header;
tOCTVC1_CPP_DEST_REMOVE_MODE_ENUM ulRemoveMode;
tOCTVC1_HANDLE hCppObj;
tOCT_UINT32 ulCppObjPort;
tOCTVC1_HANDLE hDestObj;
tOCT_UINT32 ulDestObjPort;
tOCT_UINT32 ulDestObjFifoId;
tOCTVC1_MAC_ADDRESS DestMacAddress;
} tOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_RSP
Members:
Header
OCTVC1 Message Header
ulNumDestRemoved
Number of destination removed.
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_MSG_HEADER Header;
tOCT_UINT32 ulNumDestRemoved;
} tOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_RSP;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD
Members:
Header
OCTVC1 Message Header
ulGetType
Default: cOCTVC1_CPP_DEST_INFO_ENUM_OBJ_FIRST
hCppObj
CPP SVP Source Object handle
ulCppObjPort
CPP SVP Source packet port to bind.
hDestObj
Destination Object handle
ulDestObjPort
Destination packet port to bind.
ulDestObjFifoId
Default: cOCTVC1_FIFO_ID_INVALID
Destination object FIFO ID.
DestMacAddress
Mac Address of the Vocallo port of the destination object
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_MSG_HEADER Header;
tOCTVC1_CPP_DEST_INFO_ENUM ulGetType;
tOCTVC1_HANDLE hCppObj;
tOCT_UINT32 ulCppObjPort;
tOCTVC1_HANDLE hDestObj;
tOCT_UINT32 ulDestObjPort;
tOCT_UINT32 ulDestObjFifoId;
tOCTVC1_MAC_ADDRESS DestMacAddress;
} tOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD;
/*-------------------------------------------------------------------------------------
tOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP
Members:
Header
OCTVC1 Message Header
ulMoreFlag
If TRUE, there are more binding matching the queried info
ulNumDestEntry
Number of valid bindings stored in the binding array aBindings.
aDestEntry
Array of destination bind entries.
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCTVC1_MSG_HEADER Header;
tOCT_BOOL32 ulMoreFlag;
tOCT_UINT32 ulNumDestEntry;
tOCTVC1_CPP_DEST_ENTRY aDestEntry[cOCTVC1_CPP_MAX_DEST_ENTRY];
} tOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP;
/*************** INCLUDE FILES WITH DEPENDENCIES ON THIS FILE **************/
#ifdef cDO_PRAGMA_PACK_POP
#pragma pack( pop )
#endif /* cDO_PRAGMA_PACK_POP */
#undef cDO_PRAGMA_PACK_POP
#endif /* __OCTVC1_CPP_API_H__ */

View File

@ -0,0 +1,551 @@
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
File: octvc1_cpp_api_swap.h
$Octasic_Copyright: $
Description:
$Octasic_Confidentiality: $
$Octasic_Release: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#ifndef __OCTVC1_CPP_API_SWAP_H__
#define __OCTVC1_CPP_API_SWAP_H__
#ifdef __cplusplus
extern "C" {
#endif
/***************************** INCLUDE FILES *******************************/
#include "../octvc1_swap_hdrs.h"
#include "octvc1_cpp_api.h"
/********************************* MACROS **********************************/
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_CONFIG_STATIC_SWAP( _f_pParms ){ tOCTVC1_CPP_CONFIG_STATIC * pOCTVC1_CPP_CONFIG_STATIC = (_f_pParms); \
((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxDestination = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxDestination); \
((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxRxUdpPort = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxRxUdpPort); \
((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxRxUdpCnct = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxRxUdpCnct); \
((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxTxUdpCnct = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxTxUdpCnct); \
((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxRxRtpPort = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxRxRtpPort); \
((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxRxRtpCnct = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxRxRtpCnct); \
((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxTxRtpCnct = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxTxRtpCnct); \
((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxRxTcpPort = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxRxTcpPort); \
((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxRxTcpCnct = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxRxTcpCnct); \
((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxRxIpPort = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxRxIpPort); \
((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxForwardObj = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxForwardObj); \
((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulIpFragmentIdMask = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulIpFragmentIdMask); \
((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulIpFragmentIdMatch = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulIpFragmentIdMatch); \
((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxNonEthernetBandwidth = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxNonEthernetBandwidth); \
((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxNonUdpBandwidth = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_CONFIG_STATIC *)pOCTVC1_CPP_CONFIG_STATIC)->ulMaxNonUdpBandwidth); \
}
#else
#define mOCTVC1_CPP_CONFIG_STATIC_SWAP( pOCTVC1_CPP_CONFIG_STATIC )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_RX_RTP_PROFILE_ENTRY_SWAP( _f_pParms ){ tOCTVC1_CPP_RX_RTP_PROFILE_ENTRY * pOCTVC1_CPP_RX_RTP_PROFILE_ENTRY = (_f_pParms); \
((tOCTVC1_CPP_RX_RTP_PROFILE_ENTRY *)pOCTVC1_CPP_RX_RTP_PROFILE_ENTRY)->ulPacketEncodeType = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_RX_RTP_PROFILE_ENTRY *)pOCTVC1_CPP_RX_RTP_PROFILE_ENTRY)->ulPacketEncodeType); \
((tOCTVC1_CPP_RX_RTP_PROFILE_ENTRY *)pOCTVC1_CPP_RX_RTP_PROFILE_ENTRY)->ulRtpPayloadType = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_RX_RTP_PROFILE_ENTRY *)pOCTVC1_CPP_RX_RTP_PROFILE_ENTRY)->ulRtpPayloadType); \
((tOCTVC1_CPP_RX_RTP_PROFILE_ENTRY *)pOCTVC1_CPP_RX_RTP_PROFILE_ENTRY)->ulPktPortIndex = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_RX_RTP_PROFILE_ENTRY *)pOCTVC1_CPP_RX_RTP_PROFILE_ENTRY)->ulPktPortIndex); \
}
#else
#define mOCTVC1_CPP_RX_RTP_PROFILE_ENTRY_SWAP( pOCTVC1_CPP_RX_RTP_PROFILE_ENTRY )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_TX_RTP_PROFILE_ENTRY_SWAP( _f_pParms ){ tOCTVC1_CPP_TX_RTP_PROFILE_ENTRY * pOCTVC1_CPP_TX_RTP_PROFILE_ENTRY = (_f_pParms); \
((tOCTVC1_CPP_TX_RTP_PROFILE_ENTRY *)pOCTVC1_CPP_TX_RTP_PROFILE_ENTRY)->ulPacketEncodeType = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_RTP_PROFILE_ENTRY *)pOCTVC1_CPP_TX_RTP_PROFILE_ENTRY)->ulPacketEncodeType); \
((tOCTVC1_CPP_TX_RTP_PROFILE_ENTRY *)pOCTVC1_CPP_TX_RTP_PROFILE_ENTRY)->ulRtpPayloadType = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_RTP_PROFILE_ENTRY *)pOCTVC1_CPP_TX_RTP_PROFILE_ENTRY)->ulRtpPayloadType); \
}
#else
#define mOCTVC1_CPP_TX_RTP_PROFILE_ENTRY_SWAP( pOCTVC1_CPP_TX_RTP_PROFILE_ENTRY )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_DEST_ENTRY_SWAP( _f_pParms ){ tOCTVC1_CPP_DEST_ENTRY * pOCTVC1_CPP_DEST_ENTRY = (_f_pParms); \
{ mOCTVC1_HANDLE_SWAP( &((tOCTVC1_CPP_DEST_ENTRY *)pOCTVC1_CPP_DEST_ENTRY)->hCppObj ); } \
((tOCTVC1_CPP_DEST_ENTRY *)pOCTVC1_CPP_DEST_ENTRY)->ulCppObjPort = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_DEST_ENTRY *)pOCTVC1_CPP_DEST_ENTRY)->ulCppObjPort); \
{ mOCTVC1_HANDLE_SWAP( &((tOCTVC1_CPP_DEST_ENTRY *)pOCTVC1_CPP_DEST_ENTRY)->hDestObj ); } \
((tOCTVC1_CPP_DEST_ENTRY *)pOCTVC1_CPP_DEST_ENTRY)->ulDestObjPort = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_DEST_ENTRY *)pOCTVC1_CPP_DEST_ENTRY)->ulDestObjPort); \
((tOCTVC1_CPP_DEST_ENTRY *)pOCTVC1_CPP_DEST_ENTRY)->ulDestObjFifoId = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_DEST_ENTRY *)pOCTVC1_CPP_DEST_ENTRY)->ulDestObjFifoId); \
}
#else
#define mOCTVC1_CPP_DEST_ENTRY_SWAP( pOCTVC1_CPP_DEST_ENTRY )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_TX_HDR_COMMON_SWAP( _f_pParms ){ tOCTVC1_CPP_TX_HDR_COMMON * pOCTVC1_CPP_TX_HDR_COMMON = (_f_pParms); \
((tOCTVC1_CPP_TX_HDR_COMMON *)pOCTVC1_CPP_TX_HDR_COMMON)->ulHeaderType = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_COMMON *)pOCTVC1_CPP_TX_HDR_COMMON)->ulHeaderType); \
((tOCTVC1_CPP_TX_HDR_COMMON *)pOCTVC1_CPP_TX_HDR_COMMON)->ulHeaderLength = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_COMMON *)pOCTVC1_CPP_TX_HDR_COMMON)->ulHeaderLength); \
}
#else
#define mOCTVC1_CPP_TX_HDR_COMMON_SWAP( pOCTVC1_CPP_TX_HDR_COMMON )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_TX_HDR_ETHERNET_SWAP( _f_pParms ){ tOCTVC1_CPP_TX_HDR_ETHERNET * pOCTVC1_CPP_TX_HDR_ETHERNET = (_f_pParms); \
{ mOCTVC1_CPP_TX_HDR_COMMON_SWAP( &((tOCTVC1_CPP_TX_HDR_ETHERNET *)pOCTVC1_CPP_TX_HDR_ETHERNET)->CommonHeader ); } \
((tOCTVC1_CPP_TX_HDR_ETHERNET *)pOCTVC1_CPP_TX_HDR_ETHERNET)->ulEthertypeEncoding = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_ETHERNET *)pOCTVC1_CPP_TX_HDR_ETHERNET)->ulEthertypeEncoding); \
((tOCTVC1_CPP_TX_HDR_ETHERNET *)pOCTVC1_CPP_TX_HDR_ETHERNET)->ulEthertype = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_ETHERNET *)pOCTVC1_CPP_TX_HDR_ETHERNET)->ulEthertype); \
}
#else
#define mOCTVC1_CPP_TX_HDR_ETHERNET_SWAP( pOCTVC1_CPP_TX_HDR_ETHERNET )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_TX_HDR_ETH_PQ_SWAP( _f_pParms ){ tOCTVC1_CPP_TX_HDR_ETH_PQ * pOCTVC1_CPP_TX_HDR_ETH_PQ = (_f_pParms); \
{ mOCTVC1_CPP_TX_HDR_COMMON_SWAP( &((tOCTVC1_CPP_TX_HDR_ETH_PQ *)pOCTVC1_CPP_TX_HDR_ETH_PQ)->CommonHeader ); } \
((tOCTVC1_CPP_TX_HDR_ETH_PQ *)pOCTVC1_CPP_TX_HDR_ETH_PQ)->ulEthertypeEncoding = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_ETH_PQ *)pOCTVC1_CPP_TX_HDR_ETH_PQ)->ulEthertypeEncoding); \
((tOCTVC1_CPP_TX_HDR_ETH_PQ *)pOCTVC1_CPP_TX_HDR_ETH_PQ)->ulEthertype = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_ETH_PQ *)pOCTVC1_CPP_TX_HDR_ETH_PQ)->ulEthertype); \
((tOCTVC1_CPP_TX_HDR_ETH_PQ *)pOCTVC1_CPP_TX_HDR_ETH_PQ)->ulTci = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_ETH_PQ *)pOCTVC1_CPP_TX_HDR_ETH_PQ)->ulTci); \
}
#else
#define mOCTVC1_CPP_TX_HDR_ETH_PQ_SWAP( pOCTVC1_CPP_TX_HDR_ETH_PQ )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_TX_HDR_LLC_SWAP( _f_pParms ){ tOCTVC1_CPP_TX_HDR_LLC * pOCTVC1_CPP_TX_HDR_LLC = (_f_pParms); \
{ mOCTVC1_CPP_TX_HDR_COMMON_SWAP( &((tOCTVC1_CPP_TX_HDR_LLC *)pOCTVC1_CPP_TX_HDR_LLC)->CommonHeader ); } \
((tOCTVC1_CPP_TX_HDR_LLC *)pOCTVC1_CPP_TX_HDR_LLC)->ulLlcValue = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_LLC *)pOCTVC1_CPP_TX_HDR_LLC)->ulLlcValue); \
}
#else
#define mOCTVC1_CPP_TX_HDR_LLC_SWAP( pOCTVC1_CPP_TX_HDR_LLC )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_TX_HDR_NLPID_SWAP( _f_pParms ){ tOCTVC1_CPP_TX_HDR_NLPID * pOCTVC1_CPP_TX_HDR_NLPID = (_f_pParms); \
{ mOCTVC1_CPP_TX_HDR_COMMON_SWAP( &((tOCTVC1_CPP_TX_HDR_NLPID *)pOCTVC1_CPP_TX_HDR_NLPID)->CommonHeader ); } \
((tOCTVC1_CPP_TX_HDR_NLPID *)pOCTVC1_CPP_TX_HDR_NLPID)->ulNlpidValue = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_NLPID *)pOCTVC1_CPP_TX_HDR_NLPID)->ulNlpidValue); \
}
#else
#define mOCTVC1_CPP_TX_HDR_NLPID_SWAP( pOCTVC1_CPP_TX_HDR_NLPID )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_TX_HDR_SNAP_SWAP( _f_pParms ){ tOCTVC1_CPP_TX_HDR_SNAP * pOCTVC1_CPP_TX_HDR_SNAP = (_f_pParms); \
{ mOCTVC1_CPP_TX_HDR_COMMON_SWAP( &((tOCTVC1_CPP_TX_HDR_SNAP *)pOCTVC1_CPP_TX_HDR_SNAP)->CommonHeader ); } \
((tOCTVC1_CPP_TX_HDR_SNAP *)pOCTVC1_CPP_TX_HDR_SNAP)->ulOuiValue = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_SNAP *)pOCTVC1_CPP_TX_HDR_SNAP)->ulOuiValue); \
((tOCTVC1_CPP_TX_HDR_SNAP *)pOCTVC1_CPP_TX_HDR_SNAP)->ulPidValue = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_SNAP *)pOCTVC1_CPP_TX_HDR_SNAP)->ulPidValue); \
}
#else
#define mOCTVC1_CPP_TX_HDR_SNAP_SWAP( pOCTVC1_CPP_TX_HDR_SNAP )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_TX_HDR_IPV4_SWAP( _f_pParms ){ tOCTVC1_CPP_TX_HDR_IPV4 * pOCTVC1_CPP_TX_HDR_IPV4 = (_f_pParms); \
{ mOCTVC1_CPP_TX_HDR_COMMON_SWAP( &((tOCTVC1_CPP_TX_HDR_IPV4 *)pOCTVC1_CPP_TX_HDR_IPV4)->CommonHeader ); } \
((tOCTVC1_CPP_TX_HDR_IPV4 *)pOCTVC1_CPP_TX_HDR_IPV4)->ulTypeOfService = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_IPV4 *)pOCTVC1_CPP_TX_HDR_IPV4)->ulTypeOfService); \
((tOCTVC1_CPP_TX_HDR_IPV4 *)pOCTVC1_CPP_TX_HDR_IPV4)->ulTimeToLive = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_IPV4 *)pOCTVC1_CPP_TX_HDR_IPV4)->ulTimeToLive); \
((tOCTVC1_CPP_TX_HDR_IPV4 *)pOCTVC1_CPP_TX_HDR_IPV4)->ulProtocol = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_IPV4 *)pOCTVC1_CPP_TX_HDR_IPV4)->ulProtocol); \
((tOCTVC1_CPP_TX_HDR_IPV4 *)pOCTVC1_CPP_TX_HDR_IPV4)->ulFlags = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_IPV4 *)pOCTVC1_CPP_TX_HDR_IPV4)->ulFlags); \
((tOCTVC1_CPP_TX_HDR_IPV4 *)pOCTVC1_CPP_TX_HDR_IPV4)->ulSourceAddr = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_IPV4 *)pOCTVC1_CPP_TX_HDR_IPV4)->ulSourceAddr); \
((tOCTVC1_CPP_TX_HDR_IPV4 *)pOCTVC1_CPP_TX_HDR_IPV4)->ulDestinationAddr = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_IPV4 *)pOCTVC1_CPP_TX_HDR_IPV4)->ulDestinationAddr); \
((tOCTVC1_CPP_TX_HDR_IPV4 *)pOCTVC1_CPP_TX_HDR_IPV4)->ulUdpChecksumAddr = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_IPV4 *)pOCTVC1_CPP_TX_HDR_IPV4)->ulUdpChecksumAddr); \
((tOCTVC1_CPP_TX_HDR_IPV4 *)pOCTVC1_CPP_TX_HDR_IPV4)->ulOptionsLength = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_IPV4 *)pOCTVC1_CPP_TX_HDR_IPV4)->ulOptionsLength); \
}
#else
#define mOCTVC1_CPP_TX_HDR_IPV4_SWAP( pOCTVC1_CPP_TX_HDR_IPV4 )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_TX_HDR_IPV6_SWAP( _f_pParms ){ tOCTVC1_CPP_TX_HDR_IPV6 * pOCTVC1_CPP_TX_HDR_IPV6 = (_f_pParms); \
{ mOCTVC1_CPP_TX_HDR_COMMON_SWAP( &((tOCTVC1_CPP_TX_HDR_IPV6 *)pOCTVC1_CPP_TX_HDR_IPV6)->CommonHeader ); } \
((tOCTVC1_CPP_TX_HDR_IPV6 *)pOCTVC1_CPP_TX_HDR_IPV6)->ulTrafficClass = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_IPV6 *)pOCTVC1_CPP_TX_HDR_IPV6)->ulTrafficClass); \
((tOCTVC1_CPP_TX_HDR_IPV6 *)pOCTVC1_CPP_TX_HDR_IPV6)->ulFlowLabel = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_IPV6 *)pOCTVC1_CPP_TX_HDR_IPV6)->ulFlowLabel); \
((tOCTVC1_CPP_TX_HDR_IPV6 *)pOCTVC1_CPP_TX_HDR_IPV6)->ulHopLimit = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_IPV6 *)pOCTVC1_CPP_TX_HDR_IPV6)->ulHopLimit); \
{ tOCT_UINT32 iOCTVC1_CPP_TX_HDR_IPV6; \
for( iOCTVC1_CPP_TX_HDR_IPV6=0; \
iOCTVC1_CPP_TX_HDR_IPV6<(4);iOCTVC1_CPP_TX_HDR_IPV6++ ) \
((tOCTVC1_CPP_TX_HDR_IPV6 *)pOCTVC1_CPP_TX_HDR_IPV6)->aulSourceAddr[iOCTVC1_CPP_TX_HDR_IPV6] = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_IPV6 *)pOCTVC1_CPP_TX_HDR_IPV6)->aulSourceAddr[iOCTVC1_CPP_TX_HDR_IPV6]);}\
{ tOCT_UINT32 iOCTVC1_CPP_TX_HDR_IPV6; \
for( iOCTVC1_CPP_TX_HDR_IPV6=0; \
iOCTVC1_CPP_TX_HDR_IPV6<(4);iOCTVC1_CPP_TX_HDR_IPV6++ ) \
((tOCTVC1_CPP_TX_HDR_IPV6 *)pOCTVC1_CPP_TX_HDR_IPV6)->aulDestinationAddr[iOCTVC1_CPP_TX_HDR_IPV6] = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_IPV6 *)pOCTVC1_CPP_TX_HDR_IPV6)->aulDestinationAddr[iOCTVC1_CPP_TX_HDR_IPV6]);}\
{ tOCT_UINT32 iOCTVC1_CPP_TX_HDR_IPV6; \
for( iOCTVC1_CPP_TX_HDR_IPV6=0; \
iOCTVC1_CPP_TX_HDR_IPV6<(4);iOCTVC1_CPP_TX_HDR_IPV6++ ) \
((tOCTVC1_CPP_TX_HDR_IPV6 *)pOCTVC1_CPP_TX_HDR_IPV6)->aulUdpChecksumAddr[iOCTVC1_CPP_TX_HDR_IPV6] = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_IPV6 *)pOCTVC1_CPP_TX_HDR_IPV6)->aulUdpChecksumAddr[iOCTVC1_CPP_TX_HDR_IPV6]);}\
((tOCTVC1_CPP_TX_HDR_IPV6 *)pOCTVC1_CPP_TX_HDR_IPV6)->ulNextHeader = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_IPV6 *)pOCTVC1_CPP_TX_HDR_IPV6)->ulNextHeader); \
}
#else
#define mOCTVC1_CPP_TX_HDR_IPV6_SWAP( pOCTVC1_CPP_TX_HDR_IPV6 )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_TX_HDR_UDP_SWAP( _f_pParms ){ tOCTVC1_CPP_TX_HDR_UDP * pOCTVC1_CPP_TX_HDR_UDP = (_f_pParms); \
{ mOCTVC1_CPP_TX_HDR_COMMON_SWAP( &((tOCTVC1_CPP_TX_HDR_UDP *)pOCTVC1_CPP_TX_HDR_UDP)->CommonHeader ); } \
((tOCTVC1_CPP_TX_HDR_UDP *)pOCTVC1_CPP_TX_HDR_UDP)->ulSourcePort = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_UDP *)pOCTVC1_CPP_TX_HDR_UDP)->ulSourcePort); \
((tOCTVC1_CPP_TX_HDR_UDP *)pOCTVC1_CPP_TX_HDR_UDP)->ulDestinationPort = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_UDP *)pOCTVC1_CPP_TX_HDR_UDP)->ulDestinationPort); \
}
#else
#define mOCTVC1_CPP_TX_HDR_UDP_SWAP( pOCTVC1_CPP_TX_HDR_UDP )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_TX_HDR_RTP_SWAP( _f_pParms ){ tOCTVC1_CPP_TX_HDR_RTP * pOCTVC1_CPP_TX_HDR_RTP = (_f_pParms); \
{ mOCTVC1_CPP_TX_HDR_COMMON_SWAP( &((tOCTVC1_CPP_TX_HDR_RTP *)pOCTVC1_CPP_TX_HDR_RTP)->CommonHeader ); } \
((tOCTVC1_CPP_TX_HDR_RTP *)pOCTVC1_CPP_TX_HDR_RTP)->ulNumContributingSources = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_RTP *)pOCTVC1_CPP_TX_HDR_RTP)->ulNumContributingSources); \
((tOCTVC1_CPP_TX_HDR_RTP *)pOCTVC1_CPP_TX_HDR_RTP)->ulSynchronizationSource = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_RTP *)pOCTVC1_CPP_TX_HDR_RTP)->ulSynchronizationSource); \
((tOCTVC1_CPP_TX_HDR_RTP *)pOCTVC1_CPP_TX_HDR_RTP)->ulExtensionFlag = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_RTP *)pOCTVC1_CPP_TX_HDR_RTP)->ulExtensionFlag); \
((tOCTVC1_CPP_TX_HDR_RTP *)pOCTVC1_CPP_TX_HDR_RTP)->ulExtensionType = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_RTP *)pOCTVC1_CPP_TX_HDR_RTP)->ulExtensionType); \
((tOCTVC1_CPP_TX_HDR_RTP *)pOCTVC1_CPP_TX_HDR_RTP)->ulExtensionLength = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_RTP *)pOCTVC1_CPP_TX_HDR_RTP)->ulExtensionLength); \
{ tOCT_UINT32 iOCTVC1_CPP_TX_HDR_RTP; \
for( iOCTVC1_CPP_TX_HDR_RTP=0; \
iOCTVC1_CPP_TX_HDR_RTP<(15);iOCTVC1_CPP_TX_HDR_RTP++ ) \
((tOCTVC1_CPP_TX_HDR_RTP *)pOCTVC1_CPP_TX_HDR_RTP)->aulCsrcs[iOCTVC1_CPP_TX_HDR_RTP] = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_TX_HDR_RTP *)pOCTVC1_CPP_TX_HDR_RTP)->aulCsrcs[iOCTVC1_CPP_TX_HDR_RTP]);}\
}
#else
#define mOCTVC1_CPP_TX_HDR_RTP_SWAP( pOCTVC1_CPP_TX_HDR_RTP )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_CMD_SWAP( _f_pParms ){ tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_CMD * pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_CMD = (_f_pParms); \
{ mOCTVC1_MSG_HEADER_SWAP( &((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_CMD *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_CMD)->Header ); } \
((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_CMD *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_CMD)->ulResetStatsFlag = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_CMD *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_CMD)->ulResetStatsFlag); \
}
#else
#define mOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_CMD_SWAP( pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_CMD )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP_SWAP( _f_pParms ){ tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP * pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP = (_f_pParms); \
{ mOCTVC1_MSG_HEADER_SWAP( &((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->Header ); } \
((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulControlRxPktCnt = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulControlRxPktCnt); \
((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulDataRxPktCnt = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulDataRxPktCnt); \
((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulControlBadHdrLenCnt = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulControlBadHdrLenCnt); \
((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulDataBadHdrLenCnt = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulDataBadHdrLenCnt); \
((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulInvalidPktFormatCnt = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulInvalidPktFormatCnt); \
((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulNoFwdPktCnt = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulNoFwdPktCnt); \
((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulCppCmdOverflowCnt = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulCppCmdOverflowCnt); \
((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulTxPktQueueOverflowFlag = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulTxPktQueueOverflowFlag); \
((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulTxPktQueueOverflowFifoPoolId = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulTxPktQueueOverflowFifoPoolId); \
((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulTxPktQueueOverflowFifoIndex = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulTxPktQueueOverflowFifoIndex); \
((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulRxFifoResynchFlag = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulRxFifoResynchFlag); \
((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulRxFifoResynchFifoPoolId = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulRxFifoResynchFifoPoolId); \
((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulRxFifoResynchFifoIndex = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP)->ulRxFifoResynchFifoIndex); \
}
#else
#define mOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP_SWAP( pOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_MSG_MODULE_STATS_ETH_CMD_SWAP( _f_pParms ){ tOCTVC1_CPP_MSG_MODULE_STATS_ETH_CMD * pOCTVC1_CPP_MSG_MODULE_STATS_ETH_CMD = (_f_pParms); \
{ mOCTVC1_MSG_HEADER_SWAP( &((tOCTVC1_CPP_MSG_MODULE_STATS_ETH_CMD *)pOCTVC1_CPP_MSG_MODULE_STATS_ETH_CMD)->Header ); } \
((tOCTVC1_CPP_MSG_MODULE_STATS_ETH_CMD *)pOCTVC1_CPP_MSG_MODULE_STATS_ETH_CMD)->ulEthPort = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_ETH_CMD *)pOCTVC1_CPP_MSG_MODULE_STATS_ETH_CMD)->ulEthPort); \
}
#else
#define mOCTVC1_CPP_MSG_MODULE_STATS_ETH_CMD_SWAP( pOCTVC1_CPP_MSG_MODULE_STATS_ETH_CMD )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP_SWAP( _f_pParms ){ tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP * pOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP = (_f_pParms); \
{ mOCTVC1_MSG_HEADER_SWAP( &((tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP)->Header ); } \
((tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP)->ulEthPort = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP)->ulEthPort); \
((tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP)->ulEthRxPktCnt = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP)->ulEthRxPktCnt); \
((tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP)->ulEthTxPktCnt = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP)->ulEthTxPktCnt); \
((tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP)->ulEthRxByteCnt = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP)->ulEthRxByteCnt); \
((tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP)->ulEthTxByteCnt = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP)->ulEthTxByteCnt); \
((tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP)->ulEthBadHdrCnt = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP)->ulEthBadHdrCnt); \
((tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP)->ulEthBadHdrLenCnt = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP)->ulEthBadHdrLenCnt); \
((tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP)->ulEth8023BadLlcOuiCnt = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP)->ulEth8023BadLlcOuiCnt); \
((tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP)->ulRxFifoReSyncCnt = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP)->ulRxFifoReSyncCnt); \
((tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP)->ulTxPktQueueOverflowCnt = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP *)pOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP)->ulTxPktQueueOverflowCnt); \
}
#else
#define mOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP_SWAP( pOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_MSG_MODULE_GET_CONFIG_CMD_SWAP( _f_pParms ){ tOCTVC1_CPP_MSG_MODULE_GET_CONFIG_CMD * pOCTVC1_CPP_MSG_MODULE_GET_CONFIG_CMD = (_f_pParms); \
{ mOCTVC1_MSG_HEADER_SWAP( &((tOCTVC1_CPP_MSG_MODULE_GET_CONFIG_CMD *)pOCTVC1_CPP_MSG_MODULE_GET_CONFIG_CMD)->Header ); } \
}
#else
#define mOCTVC1_CPP_MSG_MODULE_GET_CONFIG_CMD_SWAP( pOCTVC1_CPP_MSG_MODULE_GET_CONFIG_CMD )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_MSG_MODULE_GET_CONFIG_RSP_SWAP( _f_pParms ){ tOCTVC1_CPP_MSG_MODULE_GET_CONFIG_RSP * pOCTVC1_CPP_MSG_MODULE_GET_CONFIG_RSP = (_f_pParms); \
{ mOCTVC1_MSG_HEADER_SWAP( &((tOCTVC1_CPP_MSG_MODULE_GET_CONFIG_RSP *)pOCTVC1_CPP_MSG_MODULE_GET_CONFIG_RSP)->Header ); } \
{ mOCTVC1_CPP_CONFIG_STATIC_SWAP( &((tOCTVC1_CPP_MSG_MODULE_GET_CONFIG_RSP *)pOCTVC1_CPP_MSG_MODULE_GET_CONFIG_RSP)->Static ); } \
}
#else
#define mOCTVC1_CPP_MSG_MODULE_GET_CONFIG_RSP_SWAP( pOCTVC1_CPP_MSG_MODULE_GET_CONFIG_RSP )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_MSG_FORWARD_OPEN_CMD_SWAP( _f_pParms ){ tOCTVC1_CPP_MSG_FORWARD_OPEN_CMD * pOCTVC1_CPP_MSG_FORWARD_OPEN_CMD = (_f_pParms); \
{ mOCTVC1_MSG_HEADER_SWAP( &((tOCTVC1_CPP_MSG_FORWARD_OPEN_CMD *)pOCTVC1_CPP_MSG_FORWARD_OPEN_CMD)->Header ); } \
{ mOCTVC1_HANDLE_SWAP( &((tOCTVC1_CPP_MSG_FORWARD_OPEN_CMD *)pOCTVC1_CPP_MSG_FORWARD_OPEN_CMD)->hDestObj ); } \
((tOCTVC1_CPP_MSG_FORWARD_OPEN_CMD *)pOCTVC1_CPP_MSG_FORWARD_OPEN_CMD)->ulDestObjPort = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_FORWARD_OPEN_CMD *)pOCTVC1_CPP_MSG_FORWARD_OPEN_CMD)->ulDestObjPort); \
((tOCTVC1_CPP_MSG_FORWARD_OPEN_CMD *)pOCTVC1_CPP_MSG_FORWARD_OPEN_CMD)->ulDestObjFifoId = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_FORWARD_OPEN_CMD *)pOCTVC1_CPP_MSG_FORWARD_OPEN_CMD)->ulDestObjFifoId); \
}
#else
#define mOCTVC1_CPP_MSG_FORWARD_OPEN_CMD_SWAP( pOCTVC1_CPP_MSG_FORWARD_OPEN_CMD )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_MSG_FORWARD_OPEN_RSP_SWAP( _f_pParms ){ tOCTVC1_CPP_MSG_FORWARD_OPEN_RSP * pOCTVC1_CPP_MSG_FORWARD_OPEN_RSP = (_f_pParms); \
{ mOCTVC1_MSG_HEADER_SWAP( &((tOCTVC1_CPP_MSG_FORWARD_OPEN_RSP *)pOCTVC1_CPP_MSG_FORWARD_OPEN_RSP)->Header ); } \
{ mOCTVC1_HANDLE_SWAP( &((tOCTVC1_CPP_MSG_FORWARD_OPEN_RSP *)pOCTVC1_CPP_MSG_FORWARD_OPEN_RSP)->hForward ); } \
((tOCTVC1_CPP_MSG_FORWARD_OPEN_RSP *)pOCTVC1_CPP_MSG_FORWARD_OPEN_RSP)->ulFifoId = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_FORWARD_OPEN_RSP *)pOCTVC1_CPP_MSG_FORWARD_OPEN_RSP)->ulFifoId); \
}
#else
#define mOCTVC1_CPP_MSG_FORWARD_OPEN_RSP_SWAP( pOCTVC1_CPP_MSG_FORWARD_OPEN_RSP )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_MSG_FORWARD_CLOSE_CMD_SWAP( _f_pParms ){ tOCTVC1_CPP_MSG_FORWARD_CLOSE_CMD * pOCTVC1_CPP_MSG_FORWARD_CLOSE_CMD = (_f_pParms); \
{ mOCTVC1_MSG_HEADER_SWAP( &((tOCTVC1_CPP_MSG_FORWARD_CLOSE_CMD *)pOCTVC1_CPP_MSG_FORWARD_CLOSE_CMD)->Header ); } \
{ mOCTVC1_HANDLE_SWAP( &((tOCTVC1_CPP_MSG_FORWARD_CLOSE_CMD *)pOCTVC1_CPP_MSG_FORWARD_CLOSE_CMD)->hForward ); } \
}
#else
#define mOCTVC1_CPP_MSG_FORWARD_CLOSE_CMD_SWAP( pOCTVC1_CPP_MSG_FORWARD_CLOSE_CMD )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_MSG_FORWARD_CLOSE_RSP_SWAP( _f_pParms ){ tOCTVC1_CPP_MSG_FORWARD_CLOSE_RSP * pOCTVC1_CPP_MSG_FORWARD_CLOSE_RSP = (_f_pParms); \
{ mOCTVC1_MSG_HEADER_SWAP( &((tOCTVC1_CPP_MSG_FORWARD_CLOSE_RSP *)pOCTVC1_CPP_MSG_FORWARD_CLOSE_RSP)->Header ); } \
{ mOCTVC1_HANDLE_SWAP( &((tOCTVC1_CPP_MSG_FORWARD_CLOSE_RSP *)pOCTVC1_CPP_MSG_FORWARD_CLOSE_RSP)->hForward ); } \
}
#else
#define mOCTVC1_CPP_MSG_FORWARD_CLOSE_RSP_SWAP( pOCTVC1_CPP_MSG_FORWARD_CLOSE_RSP )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_MSG_FORWARD_STATS_CMD_SWAP( _f_pParms ){ tOCTVC1_CPP_MSG_FORWARD_STATS_CMD * pOCTVC1_CPP_MSG_FORWARD_STATS_CMD = (_f_pParms); \
{ mOCTVC1_MSG_HEADER_SWAP( &((tOCTVC1_CPP_MSG_FORWARD_STATS_CMD *)pOCTVC1_CPP_MSG_FORWARD_STATS_CMD)->Header ); } \
{ mOCTVC1_CURSOR_HANDLE_GET_SWAP( &((tOCTVC1_CPP_MSG_FORWARD_STATS_CMD *)pOCTVC1_CPP_MSG_FORWARD_STATS_CMD)->ObjectGet ); } \
((tOCTVC1_CPP_MSG_FORWARD_STATS_CMD *)pOCTVC1_CPP_MSG_FORWARD_STATS_CMD)->ulResetStatsFlag = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_FORWARD_STATS_CMD *)pOCTVC1_CPP_MSG_FORWARD_STATS_CMD)->ulResetStatsFlag); \
}
#else
#define mOCTVC1_CPP_MSG_FORWARD_STATS_CMD_SWAP( pOCTVC1_CPP_MSG_FORWARD_STATS_CMD )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_MSG_FORWARD_STATS_RSP_SWAP( _f_pParms ){ tOCTVC1_CPP_MSG_FORWARD_STATS_RSP * pOCTVC1_CPP_MSG_FORWARD_STATS_RSP = (_f_pParms); \
{ mOCTVC1_MSG_HEADER_SWAP( &((tOCTVC1_CPP_MSG_FORWARD_STATS_RSP *)pOCTVC1_CPP_MSG_FORWARD_STATS_RSP)->Header ); } \
{ mOCTVC1_CURSOR_HANDLE_GET_SWAP( &((tOCTVC1_CPP_MSG_FORWARD_STATS_RSP *)pOCTVC1_CPP_MSG_FORWARD_STATS_RSP)->ObjectGet ); } \
}
#else
#define mOCTVC1_CPP_MSG_FORWARD_STATS_RSP_SWAP( pOCTVC1_CPP_MSG_FORWARD_STATS_RSP )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_MSG_FORWARD_INFO_CMD_SWAP( _f_pParms ){ tOCTVC1_CPP_MSG_FORWARD_INFO_CMD * pOCTVC1_CPP_MSG_FORWARD_INFO_CMD = (_f_pParms); \
{ mOCTVC1_MSG_HEADER_SWAP( &((tOCTVC1_CPP_MSG_FORWARD_INFO_CMD *)pOCTVC1_CPP_MSG_FORWARD_INFO_CMD)->Header ); } \
{ mOCTVC1_CURSOR_HANDLE_GET_SWAP( &((tOCTVC1_CPP_MSG_FORWARD_INFO_CMD *)pOCTVC1_CPP_MSG_FORWARD_INFO_CMD)->ObjectGet ); } \
((tOCTVC1_CPP_MSG_FORWARD_INFO_CMD *)pOCTVC1_CPP_MSG_FORWARD_INFO_CMD)->ulGetType = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_FORWARD_INFO_CMD *)pOCTVC1_CPP_MSG_FORWARD_INFO_CMD)->ulGetType); \
{ mOCTVC1_HANDLE_SWAP( &((tOCTVC1_CPP_MSG_FORWARD_INFO_CMD *)pOCTVC1_CPP_MSG_FORWARD_INFO_CMD)->hDestObj ); } \
((tOCTVC1_CPP_MSG_FORWARD_INFO_CMD *)pOCTVC1_CPP_MSG_FORWARD_INFO_CMD)->ulDestObjPort = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_FORWARD_INFO_CMD *)pOCTVC1_CPP_MSG_FORWARD_INFO_CMD)->ulDestObjPort); \
((tOCTVC1_CPP_MSG_FORWARD_INFO_CMD *)pOCTVC1_CPP_MSG_FORWARD_INFO_CMD)->ulDestObjFifoId = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_FORWARD_INFO_CMD *)pOCTVC1_CPP_MSG_FORWARD_INFO_CMD)->ulDestObjFifoId); \
}
#else
#define mOCTVC1_CPP_MSG_FORWARD_INFO_CMD_SWAP( pOCTVC1_CPP_MSG_FORWARD_INFO_CMD )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_MSG_FORWARD_INFO_RSP_SWAP( _f_pParms ){ tOCTVC1_CPP_MSG_FORWARD_INFO_RSP * pOCTVC1_CPP_MSG_FORWARD_INFO_RSP = (_f_pParms); \
{ mOCTVC1_MSG_HEADER_SWAP( &((tOCTVC1_CPP_MSG_FORWARD_INFO_RSP *)pOCTVC1_CPP_MSG_FORWARD_INFO_RSP)->Header ); } \
{ mOCTVC1_CURSOR_HANDLE_GET_SWAP( &((tOCTVC1_CPP_MSG_FORWARD_INFO_RSP *)pOCTVC1_CPP_MSG_FORWARD_INFO_RSP)->ObjectGet ); } \
((tOCTVC1_CPP_MSG_FORWARD_INFO_RSP *)pOCTVC1_CPP_MSG_FORWARD_INFO_RSP)->ulFifoId = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_FORWARD_INFO_RSP *)pOCTVC1_CPP_MSG_FORWARD_INFO_RSP)->ulFifoId); \
((tOCTVC1_CPP_MSG_FORWARD_INFO_RSP *)pOCTVC1_CPP_MSG_FORWARD_INFO_RSP)->ulMoreFlag = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_FORWARD_INFO_RSP *)pOCTVC1_CPP_MSG_FORWARD_INFO_RSP)->ulMoreFlag); \
((tOCTVC1_CPP_MSG_FORWARD_INFO_RSP *)pOCTVC1_CPP_MSG_FORWARD_INFO_RSP)->ulNumDestEntry = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_FORWARD_INFO_RSP *)pOCTVC1_CPP_MSG_FORWARD_INFO_RSP)->ulNumDestEntry); \
{ tOCT_UINT32 jOCTVC1_CPP_MSG_FORWARD_INFO_RSP; \
for( jOCTVC1_CPP_MSG_FORWARD_INFO_RSP=0; \
jOCTVC1_CPP_MSG_FORWARD_INFO_RSP<(cOCTVC1_CPP_MAX_DEST_ENTRY);jOCTVC1_CPP_MSG_FORWARD_INFO_RSP++ ) \
{ mOCTVC1_CPP_DEST_ENTRY_SWAP( &((tOCTVC1_CPP_MSG_FORWARD_INFO_RSP *)pOCTVC1_CPP_MSG_FORWARD_INFO_RSP)->aDestEntry[jOCTVC1_CPP_MSG_FORWARD_INFO_RSP] ); }} \
}
#else
#define mOCTVC1_CPP_MSG_FORWARD_INFO_RSP_SWAP( pOCTVC1_CPP_MSG_FORWARD_INFO_RSP )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD_SWAP( _f_pParms ){ tOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD * pOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD = (_f_pParms); \
{ mOCTVC1_MSG_HEADER_SWAP( &((tOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD)->Header ); } \
{ mOCTVC1_HANDLE_SWAP( &((tOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD)->hCppObj ); } \
((tOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD)->ulCppObjPort = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD)->ulCppObjPort); \
{ mOCTVC1_HANDLE_SWAP( &((tOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD)->hDestObj ); } \
((tOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD)->ulDestObjPort = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD)->ulDestObjPort); \
((tOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD)->ulDestObjFifoId = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD)->ulDestObjFifoId); \
}
#else
#define mOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD_SWAP( pOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_MSG_MODULE_ADD_DEST_RSP_SWAP( _f_pParms ){ tOCTVC1_CPP_MSG_MODULE_ADD_DEST_RSP * pOCTVC1_CPP_MSG_MODULE_ADD_DEST_RSP = (_f_pParms); \
{ mOCTVC1_MSG_HEADER_SWAP( &((tOCTVC1_CPP_MSG_MODULE_ADD_DEST_RSP *)pOCTVC1_CPP_MSG_MODULE_ADD_DEST_RSP)->Header ); } \
{ mOCTVC1_HANDLE_SWAP( &((tOCTVC1_CPP_MSG_MODULE_ADD_DEST_RSP *)pOCTVC1_CPP_MSG_MODULE_ADD_DEST_RSP)->hCppObj ); } \
}
#else
#define mOCTVC1_CPP_MSG_MODULE_ADD_DEST_RSP_SWAP( pOCTVC1_CPP_MSG_MODULE_ADD_DEST_RSP )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD_SWAP( _f_pParms ){ tOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD * pOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD = (_f_pParms); \
{ mOCTVC1_MSG_HEADER_SWAP( &((tOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD)->Header ); } \
((tOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD)->ulRemoveMode = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD)->ulRemoveMode); \
{ mOCTVC1_HANDLE_SWAP( &((tOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD)->hCppObj ); } \
((tOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD)->ulCppObjPort = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD)->ulCppObjPort); \
{ mOCTVC1_HANDLE_SWAP( &((tOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD)->hDestObj ); } \
((tOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD)->ulDestObjPort = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD)->ulDestObjPort); \
((tOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD)->ulDestObjFifoId = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD)->ulDestObjFifoId); \
}
#else
#define mOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD_SWAP( pOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_RSP_SWAP( _f_pParms ){ tOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_RSP * pOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_RSP = (_f_pParms); \
{ mOCTVC1_MSG_HEADER_SWAP( &((tOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_RSP *)pOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_RSP)->Header ); } \
((tOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_RSP *)pOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_RSP)->ulNumDestRemoved = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_RSP *)pOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_RSP)->ulNumDestRemoved); \
}
#else
#define mOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_RSP_SWAP( pOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_RSP )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD_SWAP( _f_pParms ){ tOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD * pOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD = (_f_pParms); \
{ mOCTVC1_MSG_HEADER_SWAP( &((tOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD)->Header ); } \
((tOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD)->ulGetType = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD)->ulGetType); \
{ mOCTVC1_HANDLE_SWAP( &((tOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD)->hCppObj ); } \
((tOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD)->ulCppObjPort = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD)->ulCppObjPort); \
{ mOCTVC1_HANDLE_SWAP( &((tOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD)->hDestObj ); } \
((tOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD)->ulDestObjPort = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD)->ulDestObjPort); \
((tOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD)->ulDestObjFifoId = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD *)pOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD)->ulDestObjFifoId); \
}
#else
#define mOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD_SWAP( pOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#if defined( _OCT_ENDIAN_TYPE_LE_ )
#define mOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP_SWAP( _f_pParms ){ tOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP * pOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP = (_f_pParms); \
{ mOCTVC1_MSG_HEADER_SWAP( &((tOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP *)pOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP)->Header ); } \
((tOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP *)pOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP)->ulMoreFlag = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP *)pOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP)->ulMoreFlag); \
((tOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP *)pOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP)->ulNumDestEntry = \
mOCT_SWAP32_IF_LE(((tOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP *)pOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP)->ulNumDestEntry); \
{ tOCT_UINT32 jOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP; \
for( jOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP=0; \
jOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP<(cOCTVC1_CPP_MAX_DEST_ENTRY);jOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP++ ) \
{ mOCTVC1_CPP_DEST_ENTRY_SWAP( &((tOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP *)pOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP)->aDestEntry[jOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP] ); }} \
}
#else
#define mOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP_SWAP( pOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP )
#endif /* _OCT_ENDIAN_TYPE_LE_ */
#ifdef __cplusplus
}
#endif
#endif /* __OCTVC1_CPP_API_SWAP_H__ */

Some files were not shown because too many files have changed in this diff Show More