initial import of libsmpp34-1.10
This commit is contained in:
commit
4b233b4f3b
|
@ -0,0 +1,504 @@
|
||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
Version 2.1, February 1999
|
||||||
|
|
||||||
|
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||||
|
51 Franklin Street, 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.
|
||||||
|
|
||||||
|
[This is the first released version of the Lesser GPL. It also counts
|
||||||
|
as the successor of the GNU Library Public License, version 2, hence
|
||||||
|
the version number 2.1.]
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
Licenses are intended to guarantee your freedom to share and change
|
||||||
|
free software--to make sure the software is free for all its users.
|
||||||
|
|
||||||
|
This license, the Lesser General Public License, applies to some
|
||||||
|
specially designated software packages--typically libraries--of the
|
||||||
|
Free Software Foundation and other authors who decide to use it. You
|
||||||
|
can use it too, but we suggest you first think carefully about whether
|
||||||
|
this license or the ordinary General Public License is the better
|
||||||
|
strategy to use in any particular case, based on the explanations below.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom of use,
|
||||||
|
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 and use pieces of
|
||||||
|
it in new free programs; and that you are informed that you can do
|
||||||
|
these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
distributors to deny you these rights or to ask you to surrender these
|
||||||
|
rights. These restrictions translate to certain responsibilities for
|
||||||
|
you if you distribute copies of the library or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of the library, whether gratis
|
||||||
|
or for a fee, you must give the recipients all the rights that we gave
|
||||||
|
you. You must make sure that they, too, receive or can get the source
|
||||||
|
code. If you link other code with the library, you must provide
|
||||||
|
complete object files to the recipients, so that they can relink them
|
||||||
|
with the library after making changes to the library and recompiling
|
||||||
|
it. And you must show them these terms so they know their rights.
|
||||||
|
|
||||||
|
We protect your rights with a two-step method: (1) we copyright the
|
||||||
|
library, and (2) we offer you this license, which gives you legal
|
||||||
|
permission to copy, distribute and/or modify the library.
|
||||||
|
|
||||||
|
To protect each distributor, we want to make it very clear that
|
||||||
|
there is no warranty for the free library. Also, if the library is
|
||||||
|
modified by someone else and passed on, the recipients should know
|
||||||
|
that what they have is not the original version, so that the original
|
||||||
|
author's reputation will not be affected by problems that might be
|
||||||
|
introduced by others.
|
||||||
|
|
||||||
|
Finally, software patents pose a constant threat to the existence of
|
||||||
|
any free program. We wish to make sure that a company cannot
|
||||||
|
effectively restrict the users of a free program by obtaining a
|
||||||
|
restrictive license from a patent holder. Therefore, we insist that
|
||||||
|
any patent license obtained for a version of the library must be
|
||||||
|
consistent with the full freedom of use specified in this license.
|
||||||
|
|
||||||
|
Most GNU software, including some libraries, is covered by the
|
||||||
|
ordinary GNU General Public License. This license, the GNU Lesser
|
||||||
|
General Public License, applies to certain designated libraries, and
|
||||||
|
is quite different from the ordinary General Public License. We use
|
||||||
|
this license for certain libraries in order to permit linking those
|
||||||
|
libraries into non-free programs.
|
||||||
|
|
||||||
|
When a program is linked with a library, whether statically or using
|
||||||
|
a shared library, the combination of the two is legally speaking a
|
||||||
|
combined work, a derivative of the original library. The ordinary
|
||||||
|
General Public License therefore permits such linking only if the
|
||||||
|
entire combination fits its criteria of freedom. The Lesser General
|
||||||
|
Public License permits more lax criteria for linking other code with
|
||||||
|
the library.
|
||||||
|
|
||||||
|
We call this license the "Lesser" General Public License because it
|
||||||
|
does Less to protect the user's freedom than the ordinary General
|
||||||
|
Public License. It also provides other free software developers Less
|
||||||
|
of an advantage over competing non-free programs. These disadvantages
|
||||||
|
are the reason we use the ordinary General Public License for many
|
||||||
|
libraries. However, the Lesser license provides advantages in certain
|
||||||
|
special circumstances.
|
||||||
|
|
||||||
|
For example, on rare occasions, there may be a special need to
|
||||||
|
encourage the widest possible use of a certain library, so that it becomes
|
||||||
|
a de-facto standard. To achieve this, non-free programs must be
|
||||||
|
allowed to use the library. A more frequent case is that a free
|
||||||
|
library does the same job as widely used non-free libraries. In this
|
||||||
|
case, there is little to gain by limiting the free library to free
|
||||||
|
software only, so we use the Lesser General Public License.
|
||||||
|
|
||||||
|
In other cases, permission to use a particular library in non-free
|
||||||
|
programs enables a greater number of people to use a large body of
|
||||||
|
free software. For example, permission to use the GNU C Library in
|
||||||
|
non-free programs enables many more people to use the whole GNU
|
||||||
|
operating system, as well as its variant, the GNU/Linux operating
|
||||||
|
system.
|
||||||
|
|
||||||
|
Although the Lesser General Public License is Less protective of the
|
||||||
|
users' freedom, it does ensure that the user of a program that is
|
||||||
|
linked with the Library has the freedom and the wherewithal to run
|
||||||
|
that program using a modified version of the Library.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow. Pay close attention to the difference between a
|
||||||
|
"work based on the library" and a "work that uses the library". The
|
||||||
|
former contains code derived from the library, whereas the latter must
|
||||||
|
be combined with the library in order to run.
|
||||||
|
|
||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License Agreement applies to any software library or other
|
||||||
|
program which contains a notice placed by the copyright holder or
|
||||||
|
other authorized party saying it may be distributed under the terms of
|
||||||
|
this Lesser General Public License (also called "this License").
|
||||||
|
Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
A "library" means a collection of software functions and/or data
|
||||||
|
prepared so as to be conveniently linked with application programs
|
||||||
|
(which use some of those functions and data) to form executables.
|
||||||
|
|
||||||
|
The "Library", below, refers to any such software library or work
|
||||||
|
which has been distributed under these terms. A "work based on the
|
||||||
|
Library" means either the Library or any derivative work under
|
||||||
|
copyright law: that is to say, a work containing the Library or a
|
||||||
|
portion of it, either verbatim or with modifications and/or translated
|
||||||
|
straightforwardly into another language. (Hereinafter, translation is
|
||||||
|
included without limitation in the term "modification".)
|
||||||
|
|
||||||
|
"Source code" for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For a library, 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 library.
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running a program using the Library is not restricted, and output from
|
||||||
|
such a program is covered only if its contents constitute a work based
|
||||||
|
on the Library (independent of the use of the Library in a tool for
|
||||||
|
writing it). Whether that is true depends on what the Library does
|
||||||
|
and what the program that uses the Library does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Library's
|
||||||
|
complete 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 distribute a copy of this License along with the
|
||||||
|
Library.
|
||||||
|
|
||||||
|
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 Library or any portion
|
||||||
|
of it, thus forming a work based on the Library, 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) The modified work must itself be a software library.
|
||||||
|
|
||||||
|
b) You must cause the files modified to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
c) You must cause the whole of the work to be licensed at no
|
||||||
|
charge to all third parties under the terms of this License.
|
||||||
|
|
||||||
|
d) If a facility in the modified Library refers to a function or a
|
||||||
|
table of data to be supplied by an application program that uses
|
||||||
|
the facility, other than as an argument passed when the facility
|
||||||
|
is invoked, then you must make a good faith effort to ensure that,
|
||||||
|
in the event an application does not supply such function or
|
||||||
|
table, the facility still operates, and performs whatever part of
|
||||||
|
its purpose remains meaningful.
|
||||||
|
|
||||||
|
(For example, a function in a library to compute square roots has
|
||||||
|
a purpose that is entirely well-defined independent of the
|
||||||
|
application. Therefore, Subsection 2d requires that any
|
||||||
|
application-supplied function or table used by this function must
|
||||||
|
be optional: if the application does not supply it, the square
|
||||||
|
root function must still compute square roots.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Library,
|
||||||
|
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 Library, 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 Library.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Library
|
||||||
|
with the Library (or with a work based on the Library) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||||
|
License instead of this License to a given copy of the Library. To do
|
||||||
|
this, you must alter all the notices that refer to this License, so
|
||||||
|
that they refer to the ordinary GNU General Public License, version 2,
|
||||||
|
instead of to this License. (If a newer version than version 2 of the
|
||||||
|
ordinary GNU General Public License has appeared, then you can specify
|
||||||
|
that version instead if you wish.) Do not make any other change in
|
||||||
|
these notices.
|
||||||
|
|
||||||
|
Once this change is made in a given copy, it is irreversible for
|
||||||
|
that copy, so the ordinary GNU General Public License applies to all
|
||||||
|
subsequent copies and derivative works made from that copy.
|
||||||
|
|
||||||
|
This option is useful when you wish to copy part of the code of
|
||||||
|
the Library into a program that is not a library.
|
||||||
|
|
||||||
|
4. You may copy and distribute the Library (or a portion or
|
||||||
|
derivative of it, under Section 2) in object code or executable form
|
||||||
|
under the terms of Sections 1 and 2 above provided that you 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.
|
||||||
|
|
||||||
|
If distribution of 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 satisfies the requirement to
|
||||||
|
distribute the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
5. A program that contains no derivative of any portion of the
|
||||||
|
Library, but is designed to work with the Library by being compiled or
|
||||||
|
linked with it, is called a "work that uses the Library". Such a
|
||||||
|
work, in isolation, is not a derivative work of the Library, and
|
||||||
|
therefore falls outside the scope of this License.
|
||||||
|
|
||||||
|
However, linking a "work that uses the Library" with the Library
|
||||||
|
creates an executable that is a derivative of the Library (because it
|
||||||
|
contains portions of the Library), rather than a "work that uses the
|
||||||
|
library". The executable is therefore covered by this License.
|
||||||
|
Section 6 states terms for distribution of such executables.
|
||||||
|
|
||||||
|
When a "work that uses the Library" uses material from a header file
|
||||||
|
that is part of the Library, the object code for the work may be a
|
||||||
|
derivative work of the Library even though the source code is not.
|
||||||
|
Whether this is true is especially significant if the work can be
|
||||||
|
linked without the Library, or if the work is itself a library. The
|
||||||
|
threshold for this to be true is not precisely defined by law.
|
||||||
|
|
||||||
|
If such an object file uses only numerical parameters, data
|
||||||
|
structure layouts and accessors, and small macros and small inline
|
||||||
|
functions (ten lines or less in length), then the use of the object
|
||||||
|
file is unrestricted, regardless of whether it is legally a derivative
|
||||||
|
work. (Executables containing this object code plus portions of the
|
||||||
|
Library will still fall under Section 6.)
|
||||||
|
|
||||||
|
Otherwise, if the work is a derivative of the Library, you may
|
||||||
|
distribute the object code for the work under the terms of Section 6.
|
||||||
|
Any executables containing that work also fall under Section 6,
|
||||||
|
whether or not they are linked directly with the Library itself.
|
||||||
|
|
||||||
|
6. As an exception to the Sections above, you may also combine or
|
||||||
|
link a "work that uses the Library" with the Library to produce a
|
||||||
|
work containing portions of the Library, and distribute that work
|
||||||
|
under terms of your choice, provided that the terms permit
|
||||||
|
modification of the work for the customer's own use and reverse
|
||||||
|
engineering for debugging such modifications.
|
||||||
|
|
||||||
|
You must give prominent notice with each copy of the work that the
|
||||||
|
Library is used in it and that the Library and its use are covered by
|
||||||
|
this License. You must supply a copy of this License. If the work
|
||||||
|
during execution displays copyright notices, you must include the
|
||||||
|
copyright notice for the Library among them, as well as a reference
|
||||||
|
directing the user to the copy of this License. Also, you must do one
|
||||||
|
of these things:
|
||||||
|
|
||||||
|
a) Accompany the work with the complete corresponding
|
||||||
|
machine-readable source code for the Library including whatever
|
||||||
|
changes were used in the work (which must be distributed under
|
||||||
|
Sections 1 and 2 above); and, if the work is an executable linked
|
||||||
|
with the Library, with the complete machine-readable "work that
|
||||||
|
uses the Library", as object code and/or source code, so that the
|
||||||
|
user can modify the Library and then relink to produce a modified
|
||||||
|
executable containing the modified Library. (It is understood
|
||||||
|
that the user who changes the contents of definitions files in the
|
||||||
|
Library will not necessarily be able to recompile the application
|
||||||
|
to use the modified definitions.)
|
||||||
|
|
||||||
|
b) Use a suitable shared library mechanism for linking with the
|
||||||
|
Library. A suitable mechanism is one that (1) uses at run time a
|
||||||
|
copy of the library already present on the user's computer system,
|
||||||
|
rather than copying library functions into the executable, and (2)
|
||||||
|
will operate properly with a modified version of the library, if
|
||||||
|
the user installs one, as long as the modified version is
|
||||||
|
interface-compatible with the version that the work was made with.
|
||||||
|
|
||||||
|
c) Accompany the work with a written offer, valid for at
|
||||||
|
least three years, to give the same user the materials
|
||||||
|
specified in Subsection 6a, above, for a charge no more
|
||||||
|
than the cost of performing this distribution.
|
||||||
|
|
||||||
|
d) If distribution of the work is made by offering access to copy
|
||||||
|
from a designated place, offer equivalent access to copy the above
|
||||||
|
specified materials from the same place.
|
||||||
|
|
||||||
|
e) Verify that the user has already received a copy of these
|
||||||
|
materials or that you have already sent this user a copy.
|
||||||
|
|
||||||
|
For an executable, the required form of the "work that uses the
|
||||||
|
Library" must include any data and utility programs needed for
|
||||||
|
reproducing the executable from it. However, as a special exception,
|
||||||
|
the materials to be 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.
|
||||||
|
|
||||||
|
It may happen that this requirement contradicts the license
|
||||||
|
restrictions of other proprietary libraries that do not normally
|
||||||
|
accompany the operating system. Such a contradiction means you cannot
|
||||||
|
use both them and the Library together in an executable that you
|
||||||
|
distribute.
|
||||||
|
|
||||||
|
7. You may place library facilities that are a work based on the
|
||||||
|
Library side-by-side in a single library together with other library
|
||||||
|
facilities not covered by this License, and distribute such a combined
|
||||||
|
library, provided that the separate distribution of the work based on
|
||||||
|
the Library and of the other library facilities is otherwise
|
||||||
|
permitted, and provided that you do these two things:
|
||||||
|
|
||||||
|
a) Accompany the combined library with a copy of the same work
|
||||||
|
based on the Library, uncombined with any other library
|
||||||
|
facilities. This must be distributed under the terms of the
|
||||||
|
Sections above.
|
||||||
|
|
||||||
|
b) Give prominent notice with the combined library of the fact
|
||||||
|
that part of it is a work based on the Library, and explaining
|
||||||
|
where to find the accompanying uncombined form of the same work.
|
||||||
|
|
||||||
|
8. You may not copy, modify, sublicense, link with, or distribute
|
||||||
|
the Library except as expressly provided under this License. Any
|
||||||
|
attempt otherwise to copy, modify, sublicense, link with, or
|
||||||
|
distribute the Library 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.
|
||||||
|
|
||||||
|
9. 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 Library or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Library (or any work based on the
|
||||||
|
Library), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Library or works based on it.
|
||||||
|
|
||||||
|
10. Each time you redistribute the Library (or any work based on the
|
||||||
|
Library), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute, link with or modify the Library
|
||||||
|
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 with
|
||||||
|
this License.
|
||||||
|
|
||||||
|
11. 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 Library at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Library 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 Library.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
12. If the distribution and/or use of the Library is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Library 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.
|
||||||
|
|
||||||
|
13. The Free Software Foundation may publish revised and/or new
|
||||||
|
versions of the Lesser 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 Library
|
||||||
|
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 Library does not specify a
|
||||||
|
license version number, you may choose any version ever published by
|
||||||
|
the Free Software Foundation.
|
||||||
|
|
||||||
|
14. If you wish to incorporate parts of the Library into other free
|
||||||
|
programs whose distribution conditions are incompatible with these,
|
||||||
|
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
|
||||||
|
|
||||||
|
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||||
|
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||||
|
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||||
|
OTHER PARTIES PROVIDE THE LIBRARY "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
|
||||||
|
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||||
|
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. 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 LIBRARY 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
|
||||||
|
LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 Libraries
|
||||||
|
|
||||||
|
If you develop a new library, and you want it to be of the greatest
|
||||||
|
possible use to the public, we recommend making it free software that
|
||||||
|
everyone can redistribute and change. You can do so by permitting
|
||||||
|
redistribution under these terms (or, alternatively, under the terms of the
|
||||||
|
ordinary General Public License).
|
||||||
|
|
||||||
|
To apply these terms, attach the following notices to the library. 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 library's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library 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
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||||
|
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1990
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
That's all there is to it!
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
=== smpp34-1.9 ===
|
||||||
|
2007-06-04 Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
* Fix some warnings in compilations with gcc-4.x
|
||||||
|
* Fix some mistakes in frame definitions (bind_*_resp.frame)
|
||||||
|
* def_frame/bind_*_resp.frame: fix internal call to do_tlv.
|
||||||
|
|
||||||
|
|
||||||
|
=== smpp34-beta-1.8.1 ===
|
||||||
|
2006-11-24 Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
* Change from GPL to LGPL licence.
|
||||||
|
|
||||||
|
|
||||||
|
=== smpp34-beta-1.8 ===
|
||||||
|
2006-10-30 Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
* We solve SUBMIT_MULTI problem.
|
||||||
|
|
||||||
|
|
||||||
|
=== smpp34-1.7 ===
|
||||||
|
2006-06-01 Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
* Initial release-1.7 in Source Forge. I've added a small ESME
|
||||||
|
* We add documentation and get up http://c-open-smpp-34.sourceforge.net/
|
||||||
|
|
||||||
|
|
||||||
|
=== smpp34-1.5 ===
|
||||||
|
2006-05-25 Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
* Build version for initial release-1.5
|
||||||
|
|
||||||
|
2006-03-14 Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
* src/Makefile.am: updated.
|
||||||
|
* src/smpp34_structs.c: split internal functions in smpp34_dumpBuf.c,
|
||||||
|
smpp34_dumpPdu.c, smpp34_pack.c and smpp34_unpack.c
|
|
@ -0,0 +1,365 @@
|
||||||
|
Installation Instructions
|
||||||
|
*************************
|
||||||
|
|
||||||
|
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
||||||
|
2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
Copying and distribution of this file, with or without modification,
|
||||||
|
are permitted in any medium without royalty provided the copyright
|
||||||
|
notice and this notice are preserved. This file is offered as-is,
|
||||||
|
without warranty of any kind.
|
||||||
|
|
||||||
|
Basic Installation
|
||||||
|
==================
|
||||||
|
|
||||||
|
Briefly, the shell commands `./configure; make; make install' should
|
||||||
|
configure, build, and install this package. The following
|
||||||
|
more-detailed instructions are generic; see the `README' file for
|
||||||
|
instructions specific to this package. Some packages provide this
|
||||||
|
`INSTALL' file but do not implement all of the features documented
|
||||||
|
below. The lack of an optional feature in a given package is not
|
||||||
|
necessarily a bug. More recommendations for GNU packages can be found
|
||||||
|
in *note Makefile Conventions: (standards)Makefile Conventions.
|
||||||
|
|
||||||
|
The `configure' shell script attempts to guess correct values for
|
||||||
|
various system-dependent variables used during compilation. It uses
|
||||||
|
those values to create a `Makefile' in each directory of the package.
|
||||||
|
It may also create one or more `.h' files containing system-dependent
|
||||||
|
definitions. Finally, it creates a shell script `config.status' that
|
||||||
|
you can run in the future to recreate the current configuration, and a
|
||||||
|
file `config.log' containing compiler output (useful mainly for
|
||||||
|
debugging `configure').
|
||||||
|
|
||||||
|
It can also use an optional file (typically called `config.cache'
|
||||||
|
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||||
|
the results of its tests to speed up reconfiguring. Caching is
|
||||||
|
disabled by default to prevent problems with accidental use of stale
|
||||||
|
cache files.
|
||||||
|
|
||||||
|
If you need to do unusual things to compile the package, please try
|
||||||
|
to figure out how `configure' could check whether to do them, and mail
|
||||||
|
diffs or instructions to the address given in the `README' so they can
|
||||||
|
be considered for the next release. If you are using the cache, and at
|
||||||
|
some point `config.cache' contains results you don't want to keep, you
|
||||||
|
may remove or edit it.
|
||||||
|
|
||||||
|
The file `configure.ac' (or `configure.in') is used to create
|
||||||
|
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||||
|
you want to change it or regenerate `configure' using a newer version
|
||||||
|
of `autoconf'.
|
||||||
|
|
||||||
|
The simplest way to compile this package is:
|
||||||
|
|
||||||
|
1. `cd' to the directory containing the package's source code and type
|
||||||
|
`./configure' to configure the package for your system.
|
||||||
|
|
||||||
|
Running `configure' might take a while. While running, it prints
|
||||||
|
some messages telling which features it is checking for.
|
||||||
|
|
||||||
|
2. Type `make' to compile the package.
|
||||||
|
|
||||||
|
3. Optionally, type `make check' to run any self-tests that come with
|
||||||
|
the package, generally using the just-built uninstalled binaries.
|
||||||
|
|
||||||
|
4. Type `make install' to install the programs and any data files and
|
||||||
|
documentation. When installing into a prefix owned by root, it is
|
||||||
|
recommended that the package be configured and built as a regular
|
||||||
|
user, and only the `make install' phase executed with root
|
||||||
|
privileges.
|
||||||
|
|
||||||
|
5. Optionally, type `make installcheck' to repeat any self-tests, but
|
||||||
|
this time using the binaries in their final installed location.
|
||||||
|
This target does not install anything. Running this target as a
|
||||||
|
regular user, particularly if the prior `make install' required
|
||||||
|
root privileges, verifies that the installation completed
|
||||||
|
correctly.
|
||||||
|
|
||||||
|
6. You can remove the program binaries and object files from the
|
||||||
|
source code directory by typing `make clean'. To also remove the
|
||||||
|
files that `configure' created (so you can compile the package for
|
||||||
|
a different kind of computer), type `make distclean'. There is
|
||||||
|
also a `make maintainer-clean' target, but that is intended mainly
|
||||||
|
for the package's developers. If you use it, you may have to get
|
||||||
|
all sorts of other programs in order to regenerate files that came
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
7. Often, you can also type `make uninstall' to remove the installed
|
||||||
|
files again. In practice, not all packages have tested that
|
||||||
|
uninstallation works correctly, even though it is required by the
|
||||||
|
GNU Coding Standards.
|
||||||
|
|
||||||
|
8. Some packages, particularly those that use Automake, provide `make
|
||||||
|
distcheck', which can by used by developers to test that all other
|
||||||
|
targets like `make install' and `make uninstall' work correctly.
|
||||||
|
This target is generally not run by end users.
|
||||||
|
|
||||||
|
Compilers and Options
|
||||||
|
=====================
|
||||||
|
|
||||||
|
Some systems require unusual options for compilation or linking that
|
||||||
|
the `configure' script does not know about. Run `./configure --help'
|
||||||
|
for details on some of the pertinent environment variables.
|
||||||
|
|
||||||
|
You can give `configure' initial values for configuration parameters
|
||||||
|
by setting variables in the command line or in the environment. Here
|
||||||
|
is an example:
|
||||||
|
|
||||||
|
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||||
|
|
||||||
|
*Note Defining Variables::, for more details.
|
||||||
|
|
||||||
|
Compiling For Multiple Architectures
|
||||||
|
====================================
|
||||||
|
|
||||||
|
You can compile the package for more than one kind of computer at the
|
||||||
|
same time, by placing the object files for each architecture in their
|
||||||
|
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||||
|
directory where you want the object files and executables to go and run
|
||||||
|
the `configure' script. `configure' automatically checks for the
|
||||||
|
source code in the directory that `configure' is in and in `..'. This
|
||||||
|
is known as a "VPATH" build.
|
||||||
|
|
||||||
|
With a non-GNU `make', it is safer to compile the package for one
|
||||||
|
architecture at a time in the source code directory. After you have
|
||||||
|
installed the package for one architecture, use `make distclean' before
|
||||||
|
reconfiguring for another architecture.
|
||||||
|
|
||||||
|
On MacOS X 10.5 and later systems, you can create libraries and
|
||||||
|
executables that work on multiple system types--known as "fat" or
|
||||||
|
"universal" binaries--by specifying multiple `-arch' options to the
|
||||||
|
compiler but only a single `-arch' option to the preprocessor. Like
|
||||||
|
this:
|
||||||
|
|
||||||
|
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||||
|
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||||
|
CPP="gcc -E" CXXCPP="g++ -E"
|
||||||
|
|
||||||
|
This is not guaranteed to produce working output in all cases, you
|
||||||
|
may have to build one architecture at a time and combine the results
|
||||||
|
using the `lipo' tool if you have problems.
|
||||||
|
|
||||||
|
Installation Names
|
||||||
|
==================
|
||||||
|
|
||||||
|
By default, `make install' installs the package's commands under
|
||||||
|
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||||
|
can specify an installation prefix other than `/usr/local' by giving
|
||||||
|
`configure' the option `--prefix=PREFIX', where PREFIX must be an
|
||||||
|
absolute file name.
|
||||||
|
|
||||||
|
You can specify separate installation prefixes for
|
||||||
|
architecture-specific files and architecture-independent files. If you
|
||||||
|
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||||
|
PREFIX as the prefix for installing programs and libraries.
|
||||||
|
Documentation and other data files still use the regular prefix.
|
||||||
|
|
||||||
|
In addition, if you use an unusual directory layout you can give
|
||||||
|
options like `--bindir=DIR' to specify different values for particular
|
||||||
|
kinds of files. Run `configure --help' for a list of the directories
|
||||||
|
you can set and what kinds of files go in them. In general, the
|
||||||
|
default for these options is expressed in terms of `${prefix}', so that
|
||||||
|
specifying just `--prefix' will affect all of the other directory
|
||||||
|
specifications that were not explicitly provided.
|
||||||
|
|
||||||
|
The most portable way to affect installation locations is to pass the
|
||||||
|
correct locations to `configure'; however, many packages provide one or
|
||||||
|
both of the following shortcuts of passing variable assignments to the
|
||||||
|
`make install' command line to change installation locations without
|
||||||
|
having to reconfigure or recompile.
|
||||||
|
|
||||||
|
The first method involves providing an override variable for each
|
||||||
|
affected directory. For example, `make install
|
||||||
|
prefix=/alternate/directory' will choose an alternate location for all
|
||||||
|
directory configuration variables that were expressed in terms of
|
||||||
|
`${prefix}'. Any directories that were specified during `configure',
|
||||||
|
but not in terms of `${prefix}', must each be overridden at install
|
||||||
|
time for the entire installation to be relocated. The approach of
|
||||||
|
makefile variable overrides for each directory variable is required by
|
||||||
|
the GNU Coding Standards, and ideally causes no recompilation.
|
||||||
|
However, some platforms have known limitations with the semantics of
|
||||||
|
shared libraries that end up requiring recompilation when using this
|
||||||
|
method, particularly noticeable in packages that use GNU Libtool.
|
||||||
|
|
||||||
|
The second method involves providing the `DESTDIR' variable. For
|
||||||
|
example, `make install DESTDIR=/alternate/directory' will prepend
|
||||||
|
`/alternate/directory' before all installation names. The approach of
|
||||||
|
`DESTDIR' overrides is not required by the GNU Coding Standards, and
|
||||||
|
does not work on platforms that have drive letters. On the other hand,
|
||||||
|
it does better at avoiding recompilation issues, and works well even
|
||||||
|
when some directory options were not specified in terms of `${prefix}'
|
||||||
|
at `configure' time.
|
||||||
|
|
||||||
|
Optional Features
|
||||||
|
=================
|
||||||
|
|
||||||
|
If the package supports it, you can cause programs to be installed
|
||||||
|
with an extra prefix or suffix on their names by giving `configure' the
|
||||||
|
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||||
|
|
||||||
|
Some packages pay attention to `--enable-FEATURE' options to
|
||||||
|
`configure', where FEATURE indicates an optional part of the package.
|
||||||
|
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||||
|
is something like `gnu-as' or `x' (for the X Window System). The
|
||||||
|
`README' should mention any `--enable-' and `--with-' options that the
|
||||||
|
package recognizes.
|
||||||
|
|
||||||
|
For packages that use the X Window System, `configure' can usually
|
||||||
|
find the X include and library files automatically, but if it doesn't,
|
||||||
|
you can use the `configure' options `--x-includes=DIR' and
|
||||||
|
`--x-libraries=DIR' to specify their locations.
|
||||||
|
|
||||||
|
Some packages offer the ability to configure how verbose the
|
||||||
|
execution of `make' will be. For these packages, running `./configure
|
||||||
|
--enable-silent-rules' sets the default to minimal output, which can be
|
||||||
|
overridden with `make V=1'; while running `./configure
|
||||||
|
--disable-silent-rules' sets the default to verbose, which can be
|
||||||
|
overridden with `make V=0'.
|
||||||
|
|
||||||
|
Particular systems
|
||||||
|
==================
|
||||||
|
|
||||||
|
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
|
||||||
|
CC is not installed, it is recommended to use the following options in
|
||||||
|
order to use an ANSI C compiler:
|
||||||
|
|
||||||
|
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
||||||
|
|
||||||
|
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||||
|
|
||||||
|
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||||
|
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||||
|
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||||
|
to try
|
||||||
|
|
||||||
|
./configure CC="cc"
|
||||||
|
|
||||||
|
and if that doesn't work, try
|
||||||
|
|
||||||
|
./configure CC="cc -nodtk"
|
||||||
|
|
||||||
|
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
|
||||||
|
directory contains several dysfunctional programs; working variants of
|
||||||
|
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
|
||||||
|
in your `PATH', put it _after_ `/usr/bin'.
|
||||||
|
|
||||||
|
On Haiku, software installed for all users goes in `/boot/common',
|
||||||
|
not `/usr/local'. It is recommended to use the following options:
|
||||||
|
|
||||||
|
./configure --prefix=/boot/common
|
||||||
|
|
||||||
|
Specifying the System Type
|
||||||
|
==========================
|
||||||
|
|
||||||
|
There may be some features `configure' cannot figure out
|
||||||
|
automatically, but needs to determine by the type of machine the package
|
||||||
|
will run on. Usually, assuming the package is built to be run on the
|
||||||
|
_same_ architectures, `configure' can figure that out, but if it prints
|
||||||
|
a message saying it cannot guess the machine type, give it the
|
||||||
|
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||||
|
type, such as `sun4', or a canonical name which has the form:
|
||||||
|
|
||||||
|
CPU-COMPANY-SYSTEM
|
||||||
|
|
||||||
|
where SYSTEM can have one of these forms:
|
||||||
|
|
||||||
|
OS
|
||||||
|
KERNEL-OS
|
||||||
|
|
||||||
|
See the file `config.sub' for the possible values of each field. If
|
||||||
|
`config.sub' isn't included in this package, then this package doesn't
|
||||||
|
need to know the machine type.
|
||||||
|
|
||||||
|
If you are _building_ compiler tools for cross-compiling, you should
|
||||||
|
use the option `--target=TYPE' to select the type of system they will
|
||||||
|
produce code for.
|
||||||
|
|
||||||
|
If you want to _use_ a cross compiler, that generates code for a
|
||||||
|
platform different from the build platform, you should specify the
|
||||||
|
"host" platform (i.e., that on which the generated programs will
|
||||||
|
eventually be run) with `--host=TYPE'.
|
||||||
|
|
||||||
|
Sharing Defaults
|
||||||
|
================
|
||||||
|
|
||||||
|
If you want to set default values for `configure' scripts to share,
|
||||||
|
you can create a site shell script called `config.site' that gives
|
||||||
|
default values for variables like `CC', `cache_file', and `prefix'.
|
||||||
|
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||||
|
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||||
|
`CONFIG_SITE' environment variable to the location of the site script.
|
||||||
|
A warning: not all `configure' scripts look for a site script.
|
||||||
|
|
||||||
|
Defining Variables
|
||||||
|
==================
|
||||||
|
|
||||||
|
Variables not defined in a site shell script can be set in the
|
||||||
|
environment passed to `configure'. However, some packages may run
|
||||||
|
configure again during the build, and the customized values of these
|
||||||
|
variables may be lost. In order to avoid this problem, you should set
|
||||||
|
them in the `configure' command line, using `VAR=value'. For example:
|
||||||
|
|
||||||
|
./configure CC=/usr/local2/bin/gcc
|
||||||
|
|
||||||
|
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||||
|
overridden in the site shell script).
|
||||||
|
|
||||||
|
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||||
|
an Autoconf bug. Until the bug is fixed you can use this workaround:
|
||||||
|
|
||||||
|
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||||
|
|
||||||
|
`configure' Invocation
|
||||||
|
======================
|
||||||
|
|
||||||
|
`configure' recognizes the following options to control how it
|
||||||
|
operates.
|
||||||
|
|
||||||
|
`--help'
|
||||||
|
`-h'
|
||||||
|
Print a summary of all of the options to `configure', and exit.
|
||||||
|
|
||||||
|
`--help=short'
|
||||||
|
`--help=recursive'
|
||||||
|
Print a summary of the options unique to this package's
|
||||||
|
`configure', and exit. The `short' variant lists options used
|
||||||
|
only in the top level, while the `recursive' variant lists options
|
||||||
|
also present in any nested packages.
|
||||||
|
|
||||||
|
`--version'
|
||||||
|
`-V'
|
||||||
|
Print the version of Autoconf used to generate the `configure'
|
||||||
|
script, and exit.
|
||||||
|
|
||||||
|
`--cache-file=FILE'
|
||||||
|
Enable the cache: use and save the results of the tests in FILE,
|
||||||
|
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||||
|
disable caching.
|
||||||
|
|
||||||
|
`--config-cache'
|
||||||
|
`-C'
|
||||||
|
Alias for `--cache-file=config.cache'.
|
||||||
|
|
||||||
|
`--quiet'
|
||||||
|
`--silent'
|
||||||
|
`-q'
|
||||||
|
Do not print messages saying which checks are being made. To
|
||||||
|
suppress all normal output, redirect it to `/dev/null' (any error
|
||||||
|
messages will still be shown).
|
||||||
|
|
||||||
|
`--srcdir=DIR'
|
||||||
|
Look for the package's source code in directory DIR. Usually
|
||||||
|
`configure' can determine that directory automatically.
|
||||||
|
|
||||||
|
`--prefix=DIR'
|
||||||
|
Use DIR as the installation prefix. *note Installation Names::
|
||||||
|
for more details, including other options available for fine-tuning
|
||||||
|
the installation locations.
|
||||||
|
|
||||||
|
`--no-create'
|
||||||
|
`-n'
|
||||||
|
Run the configure checks, but stop before creating any output
|
||||||
|
files.
|
||||||
|
|
||||||
|
`configure' also accepts some other, not widely useful, options. Run
|
||||||
|
`configure --help' for more details.
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
SUBDIRS = binary def_frame def_list
|
||||||
|
EXTRA_DIST = src/Makefile.am\
|
||||||
|
test_pdu/Makefile.am\
|
||||||
|
test_apps/Makefile.am \
|
||||||
|
test_apps/pack_and_send.inc\
|
||||||
|
test_apps/esme.xml\
|
||||||
|
test_apps/sendwp.xml\
|
||||||
|
test_apps/recv_and_unpack.inc
|
|
@ -0,0 +1,722 @@
|
||||||
|
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
|
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||||
|
# Inc.
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
subdir = .
|
||||||
|
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||||
|
$(srcdir)/Makefile.in $(top_srcdir)/aux_config/config.h.in \
|
||||||
|
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
|
||||||
|
aux_config/compile aux_config/config.guess \
|
||||||
|
aux_config/config.sub aux_config/depcomp aux_config/install-sh \
|
||||||
|
aux_config/ltmain.sh aux_config/missing
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||||
|
configure.lineno config.status.lineno
|
||||||
|
mkinstalldirs = $(install_sh) -d
|
||||||
|
CONFIG_HEADER = $(top_builddir)/aux_config/config.h
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
|
SOURCES =
|
||||||
|
DIST_SOURCES =
|
||||||
|
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||||
|
html-recursive info-recursive install-data-recursive \
|
||||||
|
install-dvi-recursive install-exec-recursive \
|
||||||
|
install-html-recursive install-info-recursive \
|
||||||
|
install-pdf-recursive install-ps-recursive install-recursive \
|
||||||
|
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||||
|
ps-recursive uninstall-recursive
|
||||||
|
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||||
|
distclean-recursive maintainer-clean-recursive
|
||||||
|
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
|
||||||
|
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
|
||||||
|
distdir dist dist-all distcheck
|
||||||
|
ETAGS = etags
|
||||||
|
CTAGS = ctags
|
||||||
|
DIST_SUBDIRS = $(SUBDIRS)
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
distdir = $(PACKAGE)-$(VERSION)
|
||||||
|
top_distdir = $(distdir)
|
||||||
|
am__remove_distdir = \
|
||||||
|
{ test ! -d "$(distdir)" \
|
||||||
|
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||||
|
&& rm -fr "$(distdir)"; }; }
|
||||||
|
am__relativize = \
|
||||||
|
dir0=`pwd`; \
|
||||||
|
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||||
|
sed_rest='s,^[^/]*/*,,'; \
|
||||||
|
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||||
|
sed_butlast='s,/*[^/]*$$,,'; \
|
||||||
|
while test -n "$$dir1"; do \
|
||||||
|
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||||
|
if test "$$first" != "."; then \
|
||||||
|
if test "$$first" = ".."; then \
|
||||||
|
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||||
|
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||||
|
else \
|
||||||
|
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||||
|
if test "$$first2" = "$$first"; then \
|
||||||
|
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||||
|
else \
|
||||||
|
dir2="../$$dir2"; \
|
||||||
|
fi; \
|
||||||
|
dir0="$$dir0"/"$$first"; \
|
||||||
|
fi; \
|
||||||
|
fi; \
|
||||||
|
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||||
|
done; \
|
||||||
|
reldir="$$dir2"
|
||||||
|
DIST_ARCHIVES = $(distdir).tar.gz
|
||||||
|
GZIP_ENV = --best
|
||||||
|
distuninstallcheck_listfiles = find . -type f -print
|
||||||
|
distcleancheck_listfiles = find . -type f -print
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AR = @AR@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
DSYMUTIL = @DSYMUTIL@
|
||||||
|
DUMPBIN = @DUMPBIN@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
GREP = @GREP@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
LD = @LD@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LIPO = @LIPO@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
|
NM = @NM@
|
||||||
|
NMEDIT = @NMEDIT@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
OTOOL = @OTOOL@
|
||||||
|
OTOOL64 = @OTOOL64@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SED = @SED@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
abs_builddir = @abs_builddir@
|
||||||
|
abs_srcdir = @abs_srcdir@
|
||||||
|
abs_top_builddir = @abs_top_builddir@
|
||||||
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
builddir = @builddir@
|
||||||
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
lt_ECHO = @lt_ECHO@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
top_build_prefix = @top_build_prefix@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
SUBDIRS = binary def_frame def_list
|
||||||
|
EXTRA_DIST = src/Makefile.am\
|
||||||
|
test_pdu/Makefile.am\
|
||||||
|
test_apps/Makefile.am \
|
||||||
|
test_apps/pack_and_send.inc\
|
||||||
|
test_apps/esme.xml\
|
||||||
|
test_apps/sendwp.xml\
|
||||||
|
test_apps/recv_and_unpack.inc
|
||||||
|
|
||||||
|
all: all-recursive
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
am--refresh:
|
||||||
|
@:
|
||||||
|
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
|
||||||
|
$(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
|
||||||
|
&& exit 0; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||||
|
$(am__cd) $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --gnu Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
echo ' $(SHELL) ./config.status'; \
|
||||||
|
$(SHELL) ./config.status;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
$(SHELL) ./config.status --recheck
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: $(am__configure_deps)
|
||||||
|
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||||
|
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||||
|
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||||
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
|
aux_config/config.h: aux_config/stamp-h1
|
||||||
|
@if test ! -f $@; then \
|
||||||
|
rm -f aux_config/stamp-h1; \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) aux_config/stamp-h1; \
|
||||||
|
else :; fi
|
||||||
|
|
||||||
|
aux_config/stamp-h1: $(top_srcdir)/aux_config/config.h.in $(top_builddir)/config.status
|
||||||
|
@rm -f aux_config/stamp-h1
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status aux_config/config.h
|
||||||
|
$(top_srcdir)/aux_config/config.h.in: $(am__configure_deps)
|
||||||
|
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
||||||
|
rm -f aux_config/stamp-h1
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
distclean-hdr:
|
||||||
|
-rm -f aux_config/config.h aux_config/stamp-h1
|
||||||
|
|
||||||
|
mostlyclean-libtool:
|
||||||
|
-rm -f *.lo
|
||||||
|
|
||||||
|
clean-libtool:
|
||||||
|
-rm -rf .libs _libs
|
||||||
|
|
||||||
|
distclean-libtool:
|
||||||
|
-rm -f libtool config.lt
|
||||||
|
|
||||||
|
# This directory's subdirectories are mostly independent; you can cd
|
||||||
|
# into them and run `make' without going through this Makefile.
|
||||||
|
# To change the values of `make' variables: instead of editing Makefiles,
|
||||||
|
# (1) if the variable is set in `config.status', edit `config.status'
|
||||||
|
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||||
|
# (2) otherwise, pass the desired values on the `make' command line.
|
||||||
|
$(RECURSIVE_TARGETS):
|
||||||
|
@fail= failcom='exit 1'; \
|
||||||
|
for f in x $$MAKEFLAGS; do \
|
||||||
|
case $$f in \
|
||||||
|
*=* | --[!k]*);; \
|
||||||
|
*k*) failcom='fail=yes';; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
dot_seen=no; \
|
||||||
|
target=`echo $@ | sed s/-recursive//`; \
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
echo "Making $$target in $$subdir"; \
|
||||||
|
if test "$$subdir" = "."; then \
|
||||||
|
dot_seen=yes; \
|
||||||
|
local_target="$$target-am"; \
|
||||||
|
else \
|
||||||
|
local_target="$$target"; \
|
||||||
|
fi; \
|
||||||
|
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||||
|
|| eval $$failcom; \
|
||||||
|
done; \
|
||||||
|
if test "$$dot_seen" = "no"; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||||
|
fi; test -z "$$fail"
|
||||||
|
|
||||||
|
$(RECURSIVE_CLEAN_TARGETS):
|
||||||
|
@fail= failcom='exit 1'; \
|
||||||
|
for f in x $$MAKEFLAGS; do \
|
||||||
|
case $$f in \
|
||||||
|
*=* | --[!k]*);; \
|
||||||
|
*k*) failcom='fail=yes';; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
dot_seen=no; \
|
||||||
|
case "$@" in \
|
||||||
|
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||||
|
*) list='$(SUBDIRS)' ;; \
|
||||||
|
esac; \
|
||||||
|
rev=''; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = "."; then :; else \
|
||||||
|
rev="$$subdir $$rev"; \
|
||||||
|
fi; \
|
||||||
|
done; \
|
||||||
|
rev="$$rev ."; \
|
||||||
|
target=`echo $@ | sed s/-recursive//`; \
|
||||||
|
for subdir in $$rev; do \
|
||||||
|
echo "Making $$target in $$subdir"; \
|
||||||
|
if test "$$subdir" = "."; then \
|
||||||
|
local_target="$$target-am"; \
|
||||||
|
else \
|
||||||
|
local_target="$$target"; \
|
||||||
|
fi; \
|
||||||
|
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||||
|
|| eval $$failcom; \
|
||||||
|
done && test -z "$$fail"
|
||||||
|
tags-recursive:
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||||
|
done
|
||||||
|
ctags-recursive:
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||||
|
done
|
||||||
|
|
||||||
|
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||||
|
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||||
|
mkid -fID $$unique
|
||||||
|
tags: TAGS
|
||||||
|
|
||||||
|
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||||
|
$(TAGS_FILES) $(LISP)
|
||||||
|
set x; \
|
||||||
|
here=`pwd`; \
|
||||||
|
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||||
|
include_option=--etags-include; \
|
||||||
|
empty_fix=.; \
|
||||||
|
else \
|
||||||
|
include_option=--include; \
|
||||||
|
empty_fix=; \
|
||||||
|
fi; \
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
test ! -f $$subdir/TAGS || \
|
||||||
|
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||||
|
fi; \
|
||||||
|
done; \
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||||
|
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||||
|
shift; \
|
||||||
|
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||||
|
test -n "$$unique" || unique=$$empty_fix; \
|
||||||
|
if test $$# -gt 0; then \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
"$$@" $$unique; \
|
||||||
|
else \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
$$unique; \
|
||||||
|
fi; \
|
||||||
|
fi
|
||||||
|
ctags: CTAGS
|
||||||
|
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||||
|
$(TAGS_FILES) $(LISP)
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||||
|
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||||
|
test -z "$(CTAGS_ARGS)$$unique" \
|
||||||
|
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||||
|
$$unique
|
||||||
|
|
||||||
|
GTAGS:
|
||||||
|
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||||
|
&& $(am__cd) $(top_srcdir) \
|
||||||
|
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||||
|
|
||||||
|
distclean-tags:
|
||||||
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
$(am__remove_distdir)
|
||||||
|
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
list='$(DISTFILES)'; \
|
||||||
|
dist_files=`for file in $$list; do echo $$file; done | \
|
||||||
|
sed -e "s|^$$srcdirstrip/||;t" \
|
||||||
|
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||||
|
case $$dist_files in \
|
||||||
|
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||||
|
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||||
|
sort -u` ;; \
|
||||||
|
esac; \
|
||||||
|
for file in $$dist_files; do \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test -d "$(distdir)/$$file"; then \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f "$(distdir)/$$file" \
|
||||||
|
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
test -d "$(distdir)/$$subdir" \
|
||||||
|
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||||
|
$(am__relativize); \
|
||||||
|
new_distdir=$$reldir; \
|
||||||
|
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||||
|
$(am__relativize); \
|
||||||
|
new_top_distdir=$$reldir; \
|
||||||
|
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||||
|
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||||
|
($(am__cd) $$subdir && \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) \
|
||||||
|
top_distdir="$$new_top_distdir" \
|
||||||
|
distdir="$$new_distdir" \
|
||||||
|
am__remove_distdir=: \
|
||||||
|
am__skip_length_check=: \
|
||||||
|
am__skip_mode_fix=: \
|
||||||
|
distdir) \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
-test -n "$(am__skip_mode_fix)" \
|
||||||
|
|| find "$(distdir)" -type d ! -perm -755 \
|
||||||
|
-exec chmod u+rwx,go+rx {} \; -o \
|
||||||
|
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||||
|
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||||
|
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||||
|
|| chmod -R a+r "$(distdir)"
|
||||||
|
dist-gzip: distdir
|
||||||
|
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||||
|
$(am__remove_distdir)
|
||||||
|
|
||||||
|
dist-bzip2: distdir
|
||||||
|
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||||
|
$(am__remove_distdir)
|
||||||
|
|
||||||
|
dist-lzma: distdir
|
||||||
|
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
|
||||||
|
$(am__remove_distdir)
|
||||||
|
|
||||||
|
dist-xz: distdir
|
||||||
|
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
|
||||||
|
$(am__remove_distdir)
|
||||||
|
|
||||||
|
dist-tarZ: distdir
|
||||||
|
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||||
|
$(am__remove_distdir)
|
||||||
|
|
||||||
|
dist-shar: distdir
|
||||||
|
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||||
|
$(am__remove_distdir)
|
||||||
|
|
||||||
|
dist-zip: distdir
|
||||||
|
-rm -f $(distdir).zip
|
||||||
|
zip -rq $(distdir).zip $(distdir)
|
||||||
|
$(am__remove_distdir)
|
||||||
|
|
||||||
|
dist dist-all: distdir
|
||||||
|
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||||
|
$(am__remove_distdir)
|
||||||
|
|
||||||
|
# This target untars the dist file and tries a VPATH configuration. Then
|
||||||
|
# it guarantees that the distribution is self-contained by making another
|
||||||
|
# tarfile.
|
||||||
|
distcheck: dist
|
||||||
|
case '$(DIST_ARCHIVES)' in \
|
||||||
|
*.tar.gz*) \
|
||||||
|
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||||
|
*.tar.bz2*) \
|
||||||
|
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||||
|
*.tar.lzma*) \
|
||||||
|
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
|
||||||
|
*.tar.xz*) \
|
||||||
|
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
||||||
|
*.tar.Z*) \
|
||||||
|
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||||
|
*.shar.gz*) \
|
||||||
|
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
|
||||||
|
*.zip*) \
|
||||||
|
unzip $(distdir).zip ;;\
|
||||||
|
esac
|
||||||
|
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||||
|
mkdir $(distdir)/_build
|
||||||
|
mkdir $(distdir)/_inst
|
||||||
|
chmod a-w $(distdir)
|
||||||
|
test -d $(distdir)/_build || exit 0; \
|
||||||
|
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||||
|
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||||
|
&& am__cwd=`pwd` \
|
||||||
|
&& $(am__cd) $(distdir)/_build \
|
||||||
|
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||||
|
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||||
|
distuninstallcheck \
|
||||||
|
&& chmod -R a-w "$$dc_install_base" \
|
||||||
|
&& ({ \
|
||||||
|
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||||
|
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||||
|
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||||
|
&& rm -rf "$$dc_destdir" \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||||
|
&& rm -rf $(DIST_ARCHIVES) \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
|
||||||
|
&& cd "$$am__cwd" \
|
||||||
|
|| exit 1
|
||||||
|
$(am__remove_distdir)
|
||||||
|
@(echo "$(distdir) archives ready for distribution: "; \
|
||||||
|
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||||
|
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||||
|
distuninstallcheck:
|
||||||
|
@$(am__cd) '$(distuninstallcheck_dir)' \
|
||||||
|
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||||
|
|| { echo "ERROR: files left after uninstall:" ; \
|
||||||
|
if test -n "$(DESTDIR)"; then \
|
||||||
|
echo " (check DESTDIR support)"; \
|
||||||
|
fi ; \
|
||||||
|
$(distuninstallcheck_listfiles) ; \
|
||||||
|
exit 1; } >&2
|
||||||
|
distcleancheck: distclean
|
||||||
|
@if test '$(srcdir)' = . ; then \
|
||||||
|
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||||
|
exit 1 ; \
|
||||||
|
fi
|
||||||
|
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||||
|
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||||
|
$(distcleancheck_listfiles) ; \
|
||||||
|
exit 1; } >&2
|
||||||
|
check-am: all-am
|
||||||
|
check: check-recursive
|
||||||
|
all-am: Makefile
|
||||||
|
installdirs: installdirs-recursive
|
||||||
|
installdirs-am:
|
||||||
|
install: install-recursive
|
||||||
|
install-exec: install-exec-recursive
|
||||||
|
install-data: install-data-recursive
|
||||||
|
uninstall: uninstall-recursive
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-recursive
|
||||||
|
install-strip:
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
`test -z '$(STRIP)' || \
|
||||||
|
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-recursive
|
||||||
|
|
||||||
|
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-recursive
|
||||||
|
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-generic distclean-hdr \
|
||||||
|
distclean-libtool distclean-tags
|
||||||
|
|
||||||
|
dvi: dvi-recursive
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-recursive
|
||||||
|
|
||||||
|
html-am:
|
||||||
|
|
||||||
|
info: info-recursive
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am:
|
||||||
|
|
||||||
|
install-dvi: install-dvi-recursive
|
||||||
|
|
||||||
|
install-dvi-am:
|
||||||
|
|
||||||
|
install-exec-am:
|
||||||
|
|
||||||
|
install-html: install-html-recursive
|
||||||
|
|
||||||
|
install-html-am:
|
||||||
|
|
||||||
|
install-info: install-info-recursive
|
||||||
|
|
||||||
|
install-info-am:
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
install-pdf: install-pdf-recursive
|
||||||
|
|
||||||
|
install-pdf-am:
|
||||||
|
|
||||||
|
install-ps: install-ps-recursive
|
||||||
|
|
||||||
|
install-ps-am:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-recursive
|
||||||
|
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||||
|
-rm -rf $(top_srcdir)/autom4te.cache
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-recursive
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||||
|
|
||||||
|
pdf: pdf-recursive
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-recursive
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am:
|
||||||
|
|
||||||
|
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
|
||||||
|
install-am install-strip tags-recursive
|
||||||
|
|
||||||
|
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||||
|
all all-am am--refresh check check-am clean clean-generic \
|
||||||
|
clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
|
||||||
|
dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
|
||||||
|
distcheck distclean distclean-generic distclean-hdr \
|
||||||
|
distclean-libtool distclean-tags distcleancheck distdir \
|
||||||
|
distuninstallcheck dvi dvi-am html html-am info info-am \
|
||||||
|
install install-am install-data install-data-am install-dvi \
|
||||||
|
install-dvi-am install-exec install-exec-am install-html \
|
||||||
|
install-html-am install-info install-info-am install-man \
|
||||||
|
install-pdf install-pdf-am install-ps install-ps-am \
|
||||||
|
install-strip installcheck installcheck-am installdirs \
|
||||||
|
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||||
|
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
||||||
|
ps ps-am tags tags-recursive uninstall uninstall-am
|
||||||
|
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,143 @@
|
||||||
|
#! /bin/sh
|
||||||
|
# Wrapper for compilers which do not understand `-c -o'.
|
||||||
|
|
||||||
|
scriptversion=2009-10-06.20; # UTC
|
||||||
|
|
||||||
|
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software
|
||||||
|
# Foundation, Inc.
|
||||||
|
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||||
|
#
|
||||||
|
# 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, 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
# This file is maintained in Automake, please report
|
||||||
|
# bugs to <bug-automake@gnu.org> or send patches to
|
||||||
|
# <automake-patches@gnu.org>.
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
'')
|
||||||
|
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||||
|
exit 1;
|
||||||
|
;;
|
||||||
|
-h | --h*)
|
||||||
|
cat <<\EOF
|
||||||
|
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||||
|
|
||||||
|
Wrapper for compilers which do not understand `-c -o'.
|
||||||
|
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||||
|
arguments, and rename the output as expected.
|
||||||
|
|
||||||
|
If you are trying to build a whole package this is not the
|
||||||
|
right script to run: please start by reading the file `INSTALL'.
|
||||||
|
|
||||||
|
Report bugs to <bug-automake@gnu.org>.
|
||||||
|
EOF
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
-v | --v*)
|
||||||
|
echo "compile $scriptversion"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
ofile=
|
||||||
|
cfile=
|
||||||
|
eat=
|
||||||
|
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -n "$eat"; then
|
||||||
|
eat=
|
||||||
|
else
|
||||||
|
case $1 in
|
||||||
|
-o)
|
||||||
|
# configure might choose to run compile as `compile cc -o foo foo.c'.
|
||||||
|
# So we strip `-o arg' only if arg is an object.
|
||||||
|
eat=1
|
||||||
|
case $2 in
|
||||||
|
*.o | *.obj)
|
||||||
|
ofile=$2
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" -o "$2"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*.c)
|
||||||
|
cfile=$1
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if test -z "$ofile" || test -z "$cfile"; then
|
||||||
|
# If no `-o' option was seen then we might have been invoked from a
|
||||||
|
# pattern rule where we don't need one. That is ok -- this is a
|
||||||
|
# normal compilation that the losing compiler can handle. If no
|
||||||
|
# `.c' file was seen then we are probably linking. That is also
|
||||||
|
# ok.
|
||||||
|
exec "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Name of file we expect compiler to create.
|
||||||
|
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||||
|
|
||||||
|
# Create the lock directory.
|
||||||
|
# Note: use `[/\\:.-]' here to ensure that we don't use the same name
|
||||||
|
# that we are using for the .o file. Also, base the name on the expected
|
||||||
|
# object file name, since that is what matters with a parallel build.
|
||||||
|
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||||
|
while true; do
|
||||||
|
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
# FIXME: race condition here if user kills between mkdir and trap.
|
||||||
|
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||||
|
|
||||||
|
# Run the compile.
|
||||||
|
"$@"
|
||||||
|
ret=$?
|
||||||
|
|
||||||
|
if test -f "$cofile"; then
|
||||||
|
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||||
|
elif test -f "${cofile}bj"; then
|
||||||
|
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||||
|
fi
|
||||||
|
|
||||||
|
rmdir "$lockdir"
|
||||||
|
exit $ret
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# sh-indentation: 2
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,81 @@
|
||||||
|
/* aux_config/config.h.in. Generated from configure.ac by autoheader. */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||||
|
#undef HAVE_DLFCN_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
|
#undef HAVE_INTTYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
|
||||||
|
to 0 otherwise. */
|
||||||
|
#undef HAVE_MALLOC
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <malloc.h> header file. */
|
||||||
|
#undef HAVE_MALLOC_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
|
#undef HAVE_MEMORY_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `memset' function. */
|
||||||
|
#undef HAVE_MEMSET
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||||
|
#undef HAVE_NETINET_IN_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
|
#undef HAVE_STDINT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
|
#undef HAVE_STDLIB_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
|
#undef HAVE_STRINGS_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
|
#undef HAVE_STRING_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
|
#undef HAVE_SYS_STAT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
|
#undef HAVE_SYS_TYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
|
#undef HAVE_UNISTD_H
|
||||||
|
|
||||||
|
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||||
|
*/
|
||||||
|
#undef LT_OBJDIR
|
||||||
|
|
||||||
|
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||||
|
#undef NO_MINUS_C_MINUS_O
|
||||||
|
|
||||||
|
/* Name of package */
|
||||||
|
#undef PACKAGE
|
||||||
|
|
||||||
|
/* Define to the address where bug reports for this package should be sent. */
|
||||||
|
#undef PACKAGE_BUGREPORT
|
||||||
|
|
||||||
|
/* Define to the full name of this package. */
|
||||||
|
#undef PACKAGE_NAME
|
||||||
|
|
||||||
|
/* Define to the full name and version of this package. */
|
||||||
|
#undef PACKAGE_STRING
|
||||||
|
|
||||||
|
/* Define to the one symbol short name of this package. */
|
||||||
|
#undef PACKAGE_TARNAME
|
||||||
|
|
||||||
|
/* Define to the home page for this package. */
|
||||||
|
#undef PACKAGE_URL
|
||||||
|
|
||||||
|
/* Define to the version of this package. */
|
||||||
|
#undef PACKAGE_VERSION
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
|
/* Version number of package */
|
||||||
|
#undef VERSION
|
||||||
|
|
||||||
|
/* Define to rpl_malloc if the replacement function should be used. */
|
||||||
|
#undef malloc
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,630 @@
|
||||||
|
#! /bin/sh
|
||||||
|
# depcomp - compile a program generating dependencies as side-effects
|
||||||
|
|
||||||
|
scriptversion=2009-04-28.21; # UTC
|
||||||
|
|
||||||
|
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
|
||||||
|
# Software Foundation, Inc.
|
||||||
|
|
||||||
|
# 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, 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
'')
|
||||||
|
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||||
|
exit 1;
|
||||||
|
;;
|
||||||
|
-h | --h*)
|
||||||
|
cat <<\EOF
|
||||||
|
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||||
|
|
||||||
|
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||||
|
as side-effects.
|
||||||
|
|
||||||
|
Environment variables:
|
||||||
|
depmode Dependency tracking mode.
|
||||||
|
source Source file read by `PROGRAMS ARGS'.
|
||||||
|
object Object file output by `PROGRAMS ARGS'.
|
||||||
|
DEPDIR directory where to store dependencies.
|
||||||
|
depfile Dependency file to output.
|
||||||
|
tmpdepfile Temporary file to use when outputing dependencies.
|
||||||
|
libtool Whether libtool is used (yes/no).
|
||||||
|
|
||||||
|
Report bugs to <bug-automake@gnu.org>.
|
||||||
|
EOF
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
-v | --v*)
|
||||||
|
echo "depcomp $scriptversion"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||||
|
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||||
|
depfile=${depfile-`echo "$object" |
|
||||||
|
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||||
|
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||||
|
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
|
||||||
|
# Some modes work just like other modes, but use different flags. We
|
||||||
|
# parameterize here, but still list the modes in the big case below,
|
||||||
|
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||||
|
# here, because this file can only contain one case statement.
|
||||||
|
if test "$depmode" = hp; then
|
||||||
|
# HP compiler uses -M and no extra arg.
|
||||||
|
gccflag=-M
|
||||||
|
depmode=gcc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$depmode" = dashXmstdout; then
|
||||||
|
# This is just like dashmstdout with a different argument.
|
||||||
|
dashmflag=-xM
|
||||||
|
depmode=dashmstdout
|
||||||
|
fi
|
||||||
|
|
||||||
|
cygpath_u="cygpath -u -f -"
|
||||||
|
if test "$depmode" = msvcmsys; then
|
||||||
|
# This is just like msvisualcpp but w/o cygpath translation.
|
||||||
|
# Just convert the backslash-escaped backslashes to single forward
|
||||||
|
# slashes to satisfy depend.m4
|
||||||
|
cygpath_u="sed s,\\\\\\\\,/,g"
|
||||||
|
depmode=msvisualcpp
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$depmode" in
|
||||||
|
gcc3)
|
||||||
|
## gcc 3 implements dependency tracking that does exactly what
|
||||||
|
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||||
|
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||||
|
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||||
|
## the command line argument order; so add the flags where they
|
||||||
|
## appear in depend2.am. Note that the slowdown incurred here
|
||||||
|
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||||
|
*) set fnord "$@" "$arg" ;;
|
||||||
|
esac
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
|
done
|
||||||
|
"$@"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
mv "$tmpdepfile" "$depfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
gcc)
|
||||||
|
## There are various ways to get dependency output from gcc. Here's
|
||||||
|
## why we pick this rather obscure method:
|
||||||
|
## - Don't want to use -MD because we'd like the dependencies to end
|
||||||
|
## up in a subdir. Having to rename by hand is ugly.
|
||||||
|
## (We might end up doing this anyway to support other compilers.)
|
||||||
|
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||||
|
## -MM, not -M (despite what the docs say).
|
||||||
|
## - Using -M directly means running the compiler twice (even worse
|
||||||
|
## than renaming).
|
||||||
|
if test -z "$gccflag"; then
|
||||||
|
gccflag=-MD,
|
||||||
|
fi
|
||||||
|
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||||
|
## The second -e expression handles DOS-style file names with drive letters.
|
||||||
|
sed -e 's/^[^:]*: / /' \
|
||||||
|
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||||
|
## This next piece of magic avoids the `deleted header file' problem.
|
||||||
|
## The problem is that when a header file which appears in a .P file
|
||||||
|
## is deleted, the dependency causes make to die (because there is
|
||||||
|
## typically no way to rebuild the header). We avoid this by adding
|
||||||
|
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||||
|
## this for us directly.
|
||||||
|
tr ' ' '
|
||||||
|
' < "$tmpdepfile" |
|
||||||
|
## Some versions of gcc put a space before the `:'. On the theory
|
||||||
|
## that the space means something, we add a space to the output as
|
||||||
|
## well.
|
||||||
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
hp)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
sgi)
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||||
|
else
|
||||||
|
"$@" -MDupdate "$tmpdepfile"
|
||||||
|
fi
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
|
||||||
|
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
|
||||||
|
# Clip off the initial element (the dependent). Don't try to be
|
||||||
|
# clever and replace this with sed code, as IRIX sed won't handle
|
||||||
|
# lines with more than a fixed number of characters (4096 in
|
||||||
|
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||||
|
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||||
|
# dependency line.
|
||||||
|
tr ' ' '
|
||||||
|
' < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||||
|
tr '
|
||||||
|
' ' ' >> "$depfile"
|
||||||
|
echo >> "$depfile"
|
||||||
|
|
||||||
|
# The second pass generates a dummy entry for each header file.
|
||||||
|
tr ' ' '
|
||||||
|
' < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||||
|
>> "$depfile"
|
||||||
|
else
|
||||||
|
# The sourcefile does not contain any dependencies, so just
|
||||||
|
# store a dummy comment line, to avoid errors with the Makefile
|
||||||
|
# "include basename.Plo" scheme.
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
aix)
|
||||||
|
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||||
|
# in a .u file. In older versions, this file always lives in the
|
||||||
|
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||||
|
# start of each line; $object doesn't have directory information.
|
||||||
|
# Version 6 uses the directory in both cases.
|
||||||
|
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||||
|
test "x$dir" = "x$object" && dir=
|
||||||
|
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
tmpdepfile1=$dir$base.u
|
||||||
|
tmpdepfile2=$base.u
|
||||||
|
tmpdepfile3=$dir.libs/$base.u
|
||||||
|
"$@" -Wc,-M
|
||||||
|
else
|
||||||
|
tmpdepfile1=$dir$base.u
|
||||||
|
tmpdepfile2=$dir$base.u
|
||||||
|
tmpdepfile3=$dir$base.u
|
||||||
|
"$@" -M
|
||||||
|
fi
|
||||||
|
stat=$?
|
||||||
|
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
|
do
|
||||||
|
test -f "$tmpdepfile" && break
|
||||||
|
done
|
||||||
|
if test -f "$tmpdepfile"; then
|
||||||
|
# Each line is of the form `foo.o: dependent.h'.
|
||||||
|
# Do two passes, one to just change these to
|
||||||
|
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||||
|
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||||
|
# That's a tab and a space in the [].
|
||||||
|
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||||
|
else
|
||||||
|
# The sourcefile does not contain any dependencies, so just
|
||||||
|
# store a dummy comment line, to avoid errors with the Makefile
|
||||||
|
# "include basename.Plo" scheme.
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
icc)
|
||||||
|
# Intel's C compiler understands `-MD -MF file'. However on
|
||||||
|
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||||
|
# ICC 7.0 will fill foo.d with something like
|
||||||
|
# foo.o: sub/foo.c
|
||||||
|
# foo.o: sub/foo.h
|
||||||
|
# which is wrong. We want:
|
||||||
|
# sub/foo.o: sub/foo.c
|
||||||
|
# sub/foo.o: sub/foo.h
|
||||||
|
# sub/foo.c:
|
||||||
|
# sub/foo.h:
|
||||||
|
# ICC 7.1 will output
|
||||||
|
# foo.o: sub/foo.c sub/foo.h
|
||||||
|
# and will wrap long lines using \ :
|
||||||
|
# foo.o: sub/foo.c ... \
|
||||||
|
# sub/foo.h ... \
|
||||||
|
# ...
|
||||||
|
|
||||||
|
"$@" -MD -MF "$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
# Each line is of the form `foo.o: dependent.h',
|
||||||
|
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||||
|
# Do two passes, one to just change these to
|
||||||
|
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||||
|
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||||
|
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
# correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||||
|
sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
hp2)
|
||||||
|
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||||
|
# compilers, which have integrated preprocessors. The correct option
|
||||||
|
# to use with these is +Maked; it writes dependencies to a file named
|
||||||
|
# 'foo.d', which lands next to the object file, wherever that
|
||||||
|
# happens to be.
|
||||||
|
# Much of this is similar to the tru64 case; see comments there.
|
||||||
|
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||||
|
test "x$dir" = "x$object" && dir=
|
||||||
|
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
tmpdepfile1=$dir$base.d
|
||||||
|
tmpdepfile2=$dir.libs/$base.d
|
||||||
|
"$@" -Wc,+Maked
|
||||||
|
else
|
||||||
|
tmpdepfile1=$dir$base.d
|
||||||
|
tmpdepfile2=$dir$base.d
|
||||||
|
"$@" +Maked
|
||||||
|
fi
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||||
|
do
|
||||||
|
test -f "$tmpdepfile" && break
|
||||||
|
done
|
||||||
|
if test -f "$tmpdepfile"; then
|
||||||
|
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||||
|
# Add `dependent.h:' lines.
|
||||||
|
sed -ne '2,${
|
||||||
|
s/^ *//
|
||||||
|
s/ \\*$//
|
||||||
|
s/$/:/
|
||||||
|
p
|
||||||
|
}' "$tmpdepfile" >> "$depfile"
|
||||||
|
else
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||||
|
;;
|
||||||
|
|
||||||
|
tru64)
|
||||||
|
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||||
|
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||||
|
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||||
|
# dependencies in `foo.d' instead, so we check for that too.
|
||||||
|
# Subdirectories are respected.
|
||||||
|
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||||
|
test "x$dir" = "x$object" && dir=
|
||||||
|
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||||
|
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
# With Tru64 cc, shared objects can also be used to make a
|
||||||
|
# static library. This mechanism is used in libtool 1.4 series to
|
||||||
|
# handle both shared and static libraries in a single compilation.
|
||||||
|
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||||
|
#
|
||||||
|
# With libtool 1.5 this exception was removed, and libtool now
|
||||||
|
# generates 2 separate objects for the 2 libraries. These two
|
||||||
|
# compilations output dependencies in $dir.libs/$base.o.d and
|
||||||
|
# in $dir$base.o.d. We have to check for both files, because
|
||||||
|
# one of the two compilations can be disabled. We should prefer
|
||||||
|
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||||
|
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||||
|
# the former would cause a distcleancheck panic.
|
||||||
|
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
||||||
|
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||||
|
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||||
|
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||||
|
"$@" -Wc,-MD
|
||||||
|
else
|
||||||
|
tmpdepfile1=$dir$base.o.d
|
||||||
|
tmpdepfile2=$dir$base.d
|
||||||
|
tmpdepfile3=$dir$base.d
|
||||||
|
tmpdepfile4=$dir$base.d
|
||||||
|
"$@" -MD
|
||||||
|
fi
|
||||||
|
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||||
|
do
|
||||||
|
test -f "$tmpdepfile" && break
|
||||||
|
done
|
||||||
|
if test -f "$tmpdepfile"; then
|
||||||
|
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||||
|
# That's a tab and a space in the [].
|
||||||
|
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||||
|
else
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
#nosideeffect)
|
||||||
|
# This comment above is used by automake to tell side-effect
|
||||||
|
# dependency tracking mechanisms from slower ones.
|
||||||
|
|
||||||
|
dashmstdout)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the preprocessed file to stdout, regardless of -o.
|
||||||
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove `-o $object'.
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
test -z "$dashmflag" && dashmflag=-M
|
||||||
|
# Require at least two characters before searching for `:'
|
||||||
|
# in the target name. This is to cope with DOS-style filenames:
|
||||||
|
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||||
|
"$@" $dashmflag |
|
||||||
|
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
cat < "$tmpdepfile" > "$depfile"
|
||||||
|
tr ' ' '
|
||||||
|
' < "$tmpdepfile" | \
|
||||||
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
dashXmstdout)
|
||||||
|
# This case only exists to satisfy depend.m4. It is never actually
|
||||||
|
# run, as this mode is specially recognized in the preamble.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
makedepend)
|
||||||
|
"$@" || exit $?
|
||||||
|
# Remove any Libtool call
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
# X makedepend
|
||||||
|
shift
|
||||||
|
cleared=no eat=no
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $cleared in
|
||||||
|
no)
|
||||||
|
set ""; shift
|
||||||
|
cleared=yes ;;
|
||||||
|
esac
|
||||||
|
if test $eat = yes; then
|
||||||
|
eat=no
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
case "$arg" in
|
||||||
|
-D*|-I*)
|
||||||
|
set fnord "$@" "$arg"; shift ;;
|
||||||
|
# Strip any option that makedepend may not understand. Remove
|
||||||
|
# the object too, otherwise makedepend will parse it as a source file.
|
||||||
|
-arch)
|
||||||
|
eat=yes ;;
|
||||||
|
-*|$object)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"; shift ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||||
|
touch "$tmpdepfile"
|
||||||
|
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||||
|
rm -f "$depfile"
|
||||||
|
cat < "$tmpdepfile" > "$depfile"
|
||||||
|
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||||
|
' | \
|
||||||
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||||
|
;;
|
||||||
|
|
||||||
|
cpp)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the preprocessed file to stdout.
|
||||||
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove `-o $object'.
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
"$@" -E |
|
||||||
|
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||||
|
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||||
|
sed '$ s: \\$::' > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
cat < "$tmpdepfile" >> "$depfile"
|
||||||
|
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvisualcpp)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the preprocessed file to stdout.
|
||||||
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case "$arg" in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||||
|
set fnord "$@"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
"$@" -E 2>/dev/null |
|
||||||
|
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||||
|
echo " " >> "$depfile"
|
||||||
|
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvcmsys)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
none)
|
||||||
|
exec "$@"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "Unknown depmode $depmode" 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# sh-indentation: 2
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
|
@ -0,0 +1,520 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# install - install a program, script, or datafile
|
||||||
|
|
||||||
|
scriptversion=2009-04-28.21; # UTC
|
||||||
|
|
||||||
|
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||||
|
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||||
|
# following copyright and license.
|
||||||
|
#
|
||||||
|
# Copyright (C) 1994 X Consortium
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
# of this software and associated documentation files (the "Software"), to
|
||||||
|
# deal in the Software without restriction, including without limitation the
|
||||||
|
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
# sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included in
|
||||||
|
# all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||||
|
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||||
|
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
#
|
||||||
|
# Except as contained in this notice, the name of the X Consortium shall not
|
||||||
|
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||||
|
# ings in this Software without prior written authorization from the X Consor-
|
||||||
|
# tium.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# FSF changes to this file are in the public domain.
|
||||||
|
#
|
||||||
|
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||||
|
# `make' implicit rules from creating a file called install from it
|
||||||
|
# when there is no Makefile.
|
||||||
|
#
|
||||||
|
# This script is compatible with the BSD install script, but was written
|
||||||
|
# from scratch.
|
||||||
|
|
||||||
|
nl='
|
||||||
|
'
|
||||||
|
IFS=" "" $nl"
|
||||||
|
|
||||||
|
# set DOITPROG to echo to test this script
|
||||||
|
|
||||||
|
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||||
|
doit=${DOITPROG-}
|
||||||
|
if test -z "$doit"; then
|
||||||
|
doit_exec=exec
|
||||||
|
else
|
||||||
|
doit_exec=$doit
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Put in absolute file names if you don't have them in your path;
|
||||||
|
# or use environment vars.
|
||||||
|
|
||||||
|
chgrpprog=${CHGRPPROG-chgrp}
|
||||||
|
chmodprog=${CHMODPROG-chmod}
|
||||||
|
chownprog=${CHOWNPROG-chown}
|
||||||
|
cmpprog=${CMPPROG-cmp}
|
||||||
|
cpprog=${CPPROG-cp}
|
||||||
|
mkdirprog=${MKDIRPROG-mkdir}
|
||||||
|
mvprog=${MVPROG-mv}
|
||||||
|
rmprog=${RMPROG-rm}
|
||||||
|
stripprog=${STRIPPROG-strip}
|
||||||
|
|
||||||
|
posix_glob='?'
|
||||||
|
initialize_posix_glob='
|
||||||
|
test "$posix_glob" != "?" || {
|
||||||
|
if (set -f) 2>/dev/null; then
|
||||||
|
posix_glob=
|
||||||
|
else
|
||||||
|
posix_glob=:
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
'
|
||||||
|
|
||||||
|
posix_mkdir=
|
||||||
|
|
||||||
|
# Desired mode of installed file.
|
||||||
|
mode=0755
|
||||||
|
|
||||||
|
chgrpcmd=
|
||||||
|
chmodcmd=$chmodprog
|
||||||
|
chowncmd=
|
||||||
|
mvcmd=$mvprog
|
||||||
|
rmcmd="$rmprog -f"
|
||||||
|
stripcmd=
|
||||||
|
|
||||||
|
src=
|
||||||
|
dst=
|
||||||
|
dir_arg=
|
||||||
|
dst_arg=
|
||||||
|
|
||||||
|
copy_on_change=false
|
||||||
|
no_target_directory=
|
||||||
|
|
||||||
|
usage="\
|
||||||
|
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||||
|
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||||
|
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||||
|
or: $0 [OPTION]... -d DIRECTORIES...
|
||||||
|
|
||||||
|
In the 1st form, copy SRCFILE to DSTFILE.
|
||||||
|
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||||
|
In the 4th, create DIRECTORIES.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
--help display this help and exit.
|
||||||
|
--version display version info and exit.
|
||||||
|
|
||||||
|
-c (ignored)
|
||||||
|
-C install only if different (preserve the last data modification time)
|
||||||
|
-d create directories instead of installing files.
|
||||||
|
-g GROUP $chgrpprog installed files to GROUP.
|
||||||
|
-m MODE $chmodprog installed files to MODE.
|
||||||
|
-o USER $chownprog installed files to USER.
|
||||||
|
-s $stripprog installed files.
|
||||||
|
-t DIRECTORY install into DIRECTORY.
|
||||||
|
-T report an error if DSTFILE is a directory.
|
||||||
|
|
||||||
|
Environment variables override the default commands:
|
||||||
|
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||||
|
RMPROG STRIPPROG
|
||||||
|
"
|
||||||
|
|
||||||
|
while test $# -ne 0; do
|
||||||
|
case $1 in
|
||||||
|
-c) ;;
|
||||||
|
|
||||||
|
-C) copy_on_change=true;;
|
||||||
|
|
||||||
|
-d) dir_arg=true;;
|
||||||
|
|
||||||
|
-g) chgrpcmd="$chgrpprog $2"
|
||||||
|
shift;;
|
||||||
|
|
||||||
|
--help) echo "$usage"; exit $?;;
|
||||||
|
|
||||||
|
-m) mode=$2
|
||||||
|
case $mode in
|
||||||
|
*' '* | *' '* | *'
|
||||||
|
'* | *'*'* | *'?'* | *'['*)
|
||||||
|
echo "$0: invalid mode: $mode" >&2
|
||||||
|
exit 1;;
|
||||||
|
esac
|
||||||
|
shift;;
|
||||||
|
|
||||||
|
-o) chowncmd="$chownprog $2"
|
||||||
|
shift;;
|
||||||
|
|
||||||
|
-s) stripcmd=$stripprog;;
|
||||||
|
|
||||||
|
-t) dst_arg=$2
|
||||||
|
shift;;
|
||||||
|
|
||||||
|
-T) no_target_directory=true;;
|
||||||
|
|
||||||
|
--version) echo "$0 $scriptversion"; exit $?;;
|
||||||
|
|
||||||
|
--) shift
|
||||||
|
break;;
|
||||||
|
|
||||||
|
-*) echo "$0: invalid option: $1" >&2
|
||||||
|
exit 1;;
|
||||||
|
|
||||||
|
*) break;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||||
|
# When -d is used, all remaining arguments are directories to create.
|
||||||
|
# When -t is used, the destination is already specified.
|
||||||
|
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -n "$dst_arg"; then
|
||||||
|
# $@ is not empty: it contains at least $arg.
|
||||||
|
set fnord "$@" "$dst_arg"
|
||||||
|
shift # fnord
|
||||||
|
fi
|
||||||
|
shift # arg
|
||||||
|
dst_arg=$arg
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $# -eq 0; then
|
||||||
|
if test -z "$dir_arg"; then
|
||||||
|
echo "$0: no input file specified." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# It's OK to call `install-sh -d' without argument.
|
||||||
|
# This can happen when creating conditional directories.
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$dir_arg"; then
|
||||||
|
trap '(exit $?); exit' 1 2 13 15
|
||||||
|
|
||||||
|
# Set umask so as not to create temps with too-generous modes.
|
||||||
|
# However, 'strip' requires both read and write access to temps.
|
||||||
|
case $mode in
|
||||||
|
# Optimize common cases.
|
||||||
|
*644) cp_umask=133;;
|
||||||
|
*755) cp_umask=22;;
|
||||||
|
|
||||||
|
*[0-7])
|
||||||
|
if test -z "$stripcmd"; then
|
||||||
|
u_plus_rw=
|
||||||
|
else
|
||||||
|
u_plus_rw='% 200'
|
||||||
|
fi
|
||||||
|
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||||
|
*)
|
||||||
|
if test -z "$stripcmd"; then
|
||||||
|
u_plus_rw=
|
||||||
|
else
|
||||||
|
u_plus_rw=,u+rw
|
||||||
|
fi
|
||||||
|
cp_umask=$mode$u_plus_rw;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
for src
|
||||||
|
do
|
||||||
|
# Protect names starting with `-'.
|
||||||
|
case $src in
|
||||||
|
-*) src=./$src;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test -n "$dir_arg"; then
|
||||||
|
dst=$src
|
||||||
|
dstdir=$dst
|
||||||
|
test -d "$dstdir"
|
||||||
|
dstdir_status=$?
|
||||||
|
else
|
||||||
|
|
||||||
|
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||||
|
# might cause directories to be created, which would be especially bad
|
||||||
|
# if $src (and thus $dsttmp) contains '*'.
|
||||||
|
if test ! -f "$src" && test ! -d "$src"; then
|
||||||
|
echo "$0: $src does not exist." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$dst_arg"; then
|
||||||
|
echo "$0: no destination specified." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
dst=$dst_arg
|
||||||
|
# Protect names starting with `-'.
|
||||||
|
case $dst in
|
||||||
|
-*) dst=./$dst;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# If destination is a directory, append the input filename; won't work
|
||||||
|
# if double slashes aren't ignored.
|
||||||
|
if test -d "$dst"; then
|
||||||
|
if test -n "$no_target_directory"; then
|
||||||
|
echo "$0: $dst_arg: Is a directory" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
dstdir=$dst
|
||||||
|
dst=$dstdir/`basename "$src"`
|
||||||
|
dstdir_status=0
|
||||||
|
else
|
||||||
|
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||||
|
dstdir=`
|
||||||
|
(dirname "$dst") 2>/dev/null ||
|
||||||
|
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||||
|
X"$dst" : 'X\(//\)[^/]' \| \
|
||||||
|
X"$dst" : 'X\(//\)$' \| \
|
||||||
|
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||||
|
echo X"$dst" |
|
||||||
|
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||||
|
s//\1/
|
||||||
|
q
|
||||||
|
}
|
||||||
|
/^X\(\/\/\)[^/].*/{
|
||||||
|
s//\1/
|
||||||
|
q
|
||||||
|
}
|
||||||
|
/^X\(\/\/\)$/{
|
||||||
|
s//\1/
|
||||||
|
q
|
||||||
|
}
|
||||||
|
/^X\(\/\).*/{
|
||||||
|
s//\1/
|
||||||
|
q
|
||||||
|
}
|
||||||
|
s/.*/./; q'
|
||||||
|
`
|
||||||
|
|
||||||
|
test -d "$dstdir"
|
||||||
|
dstdir_status=$?
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
obsolete_mkdir_used=false
|
||||||
|
|
||||||
|
if test $dstdir_status != 0; then
|
||||||
|
case $posix_mkdir in
|
||||||
|
'')
|
||||||
|
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||||
|
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||||
|
umask=`umask`
|
||||||
|
case $stripcmd.$umask in
|
||||||
|
# Optimize common cases.
|
||||||
|
*[2367][2367]) mkdir_umask=$umask;;
|
||||||
|
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||||
|
|
||||||
|
*[0-7])
|
||||||
|
mkdir_umask=`expr $umask + 22 \
|
||||||
|
- $umask % 100 % 40 + $umask % 20 \
|
||||||
|
- $umask % 10 % 4 + $umask % 2
|
||||||
|
`;;
|
||||||
|
*) mkdir_umask=$umask,go-w;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# With -d, create the new directory with the user-specified mode.
|
||||||
|
# Otherwise, rely on $mkdir_umask.
|
||||||
|
if test -n "$dir_arg"; then
|
||||||
|
mkdir_mode=-m$mode
|
||||||
|
else
|
||||||
|
mkdir_mode=
|
||||||
|
fi
|
||||||
|
|
||||||
|
posix_mkdir=false
|
||||||
|
case $umask in
|
||||||
|
*[123567][0-7][0-7])
|
||||||
|
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||||
|
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||||
|
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||||
|
|
||||||
|
if (umask $mkdir_umask &&
|
||||||
|
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
if test -z "$dir_arg" || {
|
||||||
|
# Check for POSIX incompatibilities with -m.
|
||||||
|
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||||
|
# other-writeable bit of parent directory when it shouldn't.
|
||||||
|
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||||
|
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||||
|
case $ls_ld_tmpdir in
|
||||||
|
d????-?r-*) different_mode=700;;
|
||||||
|
d????-?--*) different_mode=755;;
|
||||||
|
*) false;;
|
||||||
|
esac &&
|
||||||
|
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||||
|
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||||
|
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
then posix_mkdir=:
|
||||||
|
fi
|
||||||
|
rmdir "$tmpdir/d" "$tmpdir"
|
||||||
|
else
|
||||||
|
# Remove any dirs left behind by ancient mkdir implementations.
|
||||||
|
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||||
|
fi
|
||||||
|
trap '' 0;;
|
||||||
|
esac;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if
|
||||||
|
$posix_mkdir && (
|
||||||
|
umask $mkdir_umask &&
|
||||||
|
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||||
|
)
|
||||||
|
then :
|
||||||
|
else
|
||||||
|
|
||||||
|
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||||
|
# or it failed possibly due to a race condition. Create the
|
||||||
|
# directory the slow way, step by step, checking for races as we go.
|
||||||
|
|
||||||
|
case $dstdir in
|
||||||
|
/*) prefix='/';;
|
||||||
|
-*) prefix='./';;
|
||||||
|
*) prefix='';;
|
||||||
|
esac
|
||||||
|
|
||||||
|
eval "$initialize_posix_glob"
|
||||||
|
|
||||||
|
oIFS=$IFS
|
||||||
|
IFS=/
|
||||||
|
$posix_glob set -f
|
||||||
|
set fnord $dstdir
|
||||||
|
shift
|
||||||
|
$posix_glob set +f
|
||||||
|
IFS=$oIFS
|
||||||
|
|
||||||
|
prefixes=
|
||||||
|
|
||||||
|
for d
|
||||||
|
do
|
||||||
|
test -z "$d" && continue
|
||||||
|
|
||||||
|
prefix=$prefix$d
|
||||||
|
if test -d "$prefix"; then
|
||||||
|
prefixes=
|
||||||
|
else
|
||||||
|
if $posix_mkdir; then
|
||||||
|
(umask=$mkdir_umask &&
|
||||||
|
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||||
|
# Don't fail if two instances are running concurrently.
|
||||||
|
test -d "$prefix" || exit 1
|
||||||
|
else
|
||||||
|
case $prefix in
|
||||||
|
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||||
|
*) qprefix=$prefix;;
|
||||||
|
esac
|
||||||
|
prefixes="$prefixes '$qprefix'"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
prefix=$prefix/
|
||||||
|
done
|
||||||
|
|
||||||
|
if test -n "$prefixes"; then
|
||||||
|
# Don't fail if two instances are running concurrently.
|
||||||
|
(umask $mkdir_umask &&
|
||||||
|
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||||
|
test -d "$dstdir" || exit 1
|
||||||
|
obsolete_mkdir_used=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -n "$dir_arg"; then
|
||||||
|
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||||
|
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||||
|
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||||
|
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||||
|
else
|
||||||
|
|
||||||
|
# Make a couple of temp file names in the proper directory.
|
||||||
|
dsttmp=$dstdir/_inst.$$_
|
||||||
|
rmtmp=$dstdir/_rm.$$_
|
||||||
|
|
||||||
|
# Trap to clean up those temp files at exit.
|
||||||
|
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||||
|
|
||||||
|
# Copy the file name to the temp name.
|
||||||
|
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||||
|
|
||||||
|
# and set any options; do chmod last to preserve setuid bits.
|
||||||
|
#
|
||||||
|
# If any of these fail, we abort the whole thing. If we want to
|
||||||
|
# ignore errors from any of these, just make sure not to ignore
|
||||||
|
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||||
|
#
|
||||||
|
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||||
|
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||||
|
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||||
|
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||||
|
|
||||||
|
# If -C, don't bother to copy if it wouldn't change the file.
|
||||||
|
if $copy_on_change &&
|
||||||
|
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||||
|
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||||
|
|
||||||
|
eval "$initialize_posix_glob" &&
|
||||||
|
$posix_glob set -f &&
|
||||||
|
set X $old && old=:$2:$4:$5:$6 &&
|
||||||
|
set X $new && new=:$2:$4:$5:$6 &&
|
||||||
|
$posix_glob set +f &&
|
||||||
|
|
||||||
|
test "$old" = "$new" &&
|
||||||
|
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
rm -f "$dsttmp"
|
||||||
|
else
|
||||||
|
# Rename the file to the real destination.
|
||||||
|
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||||
|
|
||||||
|
# The rename failed, perhaps because mv can't rename something else
|
||||||
|
# to itself, or perhaps because mv is so ancient that it does not
|
||||||
|
# support -f.
|
||||||
|
{
|
||||||
|
# Now remove or move aside any old file at destination location.
|
||||||
|
# We try this two ways since rm can't unlink itself on some
|
||||||
|
# systems and the destination file might be busy for other
|
||||||
|
# reasons. In this case, the final cleanup might fail but the new
|
||||||
|
# file should still install successfully.
|
||||||
|
{
|
||||||
|
test ! -f "$dst" ||
|
||||||
|
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||||
|
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||||
|
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||||
|
} ||
|
||||||
|
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||||
|
(exit 1); exit 1
|
||||||
|
}
|
||||||
|
} &&
|
||||||
|
|
||||||
|
# Now rename the file to the real destination.
|
||||||
|
$doit $mvcmd "$dsttmp" "$dst"
|
||||||
|
}
|
||||||
|
fi || exit 1
|
||||||
|
|
||||||
|
trap '' 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Local variables:
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,376 @@
|
||||||
|
#! /bin/sh
|
||||||
|
# Common stub for a few missing GNU programs while installing.
|
||||||
|
|
||||||
|
scriptversion=2009-04-28.21; # UTC
|
||||||
|
|
||||||
|
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
|
||||||
|
# 2008, 2009 Free Software Foundation, Inc.
|
||||||
|
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||||
|
|
||||||
|
# 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, 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
if test $# -eq 0; then
|
||||||
|
echo 1>&2 "Try \`$0 --help' for more information"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
run=:
|
||||||
|
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
|
||||||
|
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
|
||||||
|
|
||||||
|
# In the cases where this matters, `missing' is being run in the
|
||||||
|
# srcdir already.
|
||||||
|
if test -f configure.ac; then
|
||||||
|
configure_ac=configure.ac
|
||||||
|
else
|
||||||
|
configure_ac=configure.in
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg="missing on your system"
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
--run)
|
||||||
|
# Try to run requested program, and just exit if it succeeds.
|
||||||
|
run=
|
||||||
|
shift
|
||||||
|
"$@" && exit 0
|
||||||
|
# Exit code 63 means version mismatch. This often happens
|
||||||
|
# when the user try to use an ancient version of a tool on
|
||||||
|
# a file that requires a minimum version. In this case we
|
||||||
|
# we should proceed has if the program had been absent, or
|
||||||
|
# if --run hadn't been passed.
|
||||||
|
if test $? = 63; then
|
||||||
|
run=:
|
||||||
|
msg="probably too old"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
-h|--h|--he|--hel|--help)
|
||||||
|
echo "\
|
||||||
|
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||||
|
|
||||||
|
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||||
|
error status if there is no known handling for PROGRAM.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h, --help display this help and exit
|
||||||
|
-v, --version output version information and exit
|
||||||
|
--run try to run the given command, and emulate it if it fails
|
||||||
|
|
||||||
|
Supported PROGRAM values:
|
||||||
|
aclocal touch file \`aclocal.m4'
|
||||||
|
autoconf touch file \`configure'
|
||||||
|
autoheader touch file \`config.h.in'
|
||||||
|
autom4te touch the output file, or create a stub one
|
||||||
|
automake touch all \`Makefile.in' files
|
||||||
|
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||||
|
flex create \`lex.yy.c', if possible, from existing .c
|
||||||
|
help2man touch the output file
|
||||||
|
lex create \`lex.yy.c', if possible, from existing .c
|
||||||
|
makeinfo touch the output file
|
||||||
|
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||||
|
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||||
|
|
||||||
|
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
|
||||||
|
\`g' are ignored when checking the name.
|
||||||
|
|
||||||
|
Send bug reports to <bug-automake@gnu.org>."
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
|
||||||
|
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||||
|
echo "missing $scriptversion (GNU Automake)"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
|
||||||
|
-*)
|
||||||
|
echo 1>&2 "$0: Unknown \`$1' option"
|
||||||
|
echo 1>&2 "Try \`$0 --help' for more information"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
|
# normalize program name to check for.
|
||||||
|
program=`echo "$1" | sed '
|
||||||
|
s/^gnu-//; t
|
||||||
|
s/^gnu//; t
|
||||||
|
s/^g//; t'`
|
||||||
|
|
||||||
|
# Now exit if we have it, but it failed. Also exit now if we
|
||||||
|
# don't have it and --version was passed (most likely to detect
|
||||||
|
# the program). This is about non-GNU programs, so use $1 not
|
||||||
|
# $program.
|
||||||
|
case $1 in
|
||||||
|
lex*|yacc*)
|
||||||
|
# Not GNU programs, they don't have --version.
|
||||||
|
;;
|
||||||
|
|
||||||
|
tar*)
|
||||||
|
if test -n "$run"; then
|
||||||
|
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||||
|
exit 1
|
||||||
|
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||||
|
# We have it, but it failed.
|
||||||
|
exit 1
|
||||||
|
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||||
|
# Could not run --version or --help. This is probably someone
|
||||||
|
# running `$TOOL --version' or `$TOOL --help' to check whether
|
||||||
|
# $TOOL exists and not knowing $TOOL uses missing.
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# If it does not exist, or fails to run (possibly an outdated version),
|
||||||
|
# try to emulate it.
|
||||||
|
case $program in
|
||||||
|
aclocal*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is $msg. You should only need it if
|
||||||
|
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||||
|
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||||
|
any GNU archive site."
|
||||||
|
touch aclocal.m4
|
||||||
|
;;
|
||||||
|
|
||||||
|
autoconf*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is $msg. You should only need it if
|
||||||
|
you modified \`${configure_ac}'. You might want to install the
|
||||||
|
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||||
|
archive site."
|
||||||
|
touch configure
|
||||||
|
;;
|
||||||
|
|
||||||
|
autoheader*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is $msg. You should only need it if
|
||||||
|
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||||
|
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||||
|
from any GNU archive site."
|
||||||
|
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||||
|
test -z "$files" && files="config.h"
|
||||||
|
touch_files=
|
||||||
|
for f in $files; do
|
||||||
|
case $f in
|
||||||
|
*:*) touch_files="$touch_files "`echo "$f" |
|
||||||
|
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||||
|
*) touch_files="$touch_files $f.in";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
touch $touch_files
|
||||||
|
;;
|
||||||
|
|
||||||
|
automake*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is $msg. You should only need it if
|
||||||
|
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||||
|
You might want to install the \`Automake' and \`Perl' packages.
|
||||||
|
Grab them from any GNU archive site."
|
||||||
|
find . -type f -name Makefile.am -print |
|
||||||
|
sed 's/\.am$/.in/' |
|
||||||
|
while read f; do touch "$f"; done
|
||||||
|
;;
|
||||||
|
|
||||||
|
autom4te*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is needed, but is $msg.
|
||||||
|
You might have modified some files without having the
|
||||||
|
proper tools for further handling them.
|
||||||
|
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||||
|
archive site."
|
||||||
|
|
||||||
|
file=`echo "$*" | sed -n "$sed_output"`
|
||||||
|
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||||
|
if test -f "$file"; then
|
||||||
|
touch $file
|
||||||
|
else
|
||||||
|
test -z "$file" || exec >$file
|
||||||
|
echo "#! /bin/sh"
|
||||||
|
echo "# Created by GNU Automake missing as a replacement of"
|
||||||
|
echo "# $ $@"
|
||||||
|
echo "exit 0"
|
||||||
|
chmod +x $file
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
bison*|yacc*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' $msg. You should only need it if
|
||||||
|
you modified a \`.y' file. You may need the \`Bison' package
|
||||||
|
in order for those modifications to take effect. You can get
|
||||||
|
\`Bison' from any GNU archive site."
|
||||||
|
rm -f y.tab.c y.tab.h
|
||||||
|
if test $# -ne 1; then
|
||||||
|
eval LASTARG="\${$#}"
|
||||||
|
case $LASTARG in
|
||||||
|
*.y)
|
||||||
|
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||||
|
if test -f "$SRCFILE"; then
|
||||||
|
cp "$SRCFILE" y.tab.c
|
||||||
|
fi
|
||||||
|
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||||
|
if test -f "$SRCFILE"; then
|
||||||
|
cp "$SRCFILE" y.tab.h
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
if test ! -f y.tab.h; then
|
||||||
|
echo >y.tab.h
|
||||||
|
fi
|
||||||
|
if test ! -f y.tab.c; then
|
||||||
|
echo 'main() { return 0; }' >y.tab.c
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
lex*|flex*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is $msg. You should only need it if
|
||||||
|
you modified a \`.l' file. You may need the \`Flex' package
|
||||||
|
in order for those modifications to take effect. You can get
|
||||||
|
\`Flex' from any GNU archive site."
|
||||||
|
rm -f lex.yy.c
|
||||||
|
if test $# -ne 1; then
|
||||||
|
eval LASTARG="\${$#}"
|
||||||
|
case $LASTARG in
|
||||||
|
*.l)
|
||||||
|
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||||
|
if test -f "$SRCFILE"; then
|
||||||
|
cp "$SRCFILE" lex.yy.c
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
if test ! -f lex.yy.c; then
|
||||||
|
echo 'main() { return 0; }' >lex.yy.c
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
help2man*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is $msg. You should only need it if
|
||||||
|
you modified a dependency of a manual page. You may need the
|
||||||
|
\`Help2man' package in order for those modifications to take
|
||||||
|
effect. You can get \`Help2man' from any GNU archive site."
|
||||||
|
|
||||||
|
file=`echo "$*" | sed -n "$sed_output"`
|
||||||
|
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||||
|
if test -f "$file"; then
|
||||||
|
touch $file
|
||||||
|
else
|
||||||
|
test -z "$file" || exec >$file
|
||||||
|
echo ".ab help2man is required to generate this page"
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
makeinfo*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is $msg. You should only need it if
|
||||||
|
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||||
|
indirectly affecting the aspect of the manual. The spurious
|
||||||
|
call might also be the consequence of using a buggy \`make' (AIX,
|
||||||
|
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||||
|
the \`GNU make' package. Grab either from any GNU archive site."
|
||||||
|
# The file to touch is that specified with -o ...
|
||||||
|
file=`echo "$*" | sed -n "$sed_output"`
|
||||||
|
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||||
|
if test -z "$file"; then
|
||||||
|
# ... or it is the one specified with @setfilename ...
|
||||||
|
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||||
|
file=`sed -n '
|
||||||
|
/^@setfilename/{
|
||||||
|
s/.* \([^ ]*\) *$/\1/
|
||||||
|
p
|
||||||
|
q
|
||||||
|
}' $infile`
|
||||||
|
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
||||||
|
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
||||||
|
fi
|
||||||
|
# If the file does not exist, the user really needs makeinfo;
|
||||||
|
# let's fail without touching anything.
|
||||||
|
test -f $file || exit 1
|
||||||
|
touch $file
|
||||||
|
;;
|
||||||
|
|
||||||
|
tar*)
|
||||||
|
shift
|
||||||
|
|
||||||
|
# We have already tried tar in the generic part.
|
||||||
|
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||||
|
# messages.
|
||||||
|
if (gnutar --version > /dev/null 2>&1); then
|
||||||
|
gnutar "$@" && exit 0
|
||||||
|
fi
|
||||||
|
if (gtar --version > /dev/null 2>&1); then
|
||||||
|
gtar "$@" && exit 0
|
||||||
|
fi
|
||||||
|
firstarg="$1"
|
||||||
|
if shift; then
|
||||||
|
case $firstarg in
|
||||||
|
*o*)
|
||||||
|
firstarg=`echo "$firstarg" | sed s/o//`
|
||||||
|
tar "$firstarg" "$@" && exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
case $firstarg in
|
||||||
|
*h*)
|
||||||
|
firstarg=`echo "$firstarg" | sed s/h//`
|
||||||
|
tar "$firstarg" "$@" && exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||||
|
You may want to install GNU tar or Free paxutils, or check the
|
||||||
|
command line arguments."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is needed, and is $msg.
|
||||||
|
You might have modified some files without having the
|
||||||
|
proper tools for further handling them. Check the \`README' file,
|
||||||
|
it often tells you about the needed prerequisites for installing
|
||||||
|
this package. You may also peek at any GNU archive site, in case
|
||||||
|
some other package would contain this missing \`$1' program."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
# Local variables:
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
|
@ -0,0 +1,13 @@
|
||||||
|
# Makefile.am #
|
||||||
|
bin_PROGRAMS = submit_multi_resp_test submit_multi_test alert_notification_test bind_receiver_resp_test bind_receiver_test bind_transceiver_resp_test bind_transceiver_test bind_transmitter_resp_test bind_transmitter_test cancel_sm_resp_test cancel_sm_test data_sm_resp_test data_sm_test deliver_sm_resp_test deliver_sm_test enquire_link_resp_test enquire_link_test generic_nack_test outbind_test query_sm_resp_test query_sm_test replace_sm_resp_test replace_sm_test submit_sm_resp_test submit_sm_test unbind_resp_test unbind_test esme analizer sendwp
|
||||||
|
|
||||||
|
include $(top_srcdir)/test_pdu/Makefile.am
|
||||||
|
include $(top_srcdir)/test_apps/Makefile.am
|
||||||
|
include $(top_srcdir)/src/Makefile.am
|
||||||
|
|
||||||
|
LDADD = $(top_srcdir)/binary/libsmpp34.la
|
||||||
|
AM_CPPFLAGS = -D_REENTRANT -DBSD_COMP -D_POSIX_PTHREAD_SEMANTICS
|
||||||
|
AM_CFLAGS = @CFLAGS@ -Wall -fPIC # -static
|
||||||
|
INCLUDES = -I../src -I..
|
||||||
|
AM_LDFLAGS = -lrt -lpthread
|
||||||
|
OBJ_EXTRA_DIST = $(esme_EXTRA_DIST)
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,30 @@
|
||||||
|
# -*- Autoconf -*-
|
||||||
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
|
AC_PREREQ(2.57)
|
||||||
|
AC_INIT(libsmpp34, 1.10, ultraismo@yahoo.com)
|
||||||
|
AC_CONFIG_AUX_DIR(aux_config)
|
||||||
|
AM_INIT_AUTOMAKE
|
||||||
|
AM_CONFIG_HEADER([aux_config/config.h])
|
||||||
|
|
||||||
|
# Checks for programs.
|
||||||
|
AC_PROG_CC
|
||||||
|
AM_PROG_CC_C_O
|
||||||
|
AC_PROG_LIBTOOL
|
||||||
|
AC_PROG_INSTALL
|
||||||
|
|
||||||
|
# Checks for libraries.
|
||||||
|
|
||||||
|
# Checks for header files.
|
||||||
|
AC_HEADER_STDC
|
||||||
|
AC_CHECK_HEADERS([malloc.h netinet/in.h stdint.h string.h])
|
||||||
|
|
||||||
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
|
||||||
|
# Checks for library functions.
|
||||||
|
AC_FUNC_MALLOC
|
||||||
|
AC_CHECK_FUNCS([memset])
|
||||||
|
AC_OUTPUT([Makefile
|
||||||
|
def_frame/Makefile
|
||||||
|
def_list/Makefile
|
||||||
|
binary/Makefile])
|
|
@ -0,0 +1,43 @@
|
||||||
|
# def_frame/Makefile.am #
|
||||||
|
pkgdatadir = $(includedir)/def_frame
|
||||||
|
FRAME_DATA_DIR = $(top_srcdir)/def_frame
|
||||||
|
dist_pkgdata_DATA = \
|
||||||
|
$(FRAME_DATA_DIR)/alert_notification.frame \
|
||||||
|
$(FRAME_DATA_DIR)/alert_notification.tlv \
|
||||||
|
$(FRAME_DATA_DIR)/bind_receiver.frame \
|
||||||
|
$(FRAME_DATA_DIR)/bind_receiver_resp.frame \
|
||||||
|
$(FRAME_DATA_DIR)/bind_receiver_resp.tlv \
|
||||||
|
$(FRAME_DATA_DIR)/bind_transceiver.frame \
|
||||||
|
$(FRAME_DATA_DIR)/bind_transceiver_resp.frame \
|
||||||
|
$(FRAME_DATA_DIR)/bind_transceiver_resp.tlv \
|
||||||
|
$(FRAME_DATA_DIR)/bind_transmitter.frame \
|
||||||
|
$(FRAME_DATA_DIR)/bind_transmitter_resp.frame \
|
||||||
|
$(FRAME_DATA_DIR)/bind_transmitter_resp.tlv \
|
||||||
|
$(FRAME_DATA_DIR)/cancel_sm.frame \
|
||||||
|
$(FRAME_DATA_DIR)/clean.frame \
|
||||||
|
$(FRAME_DATA_DIR)/data_sm.frame \
|
||||||
|
$(FRAME_DATA_DIR)/data_sm_resp.frame \
|
||||||
|
$(FRAME_DATA_DIR)/data_sm_resp.tlv \
|
||||||
|
$(FRAME_DATA_DIR)/data_sm.tlv \
|
||||||
|
$(FRAME_DATA_DIR)/deliver_sm.frame \
|
||||||
|
$(FRAME_DATA_DIR)/deliver_sm_resp.frame \
|
||||||
|
$(FRAME_DATA_DIR)/deliver_sm.tlv \
|
||||||
|
$(FRAME_DATA_DIR)/header.frame \
|
||||||
|
$(FRAME_DATA_DIR)/outbind.frame \
|
||||||
|
$(FRAME_DATA_DIR)/query_sm.frame \
|
||||||
|
$(FRAME_DATA_DIR)/query_sm_resp.frame \
|
||||||
|
$(FRAME_DATA_DIR)/replace_sm.frame \
|
||||||
|
$(FRAME_DATA_DIR)/dad.frame \
|
||||||
|
$(FRAME_DATA_DIR)/submit_multi.dad \
|
||||||
|
$(FRAME_DATA_DIR)/submit_multi.frame \
|
||||||
|
$(FRAME_DATA_DIR)/submit_multi.tlv \
|
||||||
|
$(FRAME_DATA_DIR)/udad.frame \
|
||||||
|
$(FRAME_DATA_DIR)/submit_multi_resp.udad \
|
||||||
|
$(FRAME_DATA_DIR)/submit_multi_resp.frame \
|
||||||
|
$(FRAME_DATA_DIR)/submit_sm.frame \
|
||||||
|
$(FRAME_DATA_DIR)/submit_sm_resp.frame \
|
||||||
|
$(FRAME_DATA_DIR)/submit_sm.tlv \
|
||||||
|
$(FRAME_DATA_DIR)/tlv.frame \
|
||||||
|
$(FRAME_DATA_DIR)/tlv.operation
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,438 @@
|
||||||
|
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
|
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||||
|
# Inc.
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
|
||||||
|
VPATH = @srcdir@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
subdir = def_frame
|
||||||
|
DIST_COMMON = $(dist_pkgdata_DATA) $(srcdir)/Makefile.am \
|
||||||
|
$(srcdir)/Makefile.in
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
mkinstalldirs = $(install_sh) -d
|
||||||
|
CONFIG_HEADER = $(top_builddir)/aux_config/config.h
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
|
SOURCES =
|
||||||
|
DIST_SOURCES =
|
||||||
|
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||||
|
am__vpath_adj = case $$p in \
|
||||||
|
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
|
*) f=$$p;; \
|
||||||
|
esac;
|
||||||
|
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||||
|
am__install_max = 40
|
||||||
|
am__nobase_strip_setup = \
|
||||||
|
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||||
|
am__nobase_strip = \
|
||||||
|
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||||
|
am__nobase_list = $(am__nobase_strip_setup); \
|
||||||
|
for p in $$list; do echo "$$p $$p"; done | \
|
||||||
|
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||||
|
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||||
|
if (++n[$$2] == $(am__install_max)) \
|
||||||
|
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||||
|
END { for (dir in files) print dir, files[dir] }'
|
||||||
|
am__base_list = \
|
||||||
|
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||||
|
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||||
|
am__installdirs = "$(DESTDIR)$(pkgdatadir)"
|
||||||
|
DATA = $(dist_pkgdata_DATA)
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
|
||||||
|
# def_frame/Makefile.am #
|
||||||
|
pkgdatadir = $(includedir)/def_frame
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AR = @AR@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
DSYMUTIL = @DSYMUTIL@
|
||||||
|
DUMPBIN = @DUMPBIN@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
GREP = @GREP@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
LD = @LD@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LIPO = @LIPO@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
|
NM = @NM@
|
||||||
|
NMEDIT = @NMEDIT@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
OTOOL = @OTOOL@
|
||||||
|
OTOOL64 = @OTOOL64@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SED = @SED@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
abs_builddir = @abs_builddir@
|
||||||
|
abs_srcdir = @abs_srcdir@
|
||||||
|
abs_top_builddir = @abs_top_builddir@
|
||||||
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
builddir = @builddir@
|
||||||
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
lt_ECHO = @lt_ECHO@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
top_build_prefix = @top_build_prefix@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
FRAME_DATA_DIR = $(top_srcdir)/def_frame
|
||||||
|
dist_pkgdata_DATA = \
|
||||||
|
$(FRAME_DATA_DIR)/alert_notification.frame \
|
||||||
|
$(FRAME_DATA_DIR)/alert_notification.tlv \
|
||||||
|
$(FRAME_DATA_DIR)/bind_receiver.frame \
|
||||||
|
$(FRAME_DATA_DIR)/bind_receiver_resp.frame \
|
||||||
|
$(FRAME_DATA_DIR)/bind_receiver_resp.tlv \
|
||||||
|
$(FRAME_DATA_DIR)/bind_transceiver.frame \
|
||||||
|
$(FRAME_DATA_DIR)/bind_transceiver_resp.frame \
|
||||||
|
$(FRAME_DATA_DIR)/bind_transceiver_resp.tlv \
|
||||||
|
$(FRAME_DATA_DIR)/bind_transmitter.frame \
|
||||||
|
$(FRAME_DATA_DIR)/bind_transmitter_resp.frame \
|
||||||
|
$(FRAME_DATA_DIR)/bind_transmitter_resp.tlv \
|
||||||
|
$(FRAME_DATA_DIR)/cancel_sm.frame \
|
||||||
|
$(FRAME_DATA_DIR)/clean.frame \
|
||||||
|
$(FRAME_DATA_DIR)/data_sm.frame \
|
||||||
|
$(FRAME_DATA_DIR)/data_sm_resp.frame \
|
||||||
|
$(FRAME_DATA_DIR)/data_sm_resp.tlv \
|
||||||
|
$(FRAME_DATA_DIR)/data_sm.tlv \
|
||||||
|
$(FRAME_DATA_DIR)/deliver_sm.frame \
|
||||||
|
$(FRAME_DATA_DIR)/deliver_sm_resp.frame \
|
||||||
|
$(FRAME_DATA_DIR)/deliver_sm.tlv \
|
||||||
|
$(FRAME_DATA_DIR)/header.frame \
|
||||||
|
$(FRAME_DATA_DIR)/outbind.frame \
|
||||||
|
$(FRAME_DATA_DIR)/query_sm.frame \
|
||||||
|
$(FRAME_DATA_DIR)/query_sm_resp.frame \
|
||||||
|
$(FRAME_DATA_DIR)/replace_sm.frame \
|
||||||
|
$(FRAME_DATA_DIR)/dad.frame \
|
||||||
|
$(FRAME_DATA_DIR)/submit_multi.dad \
|
||||||
|
$(FRAME_DATA_DIR)/submit_multi.frame \
|
||||||
|
$(FRAME_DATA_DIR)/submit_multi.tlv \
|
||||||
|
$(FRAME_DATA_DIR)/udad.frame \
|
||||||
|
$(FRAME_DATA_DIR)/submit_multi_resp.udad \
|
||||||
|
$(FRAME_DATA_DIR)/submit_multi_resp.frame \
|
||||||
|
$(FRAME_DATA_DIR)/submit_sm.frame \
|
||||||
|
$(FRAME_DATA_DIR)/submit_sm_resp.frame \
|
||||||
|
$(FRAME_DATA_DIR)/submit_sm.tlv \
|
||||||
|
$(FRAME_DATA_DIR)/tlv.frame \
|
||||||
|
$(FRAME_DATA_DIR)/tlv.operation
|
||||||
|
|
||||||
|
all: all-am
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||||
|
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu def_frame/Makefile'; \
|
||||||
|
$(am__cd) $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --gnu def_frame/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: $(am__configure_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
|
mostlyclean-libtool:
|
||||||
|
-rm -f *.lo
|
||||||
|
|
||||||
|
clean-libtool:
|
||||||
|
-rm -rf .libs _libs
|
||||||
|
install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
|
||||||
|
@$(NORMAL_INSTALL)
|
||||||
|
test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
|
||||||
|
@list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
|
||||||
|
for p in $$list; do \
|
||||||
|
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||||
|
echo "$$d$$p"; \
|
||||||
|
done | $(am__base_list) | \
|
||||||
|
while read files; do \
|
||||||
|
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \
|
||||||
|
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \
|
||||||
|
done
|
||||||
|
|
||||||
|
uninstall-dist_pkgdataDATA:
|
||||||
|
@$(NORMAL_UNINSTALL)
|
||||||
|
@list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
|
||||||
|
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||||
|
test -n "$$files" || exit 0; \
|
||||||
|
echo " ( cd '$(DESTDIR)$(pkgdatadir)' && rm -f" $$files ")"; \
|
||||||
|
cd "$(DESTDIR)$(pkgdatadir)" && rm -f $$files
|
||||||
|
tags: TAGS
|
||||||
|
TAGS:
|
||||||
|
|
||||||
|
ctags: CTAGS
|
||||||
|
CTAGS:
|
||||||
|
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
list='$(DISTFILES)'; \
|
||||||
|
dist_files=`for file in $$list; do echo $$file; done | \
|
||||||
|
sed -e "s|^$$srcdirstrip/||;t" \
|
||||||
|
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||||
|
case $$dist_files in \
|
||||||
|
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||||
|
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||||
|
sort -u` ;; \
|
||||||
|
esac; \
|
||||||
|
for file in $$dist_files; do \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test -d "$(distdir)/$$file"; then \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f "$(distdir)/$$file" \
|
||||||
|
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
check-am: all-am
|
||||||
|
check: check-am
|
||||||
|
all-am: Makefile $(DATA)
|
||||||
|
installdirs:
|
||||||
|
for dir in "$(DESTDIR)$(pkgdatadir)"; do \
|
||||||
|
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||||
|
done
|
||||||
|
install: install-am
|
||||||
|
install-exec: install-exec-am
|
||||||
|
install-data: install-data-am
|
||||||
|
uninstall: uninstall-am
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-am
|
||||||
|
install-strip:
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
`test -z '$(STRIP)' || \
|
||||||
|
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-am
|
||||||
|
|
||||||
|
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-generic
|
||||||
|
|
||||||
|
dvi: dvi-am
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-am
|
||||||
|
|
||||||
|
html-am:
|
||||||
|
|
||||||
|
info: info-am
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am: install-dist_pkgdataDATA
|
||||||
|
|
||||||
|
install-dvi: install-dvi-am
|
||||||
|
|
||||||
|
install-dvi-am:
|
||||||
|
|
||||||
|
install-exec-am:
|
||||||
|
|
||||||
|
install-html: install-html-am
|
||||||
|
|
||||||
|
install-html-am:
|
||||||
|
|
||||||
|
install-info: install-info-am
|
||||||
|
|
||||||
|
install-info-am:
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
install-pdf: install-pdf-am
|
||||||
|
|
||||||
|
install-pdf-am:
|
||||||
|
|
||||||
|
install-ps: install-ps-am
|
||||||
|
|
||||||
|
install-ps-am:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||||
|
|
||||||
|
pdf: pdf-am
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-am
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am: uninstall-dist_pkgdataDATA
|
||||||
|
|
||||||
|
.MAKE: install-am install-strip
|
||||||
|
|
||||||
|
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||||
|
distclean distclean-generic distclean-libtool distdir dvi \
|
||||||
|
dvi-am html html-am info info-am install install-am \
|
||||||
|
install-data install-data-am install-dist_pkgdataDATA \
|
||||||
|
install-dvi install-dvi-am install-exec install-exec-am \
|
||||||
|
install-html install-html-am install-info install-info-am \
|
||||||
|
install-man install-pdf install-pdf-am install-ps \
|
||||||
|
install-ps-am install-strip installcheck installcheck-am \
|
||||||
|
installdirs maintainer-clean maintainer-clean-generic \
|
||||||
|
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
||||||
|
ps ps-am uninstall uninstall-am uninstall-dist_pkgdataDATA
|
||||||
|
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
|
@ -0,0 +1,7 @@
|
||||||
|
U08( instancia, source_addr_ton, str_addr_ton );
|
||||||
|
U08( instancia, source_addr_npi, str_addr_npi );
|
||||||
|
C_OCTET( instancia, source_addr, 65 );
|
||||||
|
U08( instancia, esme_addr_ton, str_addr_ton );
|
||||||
|
U08( instancia, esme_addr_npi, str_addr_npi );
|
||||||
|
C_OCTET( instancia, esme_addr, 65 );
|
||||||
|
TLV( instancia, tlv, do_tlv_alert_notification );
|
|
@ -0,0 +1,8 @@
|
||||||
|
#define do_tlv_alert_notification( inst_tlv )\
|
||||||
|
U16( inst_tlv->, tag, str_tlv_id );\
|
||||||
|
U16( inst_tlv->, length, valueDec_16 );\
|
||||||
|
if( inst_tlv-> tag == TLVID_ms_availability_status ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else {\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1024 ) /* Parameter forwarded */\
|
||||||
|
};
|
|
@ -0,0 +1,7 @@
|
||||||
|
C_OCTET( instancia, system_id, 16 );
|
||||||
|
C_OCTET( instancia, password, 9 );
|
||||||
|
C_OCTET( instancia, system_type, 13 );
|
||||||
|
U08( instancia, interface_version, valueDec_08 );
|
||||||
|
U08( instancia, addr_ton, str_addr_ton );
|
||||||
|
U08( instancia, addr_npi, str_addr_npi );
|
||||||
|
C_OCTET( instancia, address_range, 41 );
|
|
@ -0,0 +1,2 @@
|
||||||
|
C_OCTET( instancia, system_id, 16 );
|
||||||
|
TLV( instancia, tlv, do_tlv_bind_receiver_resp );
|
|
@ -0,0 +1,8 @@
|
||||||
|
#define do_tlv_bind_receiver_resp( inst_tlv )\
|
||||||
|
U16( inst_tlv->, tag, str_tlv_id );\
|
||||||
|
U16( inst_tlv->, length, valueDec_16 );\
|
||||||
|
if( inst_tlv-> tag == TLVID_sc_interface_version ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else {\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1024 ) /* Parameter forwarded */\
|
||||||
|
};
|
|
@ -0,0 +1,7 @@
|
||||||
|
C_OCTET( instancia, system_id, 16 );
|
||||||
|
C_OCTET( instancia, password, 9 );
|
||||||
|
C_OCTET( instancia, system_type, 13 );
|
||||||
|
U08( instancia, interface_version, test_interface_version );
|
||||||
|
U08( instancia, addr_ton, str_addr_ton );
|
||||||
|
U08( instancia, addr_npi, str_addr_npi );
|
||||||
|
C_OCTET( instancia, address_range, 41 );
|
|
@ -0,0 +1,2 @@
|
||||||
|
C_OCTET( instancia, system_id, 16 );
|
||||||
|
TLV( instancia, tlv, do_tlv_bind_transceiver_resp );
|
|
@ -0,0 +1,8 @@
|
||||||
|
#define do_tlv_bind_transceiver_resp( inst_tlv )\
|
||||||
|
U16( inst_tlv->, tag, str_tlv_id );\
|
||||||
|
U16( inst_tlv->, length, valueDec_16 );\
|
||||||
|
if( inst_tlv-> tag == TLVID_sc_interface_version ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else {\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1024 ) /* Parameter forwarded */\
|
||||||
|
};
|
|
@ -0,0 +1,7 @@
|
||||||
|
C_OCTET( instancia, system_id, 16 );
|
||||||
|
C_OCTET( instancia, password, 9 );
|
||||||
|
C_OCTET( instancia, system_type, 13 );
|
||||||
|
U08( instancia, interface_version, test_interface_version );
|
||||||
|
U08( instancia, addr_ton, str_addr_ton );
|
||||||
|
U08( instancia, addr_npi, str_addr_npi );
|
||||||
|
C_OCTET( instancia, address_range, 41 );
|
|
@ -0,0 +1,2 @@
|
||||||
|
C_OCTET( instancia, system_id, 16 );
|
||||||
|
TLV( instancia, tlv, do_tlv_bind_transmitter_resp );
|
|
@ -0,0 +1,8 @@
|
||||||
|
#define do_tlv_bind_transmitter_resp( inst_tlv )\
|
||||||
|
U16( inst_tlv->, tag, str_tlv_id );\
|
||||||
|
U16( inst_tlv->, length, valueDec_16 );\
|
||||||
|
if( inst_tlv-> tag == TLVID_sc_interface_version ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else {\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1024 ) /* Parameter forwarded */\
|
||||||
|
};
|
|
@ -0,0 +1,8 @@
|
||||||
|
C_OCTET( instancia, service_type, 6 );
|
||||||
|
C_OCTET( instancia, message_id, 65 );
|
||||||
|
U08( instancia, source_addr_ton, str_addr_ton );
|
||||||
|
U08( instancia, source_addr_npi, str_addr_npi );
|
||||||
|
C_OCTET( instancia, source_addr, 21 );
|
||||||
|
U08( instancia, dest_addr_ton, str_addr_ton );
|
||||||
|
U08( instancia, dest_addr_npi, str_addr_npi );
|
||||||
|
C_OCTET( instancia, destination_addr, 21 );
|
|
@ -0,0 +1,12 @@
|
||||||
|
#undef U32
|
||||||
|
#undef U16
|
||||||
|
#undef U08
|
||||||
|
#undef O_C_OCTET
|
||||||
|
#undef C_OCTET
|
||||||
|
#undef OCTET8
|
||||||
|
#undef OCTET16
|
||||||
|
#undef do_tlv
|
||||||
|
#undef TLV
|
||||||
|
#undef DAD
|
||||||
|
#undef UDAD
|
||||||
|
#undef instancia
|
|
@ -0,0 +1,3 @@
|
||||||
|
U08( instancia, dest_flag, valueDec_08 );
|
||||||
|
UU2( instancia, value, 21 );
|
||||||
|
DAD( instancia, next, do_dad );
|
|
@ -0,0 +1,11 @@
|
||||||
|
C_OCTET( instancia, service_type, 6 );
|
||||||
|
U08( instancia, source_addr_ton, str_addr_ton );
|
||||||
|
U08( instancia, source_addr_npi, str_addr_npi );
|
||||||
|
C_OCTET( instancia, source_addr, ADDRESS_LENGTH );
|
||||||
|
U08( instancia, dest_addr_ton, str_addr_ton );
|
||||||
|
U08( instancia, dest_addr_npi, str_addr_npi );
|
||||||
|
C_OCTET( instancia, destination_addr, 65 );
|
||||||
|
U08( instancia, esm_class, valueDec_08 );
|
||||||
|
U08( instancia, registered_delivery, valueDec_08 );
|
||||||
|
U08( instancia, data_coding, valueDec_08 );
|
||||||
|
TLV( instancia, tlv, do_tlv_data_sm );
|
|
@ -0,0 +1,86 @@
|
||||||
|
#define do_tlv_data_sm( inst_tlv )\
|
||||||
|
U16( inst_tlv->, tag, str_tlv_id );\
|
||||||
|
U16( inst_tlv->, length, valueDec_16 );\
|
||||||
|
if( inst_tlv-> tag == TLVID_source_port ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_source_addr_subunit ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_source_network_type ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_source_bearer_type ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_source_telematics_id ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_destination_port ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_dest_addr_subunit ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_dest_network_type ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_dest_bearer_type ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_dest_telematics_id ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_sar_msg_ref_num ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_sar_total_segments ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_sar_segment_seqnum ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_more_messages_to_send ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_qos_time_to_live ){\
|
||||||
|
U32( inst_tlv->, value.val32, valueDec_32 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_payload_type ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_message_payload ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1024 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_set_dpf ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_receipted_message_id ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 65 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_message_state ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_network_error_code ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 3 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_user_message_reference ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_privacy_indicator ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_callback_num ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 19 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_callback_num_pres_ind ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_callback_num_atag ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 65 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_source_subaddress ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 23 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_dest_subaddress ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 23 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_user_response_code ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_display_time ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_sms_signal ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_ms_validity ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_ms_msg_wait_facilities ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_number_of_messages ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_alert_on_message_delivery ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 0 ); /* WARNING */\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_language_indicator ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_its_reply_type ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_its_session_info ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag > 0x13FF && inst_tlv-> tag < 0x4000 ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1024 )\
|
||||||
|
} else if( inst_tlv-> tag > 0x3FFF && inst_tlv-> tag < 0xFFFF ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1024 )\
|
||||||
|
} else {\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1024 ) /* Parameter forwarded */\
|
||||||
|
};
|
|
@ -0,0 +1 @@
|
||||||
|
C_OCTET( instancia, message_id, 65 );
|
|
@ -0,0 +1,14 @@
|
||||||
|
#define do_tlv_data_sm_resp( inst_tlv )\
|
||||||
|
U16( inst_tlv->, tag, str_tlv_id );\
|
||||||
|
U16( inst_tlv->, length, valueDec_16 );\
|
||||||
|
if( inst_tlv-> tag == TLVID_delivery_failure_reason ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_network_error_code ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 3 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_additional_status_info_text ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 256 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_dpf_result ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else {\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1024 ) /* Parameter forwarded */\
|
||||||
|
};
|
|
@ -0,0 +1,19 @@
|
||||||
|
C_OCTET( instancia, service_type, 6 );
|
||||||
|
U08( instancia, source_addr_ton, str_addr_ton );
|
||||||
|
U08( instancia, source_addr_npi, str_addr_npi );
|
||||||
|
C_OCTET( instancia, source_addr, 21 );
|
||||||
|
U08( instancia, dest_addr_ton, str_addr_ton );
|
||||||
|
U08( instancia, dest_addr_npi, str_addr_npi );
|
||||||
|
C_OCTET( instancia, destination_addr, 21 );
|
||||||
|
U08( instancia, esm_class, valueDec_08 );
|
||||||
|
U08( instancia, protocol_id, valueDec_08 );
|
||||||
|
U08( instancia, priority_flag, valueDec_08 );
|
||||||
|
C_OCTET( instancia, schedule_delivery_time, 1 );
|
||||||
|
C_OCTET( instancia, validity_period, 1 );
|
||||||
|
U08( instancia, registered_delivery, valueDec_08 );
|
||||||
|
U08( instancia, replace_if_present_flag, valueDec_08 );
|
||||||
|
U08( instancia, data_coding, valueDec_08 );
|
||||||
|
U08( instancia, sm_default_msg_id, valueDec_08 );
|
||||||
|
U08( instancia, sm_length, valueDec_08 );
|
||||||
|
OCTET8( instancia, short_message, 254 );
|
||||||
|
TLV( instancia, tlv, do_tlv_deliver_sm );
|
|
@ -0,0 +1,50 @@
|
||||||
|
#define do_tlv_deliver_sm( inst_tlv )\
|
||||||
|
U16( inst_tlv->, tag, str_tlv_id );\
|
||||||
|
U16( inst_tlv->, length, valueDec_16 );\
|
||||||
|
if( inst_tlv-> tag == TLVID_user_message_reference ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_source_port ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_destination_port ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_sar_msg_ref_num ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_sar_total_segments ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_sar_segment_seqnum ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_user_response_code ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_privacy_indicator ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_payload_type ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_message_payload ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1024 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_callback_num ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 19 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_source_subaddress ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 23 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_dest_subaddress ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 23 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_language_indicator ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_its_session_info ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_network_error_code ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 3 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_message_state ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_receipted_message_id ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 65 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_set_dpf ){ /* NO pertenece */\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_source_network_type ){ /* NO pertenece */\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag > 0x13FF && inst_tlv-> tag < 0x4000 ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1024 )\
|
||||||
|
} else if( inst_tlv-> tag > 0x3FFF && inst_tlv-> tag < 0xFFFF ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1024 )\
|
||||||
|
} else {\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1024 ) /* Parameter forwarded */\
|
||||||
|
};
|
|
@ -0,0 +1 @@
|
||||||
|
C_OCTET( instancia, message_id, 1 );
|
|
@ -0,0 +1,4 @@
|
||||||
|
U32( instancia, command_length , valueDec_32 );
|
||||||
|
U32( instancia, command_id , str_command_id );
|
||||||
|
U32( instancia, command_status , str_command_status );
|
||||||
|
U32( instancia, sequence_number, test_sequence_number );
|
|
@ -0,0 +1,2 @@
|
||||||
|
C_OCTET( instancia, system_id, 16 );
|
||||||
|
C_OCTET( instancia, password, 9 );
|
|
@ -0,0 +1,4 @@
|
||||||
|
C_OCTET( instancia, message_id, 65 );
|
||||||
|
U08( instancia, source_addr_ton, str_addr_ton );
|
||||||
|
U08( instancia, source_addr_npi, str_addr_npi );
|
||||||
|
C_OCTET( instancia, source_addr, 21 );
|
|
@ -0,0 +1,4 @@
|
||||||
|
C_OCTET( instancia, message_id, 65 );
|
||||||
|
C_OCTET( instancia, final_date, 17 );
|
||||||
|
U08( instancia, message_state, valueDec_08 );
|
||||||
|
U08( instancia, error_code, valueDec_08 );
|
|
@ -0,0 +1,10 @@
|
||||||
|
C_OCTET( instancia, message_id, 65 );
|
||||||
|
U08( instancia, source_addr_ton, str_addr_ton );
|
||||||
|
U08( instancia, source_addr_npi, str_addr_npi );
|
||||||
|
C_OCTET( instancia, source_addr, 21 );
|
||||||
|
C_OCTET( instancia, schedule_delivery_time, 17 );
|
||||||
|
C_OCTET( instancia, validity_period, 17 );
|
||||||
|
U08( instancia, registered_delivery, valueDec_08 );
|
||||||
|
U08( instancia, sm_default_msg_id, valueDec_08 );
|
||||||
|
U08( instancia, sm_length, valueDec_08 );
|
||||||
|
OCTET8( instancia, short_message, 254 );
|
|
@ -0,0 +1,11 @@
|
||||||
|
#define do_dad( inst_dad )\
|
||||||
|
U08( inst_dad->, dest_flag, test_dest_flag ); \
|
||||||
|
if( inst_dad-> dest_flag == DFID_SME_Address ){ \
|
||||||
|
U08( inst_dad-> value. sme. , dest_addr_ton, str_addr_ton ); \
|
||||||
|
U08( inst_dad-> value. sme. , dest_addr_npi, str_addr_npi ); \
|
||||||
|
C_OCTET( inst_dad-> value. sme. , destination_addr, 21 ); \
|
||||||
|
} else if( inst_dad-> dest_flag == DFID_Distribution_List_Name ){\
|
||||||
|
C_OCTET( inst_dad-> value. , dl_name, 21 ); \
|
||||||
|
} else {\
|
||||||
|
};
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
C_OCTET( instancia, service_type, 6 );
|
||||||
|
U08( instancia, source_addr_ton, str_addr_ton );
|
||||||
|
U08( instancia, source_addr_npi, str_addr_npi );
|
||||||
|
C_OCTET( instancia, source_addr, 21 );
|
||||||
|
U08( instancia, number_of_dests, valueDec_08 );
|
||||||
|
DAD( instancia, dest_addr_def, do_dad );
|
||||||
|
U08( instancia, esm_class, valueDec_08 );
|
||||||
|
U08( instancia, protocol_id, valueDec_08 );
|
||||||
|
U08( instancia, priority_flag, valueDec_08 );
|
||||||
|
C_OCTET( instancia, schedule_delivery_time, 17 );
|
||||||
|
C_OCTET( instancia, validity_period, 17 );
|
||||||
|
U08( instancia, registered_delivery, valueDec_08 );
|
||||||
|
U08( instancia, replace_if_present_flag, valueDec_08 );
|
||||||
|
U08( instancia, data_coding, valueDec_08 );
|
||||||
|
U08( instancia, sm_default_msg_id, valueDec_08 );
|
||||||
|
U08( instancia, sm_length, valueDec_08 );
|
||||||
|
OCTET8( instancia, short_message, 254 );
|
||||||
|
TLV( instancia, tlv, do_tlv_submit_multi );
|
|
@ -0,0 +1,62 @@
|
||||||
|
#define do_tlv_submit_multi( inst_tlv )\
|
||||||
|
U16( inst_tlv->, tag, str_tlv_id );\
|
||||||
|
U16( inst_tlv->, length, valueDec_16 );\
|
||||||
|
if( inst_tlv-> tag == TLVID_user_message_reference ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_source_port ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_source_addr_subunit ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_destination_port ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_dest_addr_subunit ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_sar_msg_ref_num ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_sar_total_segments ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_sar_segment_seqnum ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_more_messages_to_send ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_payload_type ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_message_payload ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1024 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_privacy_indicator ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_callback_num ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 19 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_callback_num_pres_ind ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_callback_num_atag ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 65 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_source_subaddress ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 23 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_dest_subaddress ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 23 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_user_response_code ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_display_time ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_sms_signal ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_ms_validity ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_ms_msg_wait_facilities ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_number_of_messages ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_alert_on_message_delivery ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 0 ); /* WARNING */\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_language_indicator ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_its_reply_type ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_its_session_info ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_ussd_service_op ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1 ); /* WARNING */\
|
||||||
|
} else {\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1024 ) /* Parameter forwarded */\
|
||||||
|
};
|
|
@ -0,0 +1,3 @@
|
||||||
|
C_OCTET( instancia, message_id, 65 );
|
||||||
|
U08( instancia, no_unsuccess, valueDec_08 );
|
||||||
|
UDAD( instancia, unsuccess_smes, do_udad );
|
|
@ -0,0 +1,5 @@
|
||||||
|
#define do_udad( inst_udad )\
|
||||||
|
U08( inst_udad-> , dest_addr_ton, str_addr_ton );\
|
||||||
|
U08( inst_udad-> , dest_addr_npi, str_addr_npi );\
|
||||||
|
C_OCTET( inst_udad-> , destination_addr, 21 );\
|
||||||
|
U32( inst_udad-> , error_status_code, valueDec_08 );
|
|
@ -0,0 +1,19 @@
|
||||||
|
C_OCTET( instancia, service_type, 6 );
|
||||||
|
U08( instancia, source_addr_ton, str_addr_ton );
|
||||||
|
U08( instancia, source_addr_npi, str_addr_npi );
|
||||||
|
C_OCTET( instancia, source_addr, 21 );
|
||||||
|
U08( instancia, dest_addr_ton, str_addr_ton );
|
||||||
|
U08( instancia, dest_addr_npi, str_addr_npi );
|
||||||
|
C_OCTET( instancia, destination_addr, 21 );
|
||||||
|
U08( instancia, esm_class, valueDec_08 );
|
||||||
|
U08( instancia, protocol_id, valueDec_08 );
|
||||||
|
U08( instancia, priority_flag, valueDec_08 );
|
||||||
|
C_OCTET( instancia, schedule_delivery_time, 17 );
|
||||||
|
C_OCTET( instancia, validity_period, 17 );
|
||||||
|
U08( instancia, registered_delivery, valueDec_08 );
|
||||||
|
U08( instancia, replace_if_present_flag, valueDec_08 );
|
||||||
|
U08( instancia, data_coding, valueDec_08 );
|
||||||
|
U08( instancia, sm_default_msg_id, valueDec_08 );
|
||||||
|
U08( instancia, sm_length, valueDec_08 );
|
||||||
|
OCTET8( instancia, short_message, 254 );
|
||||||
|
TLV( instancia, tlv, do_tlv_submit_sm );
|
|
@ -0,0 +1,66 @@
|
||||||
|
#define do_tlv_submit_sm( inst_tlv )\
|
||||||
|
U16( inst_tlv->, tag, str_tlv_id );\
|
||||||
|
U16( inst_tlv->, length, valueDec_16 );\
|
||||||
|
if( inst_tlv-> tag == TLVID_user_message_reference ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_source_port ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_source_addr_subunit ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_destination_port ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_dest_addr_subunit ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_sar_msg_ref_num ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_sar_total_segments ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_sar_segment_seqnum ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_more_messages_to_send ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_payload_type ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_message_payload ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1024 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_privacy_indicator ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_callback_num ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 19 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_callback_num_pres_ind ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_callback_num_atag ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 65 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_source_subaddress ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 23 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_dest_subaddress ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 23 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_user_response_code ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_display_time ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_sms_signal ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_ms_validity ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_ms_msg_wait_facilities ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_number_of_messages ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_alert_on_message_delivery ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 0 ); /* WARNING */\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_language_indicator ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_its_reply_type ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_its_session_info ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_ussd_service_op ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1 ); /* WARNING */\
|
||||||
|
} else if( inst_tlv-> tag > 0x13FF && inst_tlv-> tag < 0x4000 ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1024 )\
|
||||||
|
} else if( inst_tlv-> tag > 0x3FFF && inst_tlv-> tag < 0xFFFF ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1024 )\
|
||||||
|
} else {\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1024 ) /* Parameter forwarded */\
|
||||||
|
};
|
|
@ -0,0 +1 @@
|
||||||
|
O_C_OCTET( instancia, message_id, 65 );
|
|
@ -0,0 +1,4 @@
|
||||||
|
U16( instancia, tag , valueDec_16 );
|
||||||
|
U16( instancia, length, valueDec_16 );
|
||||||
|
UUU( instancia, value, MAX_TLV_SIZE ); /* max long TLV-octet = 1024 */
|
||||||
|
TLV( instancia, next, do_tlv );
|
|
@ -0,0 +1,102 @@
|
||||||
|
#ifdef do_tlv
|
||||||
|
#undef do_tlv
|
||||||
|
#endif
|
||||||
|
#define do_tlv( inst_tlv )\
|
||||||
|
U16( inst_tlv->, tag, str_tlv_id );\
|
||||||
|
U16( inst_tlv->, length, valueDec_16 );\
|
||||||
|
if( inst_tlv-> tag == TLVID_dest_addr_subunit ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_dest_network_type ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_dest_bearer_type ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_dest_telematics_id ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_source_addr_subunit ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_source_network_type ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_source_bearer_type ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_source_telematics_id ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_qos_time_to_live ){\
|
||||||
|
U32( inst_tlv->, value.val32, valueDec_32 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_payload_type ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_additional_status_info_text ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 256 )\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_receipted_message_id ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 65 )\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_ms_msg_wait_facilities ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_privacy_indicator ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_source_subaddress ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 23 )\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_dest_subaddress ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 23 )\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_user_message_reference ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_user_response_code ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_source_port ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_destination_port ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_sar_msg_ref_num ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_language_indicator ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_sar_total_segments ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_sar_segment_seqnum ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_SC_interface_version ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_callback_num_pres_ind ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_callback_num_atag ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 65 )\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_number_of_messages ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_callback_num ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 19 )\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_dpf_result ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_set_dpf ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_ms_availability_status ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_network_error_code ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 3 )\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_message_payload ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1024 )\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_delivery_failure_reason ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_more_messages_to_send ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_message_state ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_ussd_service_op ){\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1 )\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_display_time ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_sms_signal ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_ms_validity ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_alert_on_message_delivery ){\
|
||||||
|
/* TODO */\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 0 )\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_its_reply_type ){\
|
||||||
|
U08( inst_tlv->, value.val08, valueDec_08 );\
|
||||||
|
} else if( inst_tlv-> tag == TLVID_its_session_info ){\
|
||||||
|
U16( inst_tlv->, value.val16, valueDec_16 );\
|
||||||
|
} else if( inst_tlv-> tag >= 0x1400 && inst_tlv-> tag <= 0x3FFF ){\
|
||||||
|
/* TODO Reserved for SMSC Vendor specific optional parameters */\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1024 )\
|
||||||
|
} else if( inst_tlv-> tag >= 0x4000 && inst_tlv-> tag <= 0xFFFF ){\
|
||||||
|
/* TODO Reserved */\
|
||||||
|
OCTET16( inst_tlv->, value.octet, 1024 )\
|
||||||
|
};
|
|
@ -0,0 +1,5 @@
|
||||||
|
U08( instancia, dest_addr_ton, str_addr_ton );
|
||||||
|
U08( instancia, dest_addr_npi, str_addr_npi );
|
||||||
|
C_OCTET( instancia, destination_addr, 21 );
|
||||||
|
U32( instancia, error_status_code, valueDec_08 );
|
||||||
|
UDAD( instancia, next, do_udad );
|
|
@ -0,0 +1,11 @@
|
||||||
|
# def_list/Makefile.am #
|
||||||
|
pkgdatadir = $(includedir)/def_list
|
||||||
|
LIST_DATA_DIR = $(top_srcdir)/def_list
|
||||||
|
dist_pkgdata_DATA = \
|
||||||
|
$(LIST_DATA_DIR)/dest_flag.list \
|
||||||
|
$(LIST_DATA_DIR)/addr_npi.list \
|
||||||
|
$(LIST_DATA_DIR)/command_id.list \
|
||||||
|
$(LIST_DATA_DIR)/tlv_id.list \
|
||||||
|
$(LIST_DATA_DIR)/addr_ton.list \
|
||||||
|
$(LIST_DATA_DIR)/command_status.list \
|
||||||
|
$(LIST_DATA_DIR)/smpp34_protocol.def
|
|
@ -0,0 +1,408 @@
|
||||||
|
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
|
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||||
|
# Inc.
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
|
||||||
|
VPATH = @srcdir@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
subdir = def_list
|
||||||
|
DIST_COMMON = $(dist_pkgdata_DATA) $(srcdir)/Makefile.am \
|
||||||
|
$(srcdir)/Makefile.in
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
mkinstalldirs = $(install_sh) -d
|
||||||
|
CONFIG_HEADER = $(top_builddir)/aux_config/config.h
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
|
SOURCES =
|
||||||
|
DIST_SOURCES =
|
||||||
|
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||||
|
am__vpath_adj = case $$p in \
|
||||||
|
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
|
*) f=$$p;; \
|
||||||
|
esac;
|
||||||
|
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||||
|
am__install_max = 40
|
||||||
|
am__nobase_strip_setup = \
|
||||||
|
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||||
|
am__nobase_strip = \
|
||||||
|
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||||
|
am__nobase_list = $(am__nobase_strip_setup); \
|
||||||
|
for p in $$list; do echo "$$p $$p"; done | \
|
||||||
|
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||||
|
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||||
|
if (++n[$$2] == $(am__install_max)) \
|
||||||
|
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||||
|
END { for (dir in files) print dir, files[dir] }'
|
||||||
|
am__base_list = \
|
||||||
|
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||||
|
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||||
|
am__installdirs = "$(DESTDIR)$(pkgdatadir)"
|
||||||
|
DATA = $(dist_pkgdata_DATA)
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
|
||||||
|
# def_list/Makefile.am #
|
||||||
|
pkgdatadir = $(includedir)/def_list
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AR = @AR@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
DSYMUTIL = @DSYMUTIL@
|
||||||
|
DUMPBIN = @DUMPBIN@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
GREP = @GREP@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
LD = @LD@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LIPO = @LIPO@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
|
NM = @NM@
|
||||||
|
NMEDIT = @NMEDIT@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
OTOOL = @OTOOL@
|
||||||
|
OTOOL64 = @OTOOL64@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SED = @SED@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
abs_builddir = @abs_builddir@
|
||||||
|
abs_srcdir = @abs_srcdir@
|
||||||
|
abs_top_builddir = @abs_top_builddir@
|
||||||
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
builddir = @builddir@
|
||||||
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
lt_ECHO = @lt_ECHO@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
top_build_prefix = @top_build_prefix@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
LIST_DATA_DIR = $(top_srcdir)/def_list
|
||||||
|
dist_pkgdata_DATA = \
|
||||||
|
$(LIST_DATA_DIR)/dest_flag.list \
|
||||||
|
$(LIST_DATA_DIR)/addr_npi.list \
|
||||||
|
$(LIST_DATA_DIR)/command_id.list \
|
||||||
|
$(LIST_DATA_DIR)/tlv_id.list \
|
||||||
|
$(LIST_DATA_DIR)/addr_ton.list \
|
||||||
|
$(LIST_DATA_DIR)/command_status.list \
|
||||||
|
$(LIST_DATA_DIR)/smpp34_protocol.def
|
||||||
|
|
||||||
|
all: all-am
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||||
|
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu def_list/Makefile'; \
|
||||||
|
$(am__cd) $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --gnu def_list/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: $(am__configure_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
|
mostlyclean-libtool:
|
||||||
|
-rm -f *.lo
|
||||||
|
|
||||||
|
clean-libtool:
|
||||||
|
-rm -rf .libs _libs
|
||||||
|
install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
|
||||||
|
@$(NORMAL_INSTALL)
|
||||||
|
test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
|
||||||
|
@list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
|
||||||
|
for p in $$list; do \
|
||||||
|
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||||
|
echo "$$d$$p"; \
|
||||||
|
done | $(am__base_list) | \
|
||||||
|
while read files; do \
|
||||||
|
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \
|
||||||
|
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \
|
||||||
|
done
|
||||||
|
|
||||||
|
uninstall-dist_pkgdataDATA:
|
||||||
|
@$(NORMAL_UNINSTALL)
|
||||||
|
@list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
|
||||||
|
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||||
|
test -n "$$files" || exit 0; \
|
||||||
|
echo " ( cd '$(DESTDIR)$(pkgdatadir)' && rm -f" $$files ")"; \
|
||||||
|
cd "$(DESTDIR)$(pkgdatadir)" && rm -f $$files
|
||||||
|
tags: TAGS
|
||||||
|
TAGS:
|
||||||
|
|
||||||
|
ctags: CTAGS
|
||||||
|
CTAGS:
|
||||||
|
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
list='$(DISTFILES)'; \
|
||||||
|
dist_files=`for file in $$list; do echo $$file; done | \
|
||||||
|
sed -e "s|^$$srcdirstrip/||;t" \
|
||||||
|
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||||
|
case $$dist_files in \
|
||||||
|
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||||
|
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||||
|
sort -u` ;; \
|
||||||
|
esac; \
|
||||||
|
for file in $$dist_files; do \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test -d "$(distdir)/$$file"; then \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f "$(distdir)/$$file" \
|
||||||
|
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
check-am: all-am
|
||||||
|
check: check-am
|
||||||
|
all-am: Makefile $(DATA)
|
||||||
|
installdirs:
|
||||||
|
for dir in "$(DESTDIR)$(pkgdatadir)"; do \
|
||||||
|
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||||
|
done
|
||||||
|
install: install-am
|
||||||
|
install-exec: install-exec-am
|
||||||
|
install-data: install-data-am
|
||||||
|
uninstall: uninstall-am
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-am
|
||||||
|
install-strip:
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
`test -z '$(STRIP)' || \
|
||||||
|
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-am
|
||||||
|
|
||||||
|
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-generic
|
||||||
|
|
||||||
|
dvi: dvi-am
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-am
|
||||||
|
|
||||||
|
html-am:
|
||||||
|
|
||||||
|
info: info-am
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am: install-dist_pkgdataDATA
|
||||||
|
|
||||||
|
install-dvi: install-dvi-am
|
||||||
|
|
||||||
|
install-dvi-am:
|
||||||
|
|
||||||
|
install-exec-am:
|
||||||
|
|
||||||
|
install-html: install-html-am
|
||||||
|
|
||||||
|
install-html-am:
|
||||||
|
|
||||||
|
install-info: install-info-am
|
||||||
|
|
||||||
|
install-info-am:
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
install-pdf: install-pdf-am
|
||||||
|
|
||||||
|
install-pdf-am:
|
||||||
|
|
||||||
|
install-ps: install-ps-am
|
||||||
|
|
||||||
|
install-ps-am:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||||
|
|
||||||
|
pdf: pdf-am
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-am
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am: uninstall-dist_pkgdataDATA
|
||||||
|
|
||||||
|
.MAKE: install-am install-strip
|
||||||
|
|
||||||
|
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||||
|
distclean distclean-generic distclean-libtool distdir dvi \
|
||||||
|
dvi-am html html-am info info-am install install-am \
|
||||||
|
install-data install-data-am install-dist_pkgdataDATA \
|
||||||
|
install-dvi install-dvi-am install-exec install-exec-am \
|
||||||
|
install-html install-html-am install-info install-info-am \
|
||||||
|
install-man install-pdf install-pdf-am install-ps \
|
||||||
|
install-ps-am install-strip installcheck installcheck-am \
|
||||||
|
installdirs maintainer-clean maintainer-clean-generic \
|
||||||
|
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
||||||
|
ps ps-am uninstall uninstall-am uninstall-dist_pkgdataDATA
|
||||||
|
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
|
@ -0,0 +1,10 @@
|
||||||
|
OPERACION( NPI_Unknown )
|
||||||
|
OPERACION( NPI_ISDN_E163_E164 )
|
||||||
|
OPERACION( NPI_Data_X121 )
|
||||||
|
OPERACION( NPI_Telex_F69 )
|
||||||
|
OPERACION( NPI_Land_Mobile_E212 )
|
||||||
|
OPERACION( NPI_National )
|
||||||
|
OPERACION( NPI_Private )
|
||||||
|
OPERACION( NPI_ERMES )
|
||||||
|
OPERACION( NPI_Internet_IP )
|
||||||
|
OPERACION( NPI_WAP_Client_Id )
|
|
@ -0,0 +1,7 @@
|
||||||
|
OPERACION( TON_Unknown )
|
||||||
|
OPERACION( TON_International )
|
||||||
|
OPERACION( TON_National )
|
||||||
|
OPERACION( TON_Network_Specific )
|
||||||
|
OPERACION( TON_Subscriber_Number )
|
||||||
|
OPERACION( TON_Alphanumeric )
|
||||||
|
OPERACION( TON_Abbreviated )
|
|
@ -0,0 +1,27 @@
|
||||||
|
OPERACION( GENERIC_NACK )
|
||||||
|
OPERACION( BIND_RECEIVER )
|
||||||
|
OPERACION( BIND_RECEIVER_RESP )
|
||||||
|
OPERACION( BIND_TRANSMITTER )
|
||||||
|
OPERACION( BIND_TRANSMITTER_RESP )
|
||||||
|
OPERACION( QUERY_SM )
|
||||||
|
OPERACION( QUERY_SM_RESP )
|
||||||
|
OPERACION( SUBMIT_SM )
|
||||||
|
OPERACION( SUBMIT_SM_RESP )
|
||||||
|
OPERACION( DELIVER_SM )
|
||||||
|
OPERACION( DELIVER_SM_RESP )
|
||||||
|
OPERACION( UNBIND )
|
||||||
|
OPERACION( UNBIND_RESP )
|
||||||
|
OPERACION( REPLACE_SM )
|
||||||
|
OPERACION( REPLACE_SM_RESP )
|
||||||
|
OPERACION( CANCEL_SM )
|
||||||
|
OPERACION( CANCEL_SM_RESP )
|
||||||
|
OPERACION( BIND_TRANSCEIVER )
|
||||||
|
OPERACION( BIND_TRANSCEIVER_RESP )
|
||||||
|
OPERACION( OUTBIND )
|
||||||
|
OPERACION( ENQUIRE_LINK )
|
||||||
|
OPERACION( ENQUIRE_LINK_RESP )
|
||||||
|
OPERACION( SUBMIT_MULTI )
|
||||||
|
OPERACION( SUBMIT_MULTI_RESP )
|
||||||
|
OPERACION( ALERT_NOTIFICATION )
|
||||||
|
OPERACION( DATA_SM )
|
||||||
|
OPERACION( DATA_SM_RESP )
|
|
@ -0,0 +1,48 @@
|
||||||
|
OPERACION( ESME_ROK )
|
||||||
|
OPERACION( ESME_RINVMSGLEN )
|
||||||
|
OPERACION( ESME_RINVCMDLEN )
|
||||||
|
OPERACION( ESME_RINVCMDID )
|
||||||
|
OPERACION( ESME_RINVBNDSTS )
|
||||||
|
OPERACION( ESME_RALYBND )
|
||||||
|
OPERACION( ESME_RINVPRTFLG )
|
||||||
|
OPERACION( ESME_RINVREGDLVFLG )
|
||||||
|
OPERACION( ESME_RSYSERR )
|
||||||
|
OPERACION( ESME_RINVSRCADR )
|
||||||
|
OPERACION( ESME_RINVDSTADR )
|
||||||
|
OPERACION( ESME_RINVMSGID )
|
||||||
|
OPERACION( ESME_RBINDFAIL )
|
||||||
|
OPERACION( ESME_RINVPASWD )
|
||||||
|
OPERACION( ESME_RINVSYSID )
|
||||||
|
OPERACION( ESME_RCANCELFAIL )
|
||||||
|
OPERACION( ESME_RREPLACEFAIL )
|
||||||
|
OPERACION( ESME_RMSGQFUL )
|
||||||
|
OPERACION( ESME_RINVSERTYP )
|
||||||
|
OPERACION( ESME_RINVNUMDESTS )
|
||||||
|
OPERACION( ESME_RINVDLNAME )
|
||||||
|
OPERACION( ESME_RINVDESTFLAG )
|
||||||
|
OPERACION( ESME_RINVSUBREP )
|
||||||
|
OPERACION( ESME_RINVESMCLASS )
|
||||||
|
OPERACION( ESME_RCNTSUBDL )
|
||||||
|
OPERACION( ESME_RSUBMITFAIL )
|
||||||
|
OPERACION( ESME_RINVSRCTON )
|
||||||
|
OPERACION( ESME_RINVSRCNPI )
|
||||||
|
OPERACION( ESME_RINVDSTTON )
|
||||||
|
OPERACION( ESME_RINVDSTNPI )
|
||||||
|
OPERACION( ESME_RINVSYSTYP )
|
||||||
|
OPERACION( ESME_RINVREPFLAG )
|
||||||
|
OPERACION( ESME_RINVNUMMSGS )
|
||||||
|
OPERACION( ESME_RTHROTTLED )
|
||||||
|
OPERACION( ESME_RINVSCHED )
|
||||||
|
OPERACION( ESME_RINVEXPIRY )
|
||||||
|
OPERACION( ESME_RINVDFTMSGID )
|
||||||
|
OPERACION( ESME_RX_T_APPN )
|
||||||
|
OPERACION( ESME_RX_P_APPN )
|
||||||
|
OPERACION( ESME_RX_R_APPN )
|
||||||
|
OPERACION( ESME_RQUERYFAIL )
|
||||||
|
OPERACION( ESME_RINVOPTPARSTREAM )
|
||||||
|
OPERACION( ESME_ROPTPARNOTALLWD )
|
||||||
|
OPERACION( ESME_RINVPARLEN )
|
||||||
|
OPERACION( ESME_RMISSINGOPTPARAM )
|
||||||
|
OPERACION( ESME_RINVOPTPARAMVAL )
|
||||||
|
OPERACION( ESME_RDELIVERYFAILURE )
|
||||||
|
OPERACION( ESME_RUNKNOWNERR )
|
|
@ -0,0 +1,2 @@
|
||||||
|
OPERACION( DFID_SME_Address )
|
||||||
|
OPERACION( DFID_Distribution_List_Name )
|
|
@ -0,0 +1,107 @@
|
||||||
|
if( type == BIND_TRANSMITTER ){
|
||||||
|
bind_transmitter_t *t1 = (bind_transmitter_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/bind_transmitter.frame"
|
||||||
|
} else if( type == BIND_TRANSMITTER_RESP ){
|
||||||
|
bind_transmitter_resp_t *t1 = (bind_transmitter_resp_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/bind_transmitter_resp.frame"
|
||||||
|
} else if( type == BIND_RECEIVER ){
|
||||||
|
bind_receiver_t *t1 = (bind_receiver_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/bind_receiver.frame"
|
||||||
|
} else if( type == BIND_RECEIVER_RESP ){
|
||||||
|
bind_receiver_resp_t *t1 = (bind_receiver_resp_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/bind_receiver_resp.frame"
|
||||||
|
} else if( type == BIND_TRANSCEIVER ){
|
||||||
|
bind_transceiver_t *t1 = (bind_transceiver_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/bind_transceiver.frame"
|
||||||
|
} else if( type == BIND_TRANSCEIVER_RESP ){
|
||||||
|
bind_transceiver_resp_t *t1 = (bind_transceiver_resp_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/bind_transceiver_resp.frame"
|
||||||
|
} else if( type == OUTBIND ){
|
||||||
|
outbind_t *t1 = (outbind_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/outbind.frame"
|
||||||
|
} else if( type == UNBIND ){
|
||||||
|
unbind_t *t1 = (unbind_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
} else if( type == UNBIND_RESP ){
|
||||||
|
unbind_resp_t *t1 = (unbind_resp_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
} else if( type == GENERIC_NACK ){
|
||||||
|
generic_nack_t *t1 = (generic_nack_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
} else if( type == SUBMIT_SM ){
|
||||||
|
submit_sm_t *t1 = (submit_sm_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/submit_sm.frame"
|
||||||
|
} else if( type == SUBMIT_SM_RESP ){
|
||||||
|
submit_sm_resp_t *t1 = (submit_sm_resp_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/submit_sm_resp.frame"
|
||||||
|
} else if( type == SUBMIT_MULTI ){
|
||||||
|
submit_multi_t *t1 = (submit_multi_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/submit_multi.frame"
|
||||||
|
} else if( type == SUBMIT_MULTI_RESP ){
|
||||||
|
submit_multi_resp_t *t1 = (submit_multi_resp_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/submit_multi_resp.frame"
|
||||||
|
} else if( type == DELIVER_SM ){
|
||||||
|
deliver_sm_t *t1 = (deliver_sm_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/deliver_sm.frame"
|
||||||
|
} else if( type == DELIVER_SM_RESP ){
|
||||||
|
deliver_sm_resp_t *t1 = (deliver_sm_resp_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/deliver_sm_resp.frame"
|
||||||
|
} else if( type == DATA_SM ){
|
||||||
|
data_sm_t *t1 = (data_sm_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/data_sm.frame"
|
||||||
|
} else if( type == DATA_SM_RESP ){
|
||||||
|
data_sm_resp_t *t1 = (data_sm_resp_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/data_sm_resp.frame"
|
||||||
|
} else if( type == QUERY_SM ){
|
||||||
|
query_sm_t *t1 = (query_sm_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/query_sm.frame"
|
||||||
|
} else if( type == QUERY_SM_RESP ){
|
||||||
|
query_sm_resp_t *t1 = (query_sm_resp_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/query_sm_resp.frame"
|
||||||
|
} else if( type == CANCEL_SM ){
|
||||||
|
cancel_sm_t *t1 = (cancel_sm_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/cancel_sm.frame"
|
||||||
|
} else if( type == CANCEL_SM_RESP ){
|
||||||
|
cancel_sm_resp_t *t1 = (cancel_sm_resp_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
} else if( type == REPLACE_SM ){
|
||||||
|
replace_sm_t *t1 = (replace_sm_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/replace_sm.frame"
|
||||||
|
} else if( type == REPLACE_SM_RESP ){
|
||||||
|
replace_sm_resp_t *t1 = (replace_sm_resp_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
} else if( type == ENQUIRE_LINK ){
|
||||||
|
enquire_link_t *t1 = (enquire_link_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
} else if( type == ENQUIRE_LINK_RESP ){
|
||||||
|
enquire_link_resp_t *t1 = (enquire_link_resp_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
} else if( type == ALERT_NOTIFICATION ){
|
||||||
|
alert_notification_t *t1 = (alert_notification_t*)tt;
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/alert_notification.frame"
|
||||||
|
} else {
|
||||||
|
PUTLOG("[%s:%08X(%s)]", type, type, "Invalid command_id");
|
||||||
|
return( -1 );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
OPERACION( TLVID_dest_addr_subunit )
|
||||||
|
OPERACION( TLVID_dest_network_type )
|
||||||
|
OPERACION( TLVID_dest_bearer_type )
|
||||||
|
OPERACION( TLVID_dest_telematics_id )
|
||||||
|
OPERACION( TLVID_source_addr_subunit )
|
||||||
|
OPERACION( TLVID_source_network_type )
|
||||||
|
OPERACION( TLVID_source_bearer_type )
|
||||||
|
OPERACION( TLVID_source_telematics_id )
|
||||||
|
OPERACION( TLVID_qos_time_to_live )
|
||||||
|
OPERACION( TLVID_payload_type )
|
||||||
|
OPERACION( TLVID_additional_status_info_text )
|
||||||
|
OPERACION( TLVID_receipted_message_id )
|
||||||
|
OPERACION( TLVID_ms_msg_wait_facilities )
|
||||||
|
OPERACION( TLVID_privacy_indicator )
|
||||||
|
OPERACION( TLVID_source_subaddress )
|
||||||
|
OPERACION( TLVID_dest_subaddress )
|
||||||
|
OPERACION( TLVID_user_message_reference )
|
||||||
|
OPERACION( TLVID_user_response_code )
|
||||||
|
OPERACION( TLVID_source_port )
|
||||||
|
OPERACION( TLVID_destination_port )
|
||||||
|
OPERACION( TLVID_sar_msg_ref_num )
|
||||||
|
OPERACION( TLVID_language_indicator )
|
||||||
|
OPERACION( TLVID_sar_total_segments )
|
||||||
|
OPERACION( TLVID_sar_segment_seqnum )
|
||||||
|
OPERACION( TLVID_sc_interface_version )
|
||||||
|
OPERACION( TLVID_callback_num_pres_ind )
|
||||||
|
OPERACION( TLVID_callback_num_atag )
|
||||||
|
OPERACION( TLVID_number_of_messages )
|
||||||
|
OPERACION( TLVID_callback_num )
|
||||||
|
OPERACION( TLVID_dpf_result )
|
||||||
|
OPERACION( TLVID_set_dpf )
|
||||||
|
OPERACION( TLVID_ms_availability_status )
|
||||||
|
OPERACION( TLVID_network_error_code )
|
||||||
|
OPERACION( TLVID_message_payload )
|
||||||
|
OPERACION( TLVID_delivery_failure_reason )
|
||||||
|
OPERACION( TLVID_more_messages_to_send )
|
||||||
|
OPERACION( TLVID_message_state )
|
||||||
|
OPERACION( TLVID_ussd_service_op )
|
||||||
|
OPERACION( TLVID_display_time )
|
||||||
|
OPERACION( TLVID_sms_signal )
|
||||||
|
OPERACION( TLVID_ms_validity )
|
||||||
|
OPERACION( TLVID_alert_on_message_delivery )
|
||||||
|
OPERACION( TLVID_its_reply_type )
|
||||||
|
OPERACION( TLVID_its_session_info )
|
|
@ -0,0 +1,28 @@
|
||||||
|
|
||||||
|
# src/Makefile.am #
|
||||||
|
lib_LTLIBRARIES = libsmpp34.la
|
||||||
|
|
||||||
|
LIBRARY_SOURCE_DIR = $(top_srcdir)/src
|
||||||
|
libsmpp34_la_SOURCES = \
|
||||||
|
$(LIBRARY_SOURCE_DIR)/smpp34.h \
|
||||||
|
$(LIBRARY_SOURCE_DIR)/smpp34_dumpBuf.c \
|
||||||
|
$(LIBRARY_SOURCE_DIR)/smpp34_dumpPdu.c \
|
||||||
|
$(LIBRARY_SOURCE_DIR)/smpp34_pack.c \
|
||||||
|
$(LIBRARY_SOURCE_DIR)/smpp34_unpack.c \
|
||||||
|
$(LIBRARY_SOURCE_DIR)/smpp34_structs.c \
|
||||||
|
$(LIBRARY_SOURCE_DIR)/smpp34_structs.h \
|
||||||
|
$(LIBRARY_SOURCE_DIR)/smpp34_params.c \
|
||||||
|
$(LIBRARY_SOURCE_DIR)/smpp34_params.h
|
||||||
|
|
||||||
|
include_HEADERS = \
|
||||||
|
$(LIBRARY_SOURCE_DIR)/smpp34.h \
|
||||||
|
$(LIBRARY_SOURCE_DIR)/smpp34_structs.h \
|
||||||
|
$(LIBRARY_SOURCE_DIR)/smpp34_params.h
|
||||||
|
|
||||||
|
libsmpp34_la_CFLAGS = @CFLAGS@ -Wall
|
||||||
|
libsmpp34_la_CFLAGS += -D_REENTRANT -DBSD_COMP -D_POSIX_PTHREAD_SEMANTICS
|
||||||
|
libsmpp34_la_INCLUDES = -I. -I..
|
||||||
|
libsmpp34_la_LDFLAGS = @LDFLAGS@ -version-info 0:1:0
|
||||||
|
libsmpp34_la_LDFLAGS += -lrt -lpthread
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,207 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006 Raul Tremsal
|
||||||
|
* File : smpp34.h
|
||||||
|
* Author: Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
*
|
||||||
|
* This file is part of libsmpp34 (c-open-smpp3.4 library).
|
||||||
|
*
|
||||||
|
* The libsmpp34 library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifndef _SMPP_H_
|
||||||
|
#define _SMPP_H_
|
||||||
|
|
||||||
|
/* SMPP Version ***************************************************************/
|
||||||
|
#define SMPP_VERSION 0x34
|
||||||
|
/* Command Id *****************************************************************/
|
||||||
|
#define GENERIC_NACK 0x80000000
|
||||||
|
#define BIND_RECEIVER 0x00000001
|
||||||
|
#define BIND_RECEIVER_RESP 0x80000001
|
||||||
|
#define BIND_TRANSMITTER 0x00000002
|
||||||
|
#define BIND_TRANSMITTER_RESP 0x80000002
|
||||||
|
#define QUERY_SM 0x00000003
|
||||||
|
#define QUERY_SM_RESP 0x80000003
|
||||||
|
#define SUBMIT_SM 0x00000004
|
||||||
|
#define SUBMIT_SM_RESP 0x80000004
|
||||||
|
#define DELIVER_SM 0x00000005
|
||||||
|
#define DELIVER_SM_RESP 0x80000005
|
||||||
|
#define UNBIND 0x00000006
|
||||||
|
#define UNBIND_RESP 0x80000006
|
||||||
|
#define REPLACE_SM 0x00000007
|
||||||
|
#define REPLACE_SM_RESP 0x80000007
|
||||||
|
#define CANCEL_SM 0x00000008
|
||||||
|
#define CANCEL_SM_RESP 0x80000008
|
||||||
|
#define BIND_TRANSCEIVER 0x00000009
|
||||||
|
#define BIND_TRANSCEIVER_RESP 0x80000009
|
||||||
|
/* Reserved 0x0000000A 0x8000000A */
|
||||||
|
#define OUTBIND 0x0000000B
|
||||||
|
/* Reserved 0x0000000C - 0x00000014 0x8000000B - 0x80000014 */
|
||||||
|
#define ENQUIRE_LINK 0x00000015
|
||||||
|
#define ENQUIRE_LINK_RESP 0x80000015
|
||||||
|
/* Reserved 0x00000016 - 0x00000020 0x80000016 - 0x80000020*/
|
||||||
|
#define SUBMIT_MULTI 0x00000021
|
||||||
|
#define SUBMIT_MULTI_RESP 0x80000021
|
||||||
|
/* Reserved 0x00000022 - 0x000000FF 0x80000022 - 0x800000FF */
|
||||||
|
/* Reserved 0x00000100 */
|
||||||
|
#define Reserved 0x80000100
|
||||||
|
/* Reserved 0x00000101 0x80000101 */
|
||||||
|
#define ALERT_NOTIFICATION 0x00000102
|
||||||
|
/* Reserved 0x80000102 */
|
||||||
|
#define DATA_SM 0x00000103
|
||||||
|
#define DATA_SM_RESP 0x80000103
|
||||||
|
/* Reserved for SMPP extension 0x00000104 - 0x0000FFFF 0x80000104 - 0x8000FFFF */
|
||||||
|
/* Reserved 0x00010000 - 0x000101FF 0x80010000 - 0x800101FF */
|
||||||
|
/* Reserved for SMSC Vendor 0x00010200 - 0x000102FF 0x80010200 - 0x800102FF */
|
||||||
|
/* Reserved 0x00010300 - 0xFFFFFFFF*/
|
||||||
|
|
||||||
|
|
||||||
|
/* Command status *************************************************************/
|
||||||
|
#define ESME_ROK 0x00000000 /* No Error */
|
||||||
|
#define ESME_RINVMSGLEN 0x00000001 /* Message Length is invalid */
|
||||||
|
#define ESME_RINVCMDLEN 0x00000002 /* Command Length is invalid */
|
||||||
|
#define ESME_RINVCMDID 0x00000003 /* Invalid Command ID */
|
||||||
|
#define ESME_RINVBNDSTS 0x00000004 /* Incorrect BIND Status for given command */
|
||||||
|
#define ESME_RALYBND 0x00000005 /* ESME Already in Bound State */
|
||||||
|
#define ESME_RINVPRTFLG 0x00000006 /* Invalid Priority Flag */
|
||||||
|
#define ESME_RINVREGDLVFLG 0x00000007 /* Invalid Registered Delivery Flag */
|
||||||
|
#define ESME_RSYSERR 0x00000008 /* System Error */
|
||||||
|
/* Reserved 0x00000009 Reserved */
|
||||||
|
#define ESME_RINVSRCADR 0x0000000A /* Invalid Source Address */
|
||||||
|
#define ESME_RINVDSTADR 0x0000000B /* Invalid Dest Addr */
|
||||||
|
#define ESME_RINVMSGID 0x0000000C /* Message ID is invalid */
|
||||||
|
#define ESME_RBINDFAIL 0x0000000D /* Bind Failed */
|
||||||
|
#define ESME_RINVPASWD 0x0000000E /* Invalid Password */
|
||||||
|
#define ESME_RINVSYSID 0x0000000F /* Invalid System ID */
|
||||||
|
/* Reserved 0x00000010 Reserved */
|
||||||
|
#define ESME_RCANCELFAIL 0x00000011 /* Cancel SM Failed */
|
||||||
|
/* Reserved 0x00000012 Reserved */
|
||||||
|
#define ESME_RREPLACEFAIL 0x00000013 /* Replace SM Failed*/
|
||||||
|
#define ESME_RMSGQFUL 0x00000014 /* Message Queue Full */
|
||||||
|
#define ESME_RINVSERTYP 0x00000015 /* Invalid Service Type */
|
||||||
|
/* Reserved 0x00000016- 0x00000032 Reserved */
|
||||||
|
#define ESME_RINVNUMDESTS 0x00000033 /* Invalid number of destinations */
|
||||||
|
#define ESME_RINVDLNAME 0x00000034 /* Invalid Distribution List name */
|
||||||
|
/* Reserved 0x00000035- 0x0000003F Reserved */
|
||||||
|
#define ESME_RINVDESTFLAG 0x00000040 /* Destination flag is invalid (submit_multi) */
|
||||||
|
/* Reserved 0x00000041 Reserved */
|
||||||
|
#define ESME_RINVSUBREP 0x00000042 /* Invalid submit with replace request (i.e. submit_sm with replace_if_present_flag set) */
|
||||||
|
#define ESME_RINVESMCLASS 0x00000043 /* Invalid esm_class field data */
|
||||||
|
#define ESME_RCNTSUBDL 0x00000044 /* Cannot Submit to Distribution List */
|
||||||
|
#define ESME_RSUBMITFAIL 0x00000045 /* submit_sm or submit_multi failed */
|
||||||
|
/* Reserved 0x00000046- 0x00000047 Reserved */
|
||||||
|
#define ESME_RINVSRCTON 0x00000048 /* Invalid Source address TON */
|
||||||
|
#define ESME_RINVSRCNPI 0x00000049 /* Invalid Source address NPI */
|
||||||
|
#define ESME_RINVDSTTON 0x00000050 /* Invalid Destination address TON */
|
||||||
|
#define ESME_RINVDSTNPI 0x00000051 /* Invalid Destination address NPI */
|
||||||
|
/* Reserved 0x00000052 Reserved */
|
||||||
|
#define ESME_RINVSYSTYP 0x00000053 /* Invalid system_type field */
|
||||||
|
#define ESME_RINVREPFLAG 0x00000054 /* Invalid replace_if_present flag */
|
||||||
|
#define ESME_RINVNUMMSGS 0x00000055 /* Invalid number of messages */
|
||||||
|
/* Reserved 0x00000056- 0x00000057 Reserved */
|
||||||
|
#define ESME_RTHROTTLED 0x00000058 /* Throttling error (ESME has exceeded allowed message limits) */
|
||||||
|
/* Reserved 0x00000059- 0x00000060 Reserved*/
|
||||||
|
#define ESME_RINVSCHED 0x00000061 /* Invalid Scheduled Delivery Time */
|
||||||
|
#define ESME_RINVEXPIRY 0x00000062 /* Invalid message validity period (Expiry time) */
|
||||||
|
#define ESME_RINVDFTMSGID 0x00000063 /* Predefined Message Invalid or Not Found */
|
||||||
|
#define ESME_RX_T_APPN 0x00000064 /* ESME Receiver Temporary App Error Code */
|
||||||
|
#define ESME_RX_P_APPN 0x00000065 /* ESME Receiver Permanent App Error Code */
|
||||||
|
#define ESME_RX_R_APPN 0x00000066 /* ESME Receiver Reject Message Error Code */
|
||||||
|
#define ESME_RQUERYFAIL 0x00000067 /* query_sm request failed */
|
||||||
|
/* Reserved 0x00000068 - 0x000000BF Reserved */
|
||||||
|
#define ESME_RINVOPTPARSTREAM 0x000000C0 /* Error in the optional part of the PDU Body. */
|
||||||
|
#define ESME_ROPTPARNOTALLWD 0x000000C1 /* Optional Parameter not allowed */
|
||||||
|
#define ESME_RINVPARLEN 0x000000C2 /* Invalid Parameter Length. */
|
||||||
|
#define ESME_RMISSINGOPTPARAM 0x000000C3 /* Expected Optional Parameter missing */
|
||||||
|
#define ESME_RINVOPTPARAMVAL 0x000000C4 /* Invalid Optional Parameter Value */
|
||||||
|
/* Reserved 0x000000C5 - 0x000000FD Reserved */
|
||||||
|
#define ESME_RDELIVERYFAILURE 0x000000FE /* Delivery Failure (used for data_sm_resp) */
|
||||||
|
#define ESME_RUNKNOWNERR 0x000000FF /* Unknown Error */
|
||||||
|
/* Reserved for SMPP extension 0x00000100- 0x000003FF Reserved for SMPP extension */
|
||||||
|
/* Reserved for SMSC vendor specific errors 0x00000400- 0x000004FF Reserved for SMSC vendor specific errors */
|
||||||
|
/* Reserved 0x00000500- 0xFFFFFFFF Reserved */
|
||||||
|
|
||||||
|
/* ADDR_TON Values ************************************************************/
|
||||||
|
#define TON_Unknown 0
|
||||||
|
#define TON_International 1
|
||||||
|
#define TON_National 2
|
||||||
|
#define TON_Network_Specific 3
|
||||||
|
#define TON_Subscriber_Number 4
|
||||||
|
#define TON_Alphanumeric 5
|
||||||
|
#define TON_Abbreviated 6
|
||||||
|
|
||||||
|
/* ADDR_NPI Values ************************************************************/
|
||||||
|
#define NPI_Unknown 0
|
||||||
|
#define NPI_ISDN_E163_E164 1
|
||||||
|
#define NPI_Data_X121 3
|
||||||
|
#define NPI_Telex_F69 4
|
||||||
|
#define NPI_Land_Mobile_E212 6
|
||||||
|
#define NPI_National 8
|
||||||
|
#define NPI_Private 9
|
||||||
|
#define NPI_ERMES 10
|
||||||
|
#define NPI_Internet_IP 14
|
||||||
|
#define NPI_WAP_Client_Id 18
|
||||||
|
|
||||||
|
|
||||||
|
/* Flag which will identify whether destination address is a DL or SME Addr ***/
|
||||||
|
#define DFID_SME_Address 1
|
||||||
|
#define DFID_Distribution_List_Name 2
|
||||||
|
|
||||||
|
/* SMPP Optional Parameter Tag definitions ************************************/
|
||||||
|
#define TLVID_dest_addr_subunit 0x0005 /* GSM */
|
||||||
|
#define TLVID_dest_network_type 0x0006 /* Generic */
|
||||||
|
#define TLVID_dest_bearer_type 0x0007 /* Generic */
|
||||||
|
#define TLVID_dest_telematics_id 0x0008 /* GSM */
|
||||||
|
#define TLVID_source_addr_subunit 0x000D /* GSM */
|
||||||
|
#define TLVID_source_network_type 0x000E /* Generic */
|
||||||
|
#define TLVID_source_bearer_type 0x000F /* Generic */
|
||||||
|
#define TLVID_source_telematics_id 0x0010 /* GSM */
|
||||||
|
#define TLVID_qos_time_to_live 0x0017 /* Generic */
|
||||||
|
#define TLVID_payload_type 0x0019 /* Generic */
|
||||||
|
#define TLVID_additional_status_info_text 0x001D /* Generic */
|
||||||
|
#define TLVID_receipted_message_id 0x001E /* Generic */
|
||||||
|
#define TLVID_ms_msg_wait_facilities 0x0030 /* GSM */
|
||||||
|
#define TLVID_privacy_indicator 0x0201 /* CDMA, TDMA */
|
||||||
|
#define TLVID_source_subaddress 0x0202 /* CDMA, TDMA */
|
||||||
|
#define TLVID_dest_subaddress 0x0203 /* CDMA, TDMA */
|
||||||
|
#define TLVID_user_message_reference 0x0204 /* Generic */
|
||||||
|
#define TLVID_user_response_code 0x0205 /* CDMA, TDMA */
|
||||||
|
#define TLVID_source_port 0x020A /* Generic */
|
||||||
|
#define TLVID_destination_port 0x020B /* Generic */
|
||||||
|
#define TLVID_sar_msg_ref_num 0x020C /* Generic */
|
||||||
|
#define TLVID_language_indicator 0x020D /* CDMA, TDMA */
|
||||||
|
#define TLVID_sar_total_segments 0x020E /* Generic */
|
||||||
|
#define TLVID_sar_segment_seqnum 0x020F /* Generic */
|
||||||
|
#define TLVID_sc_interface_version 0x0210 /* Generic */
|
||||||
|
#define TLVID_callback_num_pres_ind 0x0302 /* TDMA */
|
||||||
|
#define TLVID_callback_num_atag 0x0303 /* TDMA */
|
||||||
|
#define TLVID_number_of_messages 0x0304 /* CDMA */
|
||||||
|
#define TLVID_callback_num 0x0381 /* CDMA, TDMA, GSM, iDEN */
|
||||||
|
#define TLVID_dpf_result 0x0420 /* Generic */
|
||||||
|
#define TLVID_set_dpf 0x0421 /* Generic */
|
||||||
|
#define TLVID_ms_availability_status 0x0422 /* Generic */
|
||||||
|
#define TLVID_network_error_code 0x0423 /* Generic */
|
||||||
|
#define TLVID_message_payload 0x0424 /* Generic */
|
||||||
|
#define TLVID_delivery_failure_reason 0x0425 /* Generic */
|
||||||
|
#define TLVID_more_messages_to_send 0x0426 /* GSM */
|
||||||
|
#define TLVID_message_state 0x0427 /* Generic */
|
||||||
|
#define TLVID_ussd_service_op 0x0501 /* GSM (USSD) */
|
||||||
|
#define TLVID_display_time 0x1201 /* CDMA, TDMA */
|
||||||
|
#define TLVID_sms_signal 0x1203 /* TDMA */
|
||||||
|
#define TLVID_ms_validity 0x1204 /* CDMA, TDMA */
|
||||||
|
#define TLVID_alert_on_message_delivery 0x130C /* CDMA */
|
||||||
|
#define TLVID_its_reply_type 0x1380 /* CDMA */
|
||||||
|
#define TLVID_its_session_info 0x1383 /* CDMA */
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,117 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006 Raul Tremsal
|
||||||
|
* File : smpp34_dumpBuf.c
|
||||||
|
* Author: Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
*
|
||||||
|
* This file is part of libsmpp34 (c-open-smpp3.4 library).
|
||||||
|
*
|
||||||
|
* The libsmpp34 library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <malloc.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "smpp34.h"
|
||||||
|
#include "smpp34_structs.h"
|
||||||
|
#include "smpp34_params.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* GLOBALS ********************************************************************/
|
||||||
|
/* EXTERN *********************************************************************/
|
||||||
|
extern int smpp34_errno;
|
||||||
|
extern char smpp34_strerror[2048];
|
||||||
|
extern char *ptrerror;
|
||||||
|
|
||||||
|
/* FUNCTIONS ******************************************************************/
|
||||||
|
int
|
||||||
|
smpp34_dumpBuf(uint8_t *dest, int destL, uint8_t *src, int srcL)
|
||||||
|
{
|
||||||
|
|
||||||
|
int i;
|
||||||
|
int j;
|
||||||
|
int size;
|
||||||
|
uint8_t ind = 3;
|
||||||
|
uint8_t *buffer = NULL;
|
||||||
|
int lefterror = 0;
|
||||||
|
|
||||||
|
size = srcL;
|
||||||
|
buffer = src;
|
||||||
|
|
||||||
|
memset(smpp34_strerror, 0, sizeof(smpp34_strerror));
|
||||||
|
ptrerror = smpp34_strerror;
|
||||||
|
lefterror = sizeof(smpp34_strerror);
|
||||||
|
|
||||||
|
/* dump buffer character by character until size is reached */
|
||||||
|
for(i = 0; i < size; i++){
|
||||||
|
switch( i % 16 ) {
|
||||||
|
case 0:
|
||||||
|
dest += sprintf((char*)dest, "%*c%02X ", ind, ' ', (uint8_t)buffer[i]);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 7:
|
||||||
|
dest += sprintf((char*)dest, "%02X ", (uint8_t)buffer[i]);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 15:
|
||||||
|
dest += sprintf((char*)dest, "%02X ", (uint8_t)buffer[i]);
|
||||||
|
for(j = (i - 15); j <= i; j++) {
|
||||||
|
if ( (buffer[j] < ' ') || (buffer[j] > '~') )
|
||||||
|
dest += sprintf((char*)dest, ".");
|
||||||
|
else
|
||||||
|
dest += sprintf((char*)dest, "%c", buffer[j]);
|
||||||
|
if ( (j % 16) == 7 )
|
||||||
|
dest += sprintf((char*)dest, " ");
|
||||||
|
}
|
||||||
|
dest += sprintf((char*)dest, "\n");
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
dest += sprintf((char*)dest, "%02X ", (uint8_t)buffer[i]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/* if the line is not completed, we have to fill it */
|
||||||
|
if ( (size % 16) != 0 ) {
|
||||||
|
for (i = (size % 16); i < 16; i++) {
|
||||||
|
dest += sprintf((char*)dest, " ");
|
||||||
|
if ( (i % 16) == 7 )
|
||||||
|
dest += sprintf((char*)dest, " ");
|
||||||
|
}
|
||||||
|
dest += sprintf((char*)dest, " ");
|
||||||
|
for (j = size - (size % 16); j < size; j++) {
|
||||||
|
/* check if character is printable */
|
||||||
|
if ( (buffer[j] < ' ') || (buffer[j] > '~') )
|
||||||
|
dest += sprintf((char*)dest, ".");
|
||||||
|
else
|
||||||
|
dest += sprintf((char*)dest, "%c", (char) buffer[j]);
|
||||||
|
if ( (j % 16) == 7 )
|
||||||
|
dest += sprintf((char*)dest, " ");
|
||||||
|
}
|
||||||
|
dest += sprintf((char*)dest, "\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
*dest = '\0';
|
||||||
|
return( 0 );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,245 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006 Raul Tremsal
|
||||||
|
* File : smpp34_dumpPdu.c
|
||||||
|
* Author: Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
*
|
||||||
|
* This file is part of libsmpp34 (c-open-smpp3.4 library).
|
||||||
|
*
|
||||||
|
* The libsmpp34 library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <malloc.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "smpp34.h"
|
||||||
|
#include "smpp34_structs.h"
|
||||||
|
#include "smpp34_params.h"
|
||||||
|
|
||||||
|
/* GLOBALS ********************************************************************/
|
||||||
|
/* EXTERN *********************************************************************/
|
||||||
|
extern int smpp34_errno;
|
||||||
|
extern char smpp34_strerror[2048];
|
||||||
|
extern char *ptrerror;
|
||||||
|
|
||||||
|
/* FUNCTIONS ******************************************************************/
|
||||||
|
int
|
||||||
|
smpp34_dumpPdu(uint32_t type, uint8_t *dest, int size_dest, void* tt)
|
||||||
|
{
|
||||||
|
|
||||||
|
char dummy_b[SMALL_BUFF];
|
||||||
|
int left = size_dest;
|
||||||
|
int lenval = 0;
|
||||||
|
uint8_t l_dest[512];
|
||||||
|
int lefterror = 0;
|
||||||
|
|
||||||
|
memset(smpp34_strerror, 0, sizeof(smpp34_strerror));
|
||||||
|
ptrerror = smpp34_strerror;
|
||||||
|
lefterror = sizeof(smpp34_strerror);
|
||||||
|
memset(l_dest, 0, sizeof(l_dest));
|
||||||
|
|
||||||
|
|
||||||
|
#define instancia t1->
|
||||||
|
|
||||||
|
#define U32( inst, par, _str ){\
|
||||||
|
_str(inst par, dummy_b);\
|
||||||
|
if( strcmp( dummy_b, "" ) == 0 ){\
|
||||||
|
PUTLOG("[%s:%08X(%s)]", par, inst par, "Value is invalid");\
|
||||||
|
} else {\
|
||||||
|
PUTLOG("[%s:%08X(%s)]", par, inst par, "OK");\
|
||||||
|
};\
|
||||||
|
lenval = snprintf((char*)l_dest, sizeof(l_dest), "%-30s[%08X] - [%s]\n",\
|
||||||
|
#par,inst par,dummy_b);\
|
||||||
|
if( lenval >= left ){\
|
||||||
|
PUTLOG("[%s:%08X(%s)]", par, inst par,\
|
||||||
|
"Value lenght exceed buffer lenght");\
|
||||||
|
return( -1 );\
|
||||||
|
};\
|
||||||
|
snprintf((char*)dest, left, "%s", l_dest);\
|
||||||
|
left -= lenval; dest += lenval;\
|
||||||
|
}
|
||||||
|
|
||||||
|
#define U16( inst, par, _str ){\
|
||||||
|
_str(inst par, dummy_b);\
|
||||||
|
if( strcmp( dummy_b, "" ) == 0 ){\
|
||||||
|
PUTLOG("[%s:%04X(%s)]", par, inst par, "Value is invalid");\
|
||||||
|
} else {\
|
||||||
|
PUTLOG("[%s:%04X(%s)]", par, inst par, "OK");\
|
||||||
|
};\
|
||||||
|
lenval = snprintf((char*)l_dest, sizeof(l_dest),\
|
||||||
|
"%-30s[%04X] [%s]\n",#par,inst par,dummy_b);\
|
||||||
|
if( lenval >= left ){\
|
||||||
|
PUTLOG("[%s:%04X(%s)]", par, inst par,\
|
||||||
|
"Value lenght exceed buffer lenght");\
|
||||||
|
return( -1 );\
|
||||||
|
};\
|
||||||
|
snprintf((char*)dest, left, "%s", l_dest);\
|
||||||
|
left -= (uint8_t)lenval; dest += (uint8_t) lenval;\
|
||||||
|
}
|
||||||
|
|
||||||
|
#define U08( inst, par, _str ){\
|
||||||
|
_str(inst par, dummy_b);\
|
||||||
|
if( strcmp( dummy_b, "" ) == 0 ){\
|
||||||
|
PUTLOG("[%s:%02X(%s)]", par, inst par, "Value is invalid");\
|
||||||
|
} else {\
|
||||||
|
PUTLOG("[%s:%02X(%s)]", par, inst par, "OK");\
|
||||||
|
};\
|
||||||
|
lenval = snprintf((char*)l_dest, sizeof(l_dest), "%-30s[%02X] - [%s]\n",\
|
||||||
|
#par,inst par, dummy_b);\
|
||||||
|
if( lenval >= left ){\
|
||||||
|
PUTLOG("[%s:%02X(%s)]", par, inst par,\
|
||||||
|
"Value lenght exceed buffer lenght");\
|
||||||
|
return( -1 );\
|
||||||
|
};\
|
||||||
|
snprintf((char*)dest, left, "%s", l_dest);\
|
||||||
|
left -= lenval; dest += lenval;\
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _op(inst, par, size ){\
|
||||||
|
lenval = snprintf((char*)l_dest, sizeof(l_dest), "%-30s[%."#size"s]\n",\
|
||||||
|
#par, inst par);\
|
||||||
|
if( lenval >= left ){\
|
||||||
|
PUTLOG("[%s:%s(%s)]", par, inst par, \
|
||||||
|
"Value lenght exceed buffer lenght");\
|
||||||
|
return( -1 );\
|
||||||
|
};\
|
||||||
|
PUTLOG("[%s:%s(%s)]", par, inst par, "OK");\
|
||||||
|
snprintf((char*)dest, left, "%s", l_dest);\
|
||||||
|
left -= lenval; dest += lenval;\
|
||||||
|
}
|
||||||
|
|
||||||
|
#define O_C_OCTET( inst, par, sizeval ){\
|
||||||
|
if( !(inst command_status) ){\
|
||||||
|
C_OCTET( inst, par, sizeval );\
|
||||||
|
} else {\
|
||||||
|
PUTLOG("[%s:%s(%s)]", par, inst par, "OK");\
|
||||||
|
};\
|
||||||
|
}
|
||||||
|
|
||||||
|
#define C_OCTET( inst, par, size ) {\
|
||||||
|
_op(inst, par, size )\
|
||||||
|
}
|
||||||
|
|
||||||
|
#define OCTET8( inst, par, size ){\
|
||||||
|
int i = 0;\
|
||||||
|
uint8_t *p = l_dest;\
|
||||||
|
int dummy = 0;\
|
||||||
|
lenval = *((inst par) - 1);\
|
||||||
|
if( (lenval + 33) >= left ){\
|
||||||
|
PUTLOG("[%s:%s(%s)]", par, inst par, \
|
||||||
|
"Value lenght exceed buffer lenght");\
|
||||||
|
return( -1 );\
|
||||||
|
};\
|
||||||
|
PUTLOG("[%s:%s(%s)]", par, "<bin>", "OK");\
|
||||||
|
p += snprintf((char*)p, (sizeof(l_dest)-(p-l_dest)), "%-30s[", #par);\
|
||||||
|
for(i = 0 ; i < lenval; i++){\
|
||||||
|
if( *((inst par)+i) < ' ' || *((inst par)+i) > '~' ){\
|
||||||
|
p += snprintf((char*)p, (sizeof(l_dest)-(p-l_dest)), ".");\
|
||||||
|
} else {\
|
||||||
|
p += snprintf((char*)p, (sizeof(l_dest)-(p-l_dest)), "%c",\
|
||||||
|
*((inst par)+i));\
|
||||||
|
};\
|
||||||
|
};\
|
||||||
|
p += snprintf((char*)p, (sizeof(l_dest)-(p-l_dest)), "]\n");\
|
||||||
|
dummy = snprintf((char*)dest, left, "%s", l_dest);\
|
||||||
|
left -= dummy; dest += dummy;\
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#define OCTET16( inst, par, size ){\
|
||||||
|
int i = 0;\
|
||||||
|
uint8_t *p = l_dest;\
|
||||||
|
int dummy = 0;\
|
||||||
|
uint16_t l_lenval = 0;\
|
||||||
|
memcpy(&l_lenval, ((inst par) - sizeof(uint16_t)), sizeof(uint16_t));\
|
||||||
|
if( (l_lenval + 33) >= left ){\
|
||||||
|
PUTLOG("[%s:%s(%s)]", par, inst par, \
|
||||||
|
"Value lenght exceed buffer lenght");\
|
||||||
|
return( -1 );\
|
||||||
|
};\
|
||||||
|
PUTLOG("[%s:%s(%s)]", par, "<bin>", "OK");\
|
||||||
|
p += snprintf((char*)p, (sizeof(l_dest) - (p - l_dest)), "%-30s[", #par);\
|
||||||
|
for( i = 0; i < l_lenval; i++){\
|
||||||
|
if( *((inst par)+i) < ' ' || *((inst par)+i) > '~' ){\
|
||||||
|
p += snprintf((char*)p, (sizeof(l_dest)-(p-l_dest)), ".");\
|
||||||
|
} else {\
|
||||||
|
p += snprintf((char*)p, (sizeof(l_dest)-(p-l_dest)), "%c",\
|
||||||
|
*((inst par)+i));\
|
||||||
|
};\
|
||||||
|
};\
|
||||||
|
p += snprintf((char*)p, (sizeof(l_dest)-(p-l_dest)), "]\n");\
|
||||||
|
dummy = snprintf((char*)dest, left, "%s", l_dest);\
|
||||||
|
left -= dummy; dest += dummy;\
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#define TLV( inst, tlv1, do_tlv ){\
|
||||||
|
tlv_t *aux_tlv = inst tlv1;\
|
||||||
|
while( aux_tlv != NULL ){\
|
||||||
|
do_tlv( aux_tlv );\
|
||||||
|
aux_tlv = aux_tlv->next;\
|
||||||
|
};\
|
||||||
|
};
|
||||||
|
|
||||||
|
#define DAD( inst, dad1, do_dad ){\
|
||||||
|
dad_t *aux_dad = inst dad1;\
|
||||||
|
while( aux_dad != NULL ){\
|
||||||
|
do_dad( aux_dad );\
|
||||||
|
aux_dad = aux_dad->next;\
|
||||||
|
};\
|
||||||
|
};
|
||||||
|
|
||||||
|
#define UDAD( inst, udad1, do_udad ){\
|
||||||
|
udad_t *aux_udad = inst udad1;\
|
||||||
|
while( aux_udad != NULL ){\
|
||||||
|
do_udad( aux_udad );\
|
||||||
|
aux_udad = aux_udad->next;\
|
||||||
|
};\
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "def_frame/alert_notification.tlv"
|
||||||
|
#include "def_frame/bind_receiver_resp.tlv"
|
||||||
|
#include "def_frame/bind_transceiver_resp.tlv"
|
||||||
|
#include "def_frame/bind_transmitter_resp.tlv"
|
||||||
|
#include "def_frame/data_sm.tlv"
|
||||||
|
#include "def_frame/data_sm_resp.tlv"
|
||||||
|
#include "def_frame/deliver_sm.tlv"
|
||||||
|
#include "def_frame/submit_multi_resp.udad"
|
||||||
|
#include "def_frame/submit_multi.dad"
|
||||||
|
#include "def_frame/submit_multi.tlv"
|
||||||
|
#include "def_frame/submit_sm.tlv"
|
||||||
|
#include "def_list/smpp34_protocol.def"
|
||||||
|
|
||||||
|
#include "def_frame/clean.frame"
|
||||||
|
|
||||||
|
return( 0 );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
smpp34_dumpPdu2(uint8_t *dest, int size_dest, void* tt)
|
||||||
|
{
|
||||||
|
uint32_t cmdid;
|
||||||
|
memcpy(&cmdid, tt+4, sizeof(uint32_t));
|
||||||
|
return( smpp34_dumpPdu(cmdid, dest, size_dest, tt) );
|
||||||
|
};
|
||||||
|
|
|
@ -0,0 +1,234 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006 Raul Tremsal
|
||||||
|
* File : smpp34_pack.c
|
||||||
|
* Author: Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
*
|
||||||
|
* This file is part of libsmpp34 (c-open-smpp3.4 library).
|
||||||
|
*
|
||||||
|
* The libsmpp34 library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <malloc.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "smpp34.h"
|
||||||
|
#include "smpp34_structs.h"
|
||||||
|
#include "smpp34_params.h"
|
||||||
|
|
||||||
|
/* GLOBALS ********************************************************************/
|
||||||
|
/* EXTERN *********************************************************************/
|
||||||
|
extern int smpp34_errno;
|
||||||
|
extern char smpp34_strerror[2048];
|
||||||
|
extern char *ptrerror;
|
||||||
|
|
||||||
|
/* FUNCTIONS ******************************************************************/
|
||||||
|
int
|
||||||
|
smpp34_pack(uint32_t type, uint8_t *ptrBuf, int ptrSize, int *ptrLen, void* tt)
|
||||||
|
{
|
||||||
|
|
||||||
|
char dummy_b[SMALL_BUFF];
|
||||||
|
uint32_t v = 0;
|
||||||
|
uint32_t *dd = (uint32_t*)tt;
|
||||||
|
uint8_t *aux = ptrBuf;
|
||||||
|
uint8_t *aux2 = ptrBuf;
|
||||||
|
int lenval = 0;
|
||||||
|
int left = ptrSize;
|
||||||
|
int lefterror = 0;
|
||||||
|
|
||||||
|
memset(smpp34_strerror, 0, sizeof(smpp34_strerror));
|
||||||
|
ptrerror = smpp34_strerror;
|
||||||
|
lefterror = sizeof(smpp34_strerror);
|
||||||
|
|
||||||
|
#define instancia t1->
|
||||||
|
|
||||||
|
#define U32( inst, par, _str ){\
|
||||||
|
uint32_t v32 = htonl(inst par);\
|
||||||
|
lenval = sizeof(uint32_t);\
|
||||||
|
if( lenval >= left ){\
|
||||||
|
PUTLOG("[%s:%08X(%s)]", par, inst par,\
|
||||||
|
"Value lenght exceed buffer lenght");\
|
||||||
|
return( -1 );\
|
||||||
|
};\
|
||||||
|
_str(inst par,dummy_b);\
|
||||||
|
if( strcmp("", dummy_b) == 0 ){\
|
||||||
|
PUTLOG( "[%s:%08X(%s)]", par, inst par, "Invalid value");\
|
||||||
|
return( -1 );\
|
||||||
|
}\
|
||||||
|
PUTLOG("[%s:%08X(%s)]", par, inst par, "OK");\
|
||||||
|
memcpy(aux, &v32, lenval);\
|
||||||
|
left -= lenval; aux += lenval;\
|
||||||
|
};
|
||||||
|
|
||||||
|
#define U16( inst, par, _str ) {\
|
||||||
|
uint16_t v16 = htons(inst par);\
|
||||||
|
lenval = sizeof(uint16_t);\
|
||||||
|
if( lenval >= left ){\
|
||||||
|
PUTLOG("[%s:%04X(%s)]", par, inst par,\
|
||||||
|
"Value lenght exceed buffer lenght");\
|
||||||
|
return( -1 );\
|
||||||
|
};\
|
||||||
|
_str(inst par,dummy_b);\
|
||||||
|
if( strcmp("", dummy_b) == 0 ){\
|
||||||
|
PUTLOG( "[%s:%04X(%s)]", par, inst par, "Invalid value");\
|
||||||
|
return( -1 );\
|
||||||
|
}\
|
||||||
|
PUTLOG("[%s:%04X(%s)]", par, inst par, "OK");\
|
||||||
|
memcpy(aux, &v16, lenval);\
|
||||||
|
left -= lenval; aux += lenval;\
|
||||||
|
};
|
||||||
|
|
||||||
|
#define U08( inst, par, _str ){\
|
||||||
|
lenval = sizeof(uint8_t);\
|
||||||
|
if( lenval >= left ){\
|
||||||
|
PUTLOG("[%s:%02X(%s)]", par, inst par,\
|
||||||
|
"Value lenght exceed buffer lenght");\
|
||||||
|
return( -1 );\
|
||||||
|
};\
|
||||||
|
_str(inst par,dummy_b);\
|
||||||
|
if( strcmp("", dummy_b) == 0 ){\
|
||||||
|
PUTLOG( "[%s:%02X(%s)]", par, inst par, "Invalid value");\
|
||||||
|
return( -1 );\
|
||||||
|
}\
|
||||||
|
PUTLOG("[%s:%02X(%s)]", par, inst par, "OK");\
|
||||||
|
memcpy(aux,&inst par, sizeof(inst par));\
|
||||||
|
left -= lenval; aux += lenval;\
|
||||||
|
};
|
||||||
|
|
||||||
|
#define O_C_OCTET( inst, par, sizeval ){\
|
||||||
|
if( !(inst command_status) ){\
|
||||||
|
C_OCTET( inst, par, sizeval );\
|
||||||
|
} else {\
|
||||||
|
PUTLOG("[%s:%s(%s)]", par, inst par, "OK");\
|
||||||
|
};\
|
||||||
|
}
|
||||||
|
|
||||||
|
#define C_OCTET( inst, par, sizeval ){\
|
||||||
|
lenval = strlen((char*)inst par) + 1;\
|
||||||
|
if( lenval > left ){\
|
||||||
|
PUTLOG("[len(%s):%d(%s)]", par, lenval, \
|
||||||
|
"Value lenght exceed buffer lenght");\
|
||||||
|
return( -1 );\
|
||||||
|
};\
|
||||||
|
if( lenval > sizeval ){\
|
||||||
|
memcpy(aux, &inst par, sizeval);\
|
||||||
|
*(inst par + sizeval-1) = *(aux+sizeval-1) = '\0';\
|
||||||
|
left -= sizeval; aux += sizeval;\
|
||||||
|
PUTLOG("[%s:%s(%s)]", par, inst par, \
|
||||||
|
"Data length is invalid (truncate)");\
|
||||||
|
} else {\
|
||||||
|
memcpy(aux, &inst par, lenval);\
|
||||||
|
left -= lenval; aux += lenval;\
|
||||||
|
PUTLOG("[%s:%s(%s)]", par, inst par, "OK");\
|
||||||
|
}\
|
||||||
|
};
|
||||||
|
|
||||||
|
#define OCTET8( inst, par, sizeval ){\
|
||||||
|
lenval = *((inst par) - 1);\
|
||||||
|
if( lenval >= left ){\
|
||||||
|
PUTLOG("[leng %s:%d(%s)]", par, lenval,\
|
||||||
|
"Value lenght exceed buffer lenght");\
|
||||||
|
return( -1 );\
|
||||||
|
};\
|
||||||
|
if( lenval >= sizeval ){\
|
||||||
|
PUTLOG("[%s:%s(%s)]", par, "<bin>",\
|
||||||
|
"Data length is invalid (truncate)");\
|
||||||
|
return( -1 );\
|
||||||
|
};\
|
||||||
|
memcpy(aux, &inst par, (lenval > sizeval)?sizeval:lenval);\
|
||||||
|
left -= (lenval > sizeval)?sizeval:lenval;\
|
||||||
|
aux += (lenval > sizeval)?sizeval:lenval;\
|
||||||
|
PUTLOG("[%s:%s(%s)]", par, "<bin>", "OK");\
|
||||||
|
};
|
||||||
|
|
||||||
|
#define OCTET16( inst, par, sizeval ){\
|
||||||
|
uint16_t l_lenval = 0;\
|
||||||
|
memcpy(&l_lenval, ((inst par) - sizeof(uint16_t)), sizeof(uint16_t));\
|
||||||
|
if( l_lenval >= left ){\
|
||||||
|
PUTLOG("[leng %s:%d(%s)]", par, l_lenval,\
|
||||||
|
"Value lenght exceed buffer lenght");\
|
||||||
|
return( -1 );\
|
||||||
|
};\
|
||||||
|
if( l_lenval > sizeval ){\
|
||||||
|
PUTLOG("[%s:%s(%s)]", par, "<bin>", "Data length is invalid");\
|
||||||
|
return( -1 );\
|
||||||
|
};\
|
||||||
|
memcpy(aux, &inst par, (l_lenval > sizeval)?sizeval:l_lenval);\
|
||||||
|
left -= (l_lenval > sizeval)?sizeval:l_lenval;\
|
||||||
|
aux += (l_lenval > sizeval)?sizeval:l_lenval;\
|
||||||
|
PUTLOG("[%s:%s(%s)]", par, "<bin>", "OK");\
|
||||||
|
}
|
||||||
|
|
||||||
|
#define TLV( inst, tlv2, do_tlv ) {\
|
||||||
|
tlv_t *aux_tlv = inst tlv2;\
|
||||||
|
while( aux_tlv != NULL ){\
|
||||||
|
do_tlv( aux_tlv );\
|
||||||
|
aux_tlv = aux_tlv->next;\
|
||||||
|
};\
|
||||||
|
};
|
||||||
|
|
||||||
|
#define UDAD( inst, udad2, do_udad ) {\
|
||||||
|
udad_t *aux_udad = inst udad2;\
|
||||||
|
while( aux_udad != NULL ){\
|
||||||
|
do_udad( aux_udad );\
|
||||||
|
aux_udad = aux_udad->next;\
|
||||||
|
};\
|
||||||
|
};
|
||||||
|
|
||||||
|
#define DAD( inst, dad2, do_dad ) {\
|
||||||
|
dad_t *aux_dad = inst dad2;\
|
||||||
|
while( aux_dad != NULL ){\
|
||||||
|
do_dad( aux_dad );\
|
||||||
|
aux_dad = aux_dad->next;\
|
||||||
|
};\
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "def_frame/alert_notification.tlv"
|
||||||
|
#include "def_frame/bind_receiver_resp.tlv"
|
||||||
|
#include "def_frame/bind_transceiver_resp.tlv"
|
||||||
|
#include "def_frame/bind_transmitter_resp.tlv"
|
||||||
|
#include "def_frame/data_sm.tlv"
|
||||||
|
#include "def_frame/data_sm_resp.tlv"
|
||||||
|
#include "def_frame/deliver_sm.tlv"
|
||||||
|
#include "def_frame/submit_multi_resp.udad"
|
||||||
|
#include "def_frame/submit_multi.dad"
|
||||||
|
#include "def_frame/submit_multi.tlv"
|
||||||
|
#include "def_frame/submit_sm.tlv"
|
||||||
|
#include "def_list/smpp34_protocol.def"
|
||||||
|
|
||||||
|
/* Hace algunas correcciones ******************************************/
|
||||||
|
*dd = aux - aux2; /* Escribe largo en el source */
|
||||||
|
v = htonl(aux - aux2); /* Calcula largo del PDU */
|
||||||
|
memcpy(aux2, &v, sizeof(uint32_t)); /* escribe largo en el dest */
|
||||||
|
*ptrLen = (int) (aux - aux2);
|
||||||
|
|
||||||
|
#include "def_frame/clean.frame"
|
||||||
|
return( 0 );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
smpp34_pack2(uint8_t *ptrBuf, int ptrSize, int *ptrLen, void* tt)
|
||||||
|
{
|
||||||
|
uint32_t cmdid;
|
||||||
|
memcpy(&cmdid, tt+4, sizeof(uint32_t));
|
||||||
|
return( smpp34_pack(cmdid, ptrBuf, ptrSize, ptrLen, tt) );
|
||||||
|
};
|
|
@ -0,0 +1,244 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006 Raul Tremsal
|
||||||
|
* File : smpp34_params.c
|
||||||
|
* Author: Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
*
|
||||||
|
* This file is part of libsmpp34 (c-open-smpp3.4 library).
|
||||||
|
*
|
||||||
|
* The libsmpp34 library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <malloc.h>
|
||||||
|
#include <string.h>
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "smpp34.h"
|
||||||
|
#include "smpp34_structs.h"
|
||||||
|
|
||||||
|
int
|
||||||
|
build_udad( udad_t **dest, udad_t *source )
|
||||||
|
{
|
||||||
|
|
||||||
|
/* Build new DAD-Chain ************************************************/
|
||||||
|
udad_t *dummy = (udad_t*)malloc(sizeof( udad_t ));
|
||||||
|
if( dummy == NULL ){
|
||||||
|
printf("Error in malloc()\n" );
|
||||||
|
return( -1 );
|
||||||
|
};
|
||||||
|
memcpy(dummy, source, sizeof( udad_t ));
|
||||||
|
|
||||||
|
dummy->next = (*dest);
|
||||||
|
(*dest) = dummy;
|
||||||
|
|
||||||
|
return( 0 );
|
||||||
|
};
|
||||||
|
|
||||||
|
int
|
||||||
|
destroy_udad( udad_t *sourceList )
|
||||||
|
{
|
||||||
|
|
||||||
|
udad_t *i = NULL;
|
||||||
|
/* Destroy DAD-Chain **************************************************/
|
||||||
|
while( sourceList != NULL ){
|
||||||
|
i = sourceList->next;
|
||||||
|
free((void*)sourceList);
|
||||||
|
sourceList = i;
|
||||||
|
};
|
||||||
|
|
||||||
|
return( 0 );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
build_dad( dad_t **dest, dad_t *source )
|
||||||
|
{
|
||||||
|
|
||||||
|
/* Build new DAD-Chain ************************************************/
|
||||||
|
dad_t *dummy = (dad_t*)malloc(sizeof( dad_t ));
|
||||||
|
if( dummy == NULL ){
|
||||||
|
printf("Error in malloc()\n" );
|
||||||
|
return( -1 );
|
||||||
|
};
|
||||||
|
memcpy(dummy, source, sizeof( dad_t ));
|
||||||
|
|
||||||
|
dummy->next = (*dest);
|
||||||
|
(*dest) = dummy;
|
||||||
|
|
||||||
|
return( 0 );
|
||||||
|
};
|
||||||
|
|
||||||
|
int
|
||||||
|
destroy_dad( dad_t *sourceList )
|
||||||
|
{
|
||||||
|
|
||||||
|
dad_t *i = NULL;
|
||||||
|
/* Destroy DAD-Chain **************************************************/
|
||||||
|
while( sourceList != NULL ){
|
||||||
|
i = sourceList->next;
|
||||||
|
free((void*)sourceList);
|
||||||
|
sourceList = i;
|
||||||
|
};
|
||||||
|
|
||||||
|
return( 0 );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
build_tlv( tlv_t **dest, tlv_t *source )
|
||||||
|
{
|
||||||
|
|
||||||
|
/* Build new TLV-Chain ************************************************/
|
||||||
|
tlv_t *dummy = (tlv_t*)malloc(sizeof( tlv_t ));
|
||||||
|
if( dummy == NULL ){
|
||||||
|
printf("Error in malloc()\n" );
|
||||||
|
return( -1 );
|
||||||
|
};
|
||||||
|
memcpy(dummy, source, sizeof( tlv_t ));
|
||||||
|
|
||||||
|
dummy->next = (*dest);
|
||||||
|
(*dest) = dummy;
|
||||||
|
|
||||||
|
return( 0 );
|
||||||
|
};
|
||||||
|
|
||||||
|
int
|
||||||
|
destroy_tlv( tlv_t *sourceList )
|
||||||
|
{
|
||||||
|
|
||||||
|
tlv_t *i = NULL;
|
||||||
|
/* Destroy TLV-Chain **************************************************/
|
||||||
|
while( sourceList != NULL ){
|
||||||
|
i = sourceList->next;
|
||||||
|
free((void*)sourceList);
|
||||||
|
sourceList = i;
|
||||||
|
};
|
||||||
|
|
||||||
|
return( 0 );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
char* str_tlv_id( uint16_t tlv_id, char* buff )
|
||||||
|
{
|
||||||
|
snprintf(buff, SMALL_BUFF, "%s",
|
||||||
|
#define OPERACION( p_tlv_id ) (tlv_id == p_tlv_id)?#p_tlv_id:
|
||||||
|
#include "def_list/tlv_id.list"
|
||||||
|
"Reserved"
|
||||||
|
#undef OPERACION
|
||||||
|
);
|
||||||
|
return( buff );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
char* str_command_id( uint32_t command, char* buff )
|
||||||
|
{
|
||||||
|
snprintf(buff, SMALL_BUFF, "%s",
|
||||||
|
#define OPERACION( p_command ) (command == p_command)?#p_command:
|
||||||
|
#include "def_list/command_id.list"
|
||||||
|
""
|
||||||
|
#undef OPERACION
|
||||||
|
);
|
||||||
|
return( buff );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
char* str_addr_ton( uint8_t ton, char* buff )
|
||||||
|
{
|
||||||
|
snprintf(buff, SMALL_BUFF, "%s",
|
||||||
|
#define OPERACION( p_command ) (ton == p_command)?#p_command:
|
||||||
|
#include "def_list/addr_ton.list"
|
||||||
|
""
|
||||||
|
#undef OPERACION
|
||||||
|
);
|
||||||
|
return( buff );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
char* str_addr_npi( uint8_t npi, char* buff )
|
||||||
|
{
|
||||||
|
snprintf(buff, SMALL_BUFF, "%s",
|
||||||
|
#define OPERACION( p_command ) (npi == p_command)?#p_command:
|
||||||
|
#include "def_list/addr_npi.list"
|
||||||
|
""
|
||||||
|
#undef OPERACION
|
||||||
|
);
|
||||||
|
return( buff );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
char* str_command_status( uint32_t command, char* buff )
|
||||||
|
{
|
||||||
|
snprintf(buff, SMALL_BUFF, "%s",
|
||||||
|
#define OPERACION( p_command ) (command == p_command)?#p_command:
|
||||||
|
#include "def_list/command_status.list"
|
||||||
|
""
|
||||||
|
#undef OPERACION
|
||||||
|
);
|
||||||
|
return( buff );
|
||||||
|
};
|
||||||
|
|
||||||
|
char *test_interface_version( uint8_t interface_version, char* buff )
|
||||||
|
{
|
||||||
|
snprintf(buff, SMALL_BUFF, "%s", (interface_version==0x34)?"OK":"" );
|
||||||
|
return( buff );
|
||||||
|
};
|
||||||
|
|
||||||
|
char *test_dest_flag( uint8_t dest_flag, char* buff )
|
||||||
|
{
|
||||||
|
snprintf(buff, SMALL_BUFF, "%s",
|
||||||
|
#define OPERACION( p_command ) (dest_flag == p_command)?#p_command:
|
||||||
|
#include "def_list/dest_flag.list"
|
||||||
|
""
|
||||||
|
#undef OPERACION
|
||||||
|
);
|
||||||
|
return( buff );
|
||||||
|
};
|
||||||
|
|
||||||
|
char *test_sequence_number( uint32_t sequence_number, char* buff )
|
||||||
|
{
|
||||||
|
char numero[20];
|
||||||
|
snprintf(numero, sizeof(numero), "%d", sequence_number);
|
||||||
|
snprintf(buff, SMALL_BUFF, "%s", (sequence_number>0)?numero:"" );
|
||||||
|
return( buff );
|
||||||
|
};
|
||||||
|
|
||||||
|
char *nothing( uint32_t var, char* buff )
|
||||||
|
{
|
||||||
|
snprintf(buff, SMALL_BUFF, "%s", "OK" );
|
||||||
|
return( buff );
|
||||||
|
};
|
||||||
|
|
||||||
|
char *valueDec_32( uint32_t var, char *buff )
|
||||||
|
{
|
||||||
|
snprintf(buff, SMALL_BUFF, "%d", var);
|
||||||
|
return( buff );
|
||||||
|
};
|
||||||
|
|
||||||
|
char *valueDec_16( uint16_t var, char *buff )
|
||||||
|
{
|
||||||
|
snprintf(buff, SMALL_BUFF, "%d", var);
|
||||||
|
return( buff );
|
||||||
|
};
|
||||||
|
|
||||||
|
char *valueDec_08( uint8_t var, char* buff )
|
||||||
|
{
|
||||||
|
snprintf(buff, SMALL_BUFF, "%d", var);
|
||||||
|
return( buff );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006 Raul Tremsal
|
||||||
|
* File : smpp34_params.h
|
||||||
|
* Author: Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
*
|
||||||
|
* This file is part of libsmpp34 (c-open-smpp3.4 library).
|
||||||
|
*
|
||||||
|
* The libsmpp34 library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifndef _TEST_PARAM_H_
|
||||||
|
#define _TEST_PARAM_H_
|
||||||
|
|
||||||
|
int destroy_udad( udad_t *sourceList );
|
||||||
|
int build_udad( udad_t **dest, udad_t *source );
|
||||||
|
|
||||||
|
int destroy_dad( dad_t *sourceList );
|
||||||
|
int build_dad( dad_t **dest, dad_t *source );
|
||||||
|
|
||||||
|
int destroy_tlv( tlv_t *sourceList );
|
||||||
|
int build_tlv( tlv_t **dest, tlv_t *source );
|
||||||
|
|
||||||
|
char* str_tlv_id( uint16_t tlv_id, char* buff );
|
||||||
|
char* str_command_id( uint32_t command, char* buff );
|
||||||
|
char* str_command_status( uint32_t command, char* buff );
|
||||||
|
char *test_sequence_number( uint32_t sequence_number, char* buff );
|
||||||
|
char *test_interface_version( uint8_t interface_version, char* buff );
|
||||||
|
char *test_dest_flag( uint8_t dest_flag, char* buff );
|
||||||
|
|
||||||
|
char* str_addr_ton( uint8_t ton, char *buff);
|
||||||
|
char* str_addr_npi( uint8_t npi, char *buff);
|
||||||
|
|
||||||
|
char *valueDec_32( uint32_t var, char *buff );
|
||||||
|
char *valueDec_16( uint16_t var, char *buff );
|
||||||
|
char *valueDec_08( uint8_t var, char *buff );
|
||||||
|
char *nothing( uint32_t var, char *buff );
|
||||||
|
#endif
|
|
@ -0,0 +1,43 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006 Raul Tremsal
|
||||||
|
* File : smpp34_structs.c
|
||||||
|
* Author: Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
*
|
||||||
|
* This file is part of libsmpp34 (c-open-smpp3.4 library).
|
||||||
|
*
|
||||||
|
* The libsmpp34 library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <malloc.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "smpp34.h"
|
||||||
|
#include "smpp34_structs.h"
|
||||||
|
#include "smpp34_params.h"
|
||||||
|
|
||||||
|
/* GLOBALS ********************************************************************/
|
||||||
|
int smpp34_errno;
|
||||||
|
char smpp34_strerror[2048];
|
||||||
|
char *ptrerror = NULL;
|
||||||
|
|
||||||
|
/* EXTERN *********************************************************************/
|
||||||
|
/* FUNCTIONS ******************************************************************/
|
|
@ -0,0 +1,261 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006 Raul Tremsal
|
||||||
|
* File : smpp34_structs.h
|
||||||
|
* Author: Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
*
|
||||||
|
* This file is part of libsmpp34 (c-open-smpp3.4 library).
|
||||||
|
*
|
||||||
|
* The libsmpp34 library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifndef _STB_H_
|
||||||
|
#define _STB_H_
|
||||||
|
|
||||||
|
#define SMALL_BUFF 30
|
||||||
|
/* Identify PDUs ident ********************************************************/
|
||||||
|
#define MAX_TLV_SIZE 1024
|
||||||
|
#define MAX_DAD_SIZE 21
|
||||||
|
#define SERVICE_TYPE_LENGTH 6
|
||||||
|
#define ADDRESS_LENGTH 21
|
||||||
|
#define TIME_LENGTH 17
|
||||||
|
#define SHORT_MESSAGE_LENGTH 255
|
||||||
|
|
||||||
|
/* Globals for definitions ****************************************************/
|
||||||
|
extern int smpp34_errno;
|
||||||
|
extern char smpp34_strerror[2048];
|
||||||
|
|
||||||
|
/* Define structures **********************************************************/
|
||||||
|
typedef struct tlv_t tlv_t;
|
||||||
|
typedef struct dad_t dad_t;
|
||||||
|
typedef struct udad_t udad_t;
|
||||||
|
typedef struct bind_transmitter_t bind_transmitter_t;
|
||||||
|
typedef struct bind_transmitter_resp_t bind_transmitter_resp_t;
|
||||||
|
typedef struct bind_receiver_t bind_receiver_t;
|
||||||
|
typedef struct bind_receiver_resp_t bind_receiver_resp_t;
|
||||||
|
typedef struct bind_transceiver_t bind_transceiver_t;
|
||||||
|
typedef struct bind_transceiver_resp_t bind_transceiver_resp_t;
|
||||||
|
typedef struct outbind_t outbind_t;
|
||||||
|
typedef struct unbind_t unbind_t;
|
||||||
|
typedef struct unbind_resp_t unbind_resp_t;
|
||||||
|
typedef struct generic_nack_t generic_nack_t;
|
||||||
|
typedef struct submit_sm_t submit_sm_t;
|
||||||
|
typedef struct submit_sm_resp_t submit_sm_resp_t;
|
||||||
|
typedef struct submit_multi_t submit_multi_t;
|
||||||
|
typedef struct submit_multi_resp_t submit_multi_resp_t;
|
||||||
|
typedef struct deliver_sm_t deliver_sm_t;
|
||||||
|
typedef struct deliver_sm_resp_t deliver_sm_resp_t;
|
||||||
|
typedef struct data_sm_t data_sm_t;
|
||||||
|
typedef struct data_sm_resp_t data_sm_resp_t;
|
||||||
|
typedef struct query_sm_t query_sm_t;
|
||||||
|
typedef struct query_sm_resp_t query_sm_resp_t;
|
||||||
|
typedef struct cancel_sm_t cancel_sm_t;
|
||||||
|
typedef struct cancel_sm_resp_t cancel_sm_resp_t;
|
||||||
|
typedef struct replace_sm_t replace_sm_t;
|
||||||
|
typedef struct replace_sm_resp_t replace_sm_resp_t;
|
||||||
|
typedef struct enquire_link_t enquire_link_t;
|
||||||
|
typedef struct alert_notification_t alert_notification_t;
|
||||||
|
|
||||||
|
/* TYPEDEFs structs ***********************************************************/
|
||||||
|
#define instancia 0
|
||||||
|
#define U32( inst, par, _str ) uint32_t par;
|
||||||
|
#define U16( inst, par, _str ) uint16_t par;
|
||||||
|
#define U08( inst, par, _str ) uint8_t par;
|
||||||
|
|
||||||
|
#define O_C_OCTET( inst, par, size ) uint8_t par[ size ];
|
||||||
|
#define C_OCTET( inst, par, size ) uint8_t par[ size ];
|
||||||
|
#define OCTET8( inst, par, size ) uint8_t par[ size ];
|
||||||
|
#define OCTET16( inst, par, size ) uint8_t par[ size ];
|
||||||
|
|
||||||
|
#define TLV( inst, par, do_tlv ) tlv_t *par;
|
||||||
|
#define UUU( inst, par, size ) union { \
|
||||||
|
U08( inst, val08, valueDec_08 ); \
|
||||||
|
U16( inst, val16, valueDec_16 ); \
|
||||||
|
U32( inst, val32, valueDec_32 ); \
|
||||||
|
OCTET16( inst, octet, size ); \
|
||||||
|
} par;
|
||||||
|
|
||||||
|
#define DAD( inst, par, do_dest_address ) dad_t *par;
|
||||||
|
#define UU2( inst, par, size ) union { \
|
||||||
|
struct { \
|
||||||
|
U08( instancia, dest_addr_ton, str_addr_ton ); \
|
||||||
|
U08( instancia, dest_addr_npi, str_addr_npi ); \
|
||||||
|
C_OCTET( instancia, destination_addr, size ); \
|
||||||
|
} sme; \
|
||||||
|
C_OCTET( instancia, dl_name, size ); \
|
||||||
|
} par;
|
||||||
|
|
||||||
|
#define UDAD( inst, par, do_dest_address ) udad_t *par;
|
||||||
|
|
||||||
|
struct dad_t {
|
||||||
|
#include "def_frame/dad.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct udad_t {
|
||||||
|
#include "def_frame/udad.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct tlv_t {
|
||||||
|
#include "def_frame/tlv.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct bind_transmitter_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/bind_transmitter.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct bind_transmitter_resp_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/bind_transmitter_resp.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct bind_receiver_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/bind_receiver.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct bind_receiver_resp_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/bind_receiver_resp.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct bind_transceiver_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/bind_transceiver.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct bind_transceiver_resp_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/bind_transceiver_resp.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct outbind_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/outbind.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct unbind_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct unbind_resp_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct generic_nack_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct submit_sm_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/submit_sm.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct submit_sm_resp_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/submit_sm_resp.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct submit_multi_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/submit_multi.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct submit_multi_resp_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/submit_multi_resp.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct deliver_sm_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/deliver_sm.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct deliver_sm_resp_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/deliver_sm_resp.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct data_sm_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/data_sm.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct data_sm_resp_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/data_sm_resp.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct query_sm_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/query_sm.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct query_sm_resp_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/query_sm_resp.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct cancel_sm_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/cancel_sm.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct cancel_sm_resp_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct replace_sm_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/replace_sm.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct replace_sm_resp_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct enquire_link_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct enquire_link_resp_t enquire_link_resp_t;
|
||||||
|
struct enquire_link_resp_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct alert_notification_t {
|
||||||
|
#include "def_frame/header.frame"
|
||||||
|
#include "def_frame/alert_notification.frame"
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "def_frame/clean.frame"
|
||||||
|
|
||||||
|
#define PUTLOG( format, param, value, parse ){\
|
||||||
|
int lenerror = 0;\
|
||||||
|
lenerror = snprintf((char*)ptrerror,lefterror,format,#param,value,parse);\
|
||||||
|
ptrerror += lenerror; lefterror -= lenerror;\
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Prototypes *****************************************************************/
|
||||||
|
int smpp34_dumpBuf(uint8_t *dest, int destL, uint8_t *src, int srcL);
|
||||||
|
|
||||||
|
int smpp34_dumpPdu(uint32_t type, uint8_t *dest, int size_dest, void* tt);
|
||||||
|
int smpp34_dumpPdu2(uint8_t *dest, int size_dest, void* tt);
|
||||||
|
|
||||||
|
int smpp34_pack(uint32_t type,uint8_t *ptrBuf,int ptrSize,int *ptrLen,void* tt);
|
||||||
|
int smpp34_pack2(uint8_t *ptrBuf,int ptrSize,int *ptrLen,void* tt);
|
||||||
|
|
||||||
|
int smpp34_unpack(uint32_t type, void* tt, uint8_t *ptrBuf, int ptrLen);
|
||||||
|
int smpp34_unpack2(void* tt, uint8_t *ptrBuf, int ptrLen);
|
||||||
|
#endif /* _STB_H_ */
|
|
@ -0,0 +1,255 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006 Raul Tremsal
|
||||||
|
* File : smpp34_unpack.c
|
||||||
|
* Author: Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
*
|
||||||
|
* This file is part of libsmpp34 (c-open-smpp3.4 library).
|
||||||
|
*
|
||||||
|
* The libsmpp34 library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <malloc.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "smpp34.h"
|
||||||
|
#include "smpp34_structs.h"
|
||||||
|
#include "smpp34_params.h"
|
||||||
|
|
||||||
|
/* GLOBALS ********************************************************************/
|
||||||
|
/* EXTERN *********************************************************************/
|
||||||
|
extern int smpp34_errno;
|
||||||
|
extern char smpp34_strerror[2048];
|
||||||
|
extern char *ptrerror;
|
||||||
|
|
||||||
|
/* FUNCTIONS ******************************************************************/
|
||||||
|
int
|
||||||
|
smpp34_unpack(uint32_t type, void* tt, uint8_t *ptrBuf, int ptrLen)
|
||||||
|
{
|
||||||
|
|
||||||
|
char dummy_b[SMALL_BUFF];
|
||||||
|
uint8_t *ini = ptrBuf;
|
||||||
|
uint8_t *aux = ptrBuf;
|
||||||
|
int lenval = 0;
|
||||||
|
int left = ptrLen;
|
||||||
|
int lefterror = 0;
|
||||||
|
|
||||||
|
memset(smpp34_strerror, 0, sizeof(smpp34_strerror));
|
||||||
|
ptrerror = smpp34_strerror;
|
||||||
|
lefterror = sizeof(smpp34_strerror);
|
||||||
|
|
||||||
|
#define instancia t1->
|
||||||
|
|
||||||
|
#define U32( inst, par, _str ){\
|
||||||
|
lenval = sizeof( uint32_t );\
|
||||||
|
if( lenval > left ){\
|
||||||
|
PUTLOG("[%s:%08X(%s)]", par, inst par,\
|
||||||
|
"Value lenght exceed buffer lenght");\
|
||||||
|
return( -1 );\
|
||||||
|
};\
|
||||||
|
memcpy(&inst par, aux, lenval);\
|
||||||
|
left -= lenval; aux += lenval;\
|
||||||
|
inst par = ntohl( inst par );\
|
||||||
|
_str(inst par, dummy_b);\
|
||||||
|
if( strcmp("", dummy_b) == 0 ){\
|
||||||
|
PUTLOG( "[%s:%08X(%s)]", par, inst par, "Invalid value");\
|
||||||
|
return( -1 );\
|
||||||
|
};\
|
||||||
|
PUTLOG("[%s:%08X(%s)]", par, inst par, "OK");\
|
||||||
|
};
|
||||||
|
|
||||||
|
#define U16( inst, par, _str ){\
|
||||||
|
lenval = sizeof( uint16_t );\
|
||||||
|
if( lenval > left ){\
|
||||||
|
PUTLOG("[%s:%04X(%s)]", par, inst par,\
|
||||||
|
"Value lenght exceed buffer lenght");\
|
||||||
|
return( -1 );\
|
||||||
|
}\
|
||||||
|
memcpy(&inst par, aux, lenval);\
|
||||||
|
left -= lenval; aux += lenval;\
|
||||||
|
inst par = ntohs( inst par );\
|
||||||
|
_str(inst par, dummy_b);\
|
||||||
|
if( strcmp("", dummy_b) == 0 ){\
|
||||||
|
PUTLOG("[%s:%04X(%s)]", par, inst par, "Invalid value");\
|
||||||
|
return( -1 );\
|
||||||
|
};\
|
||||||
|
PUTLOG("[%s:%04X(%s)]", par, inst par, "OK");\
|
||||||
|
};
|
||||||
|
|
||||||
|
#define U08( inst, par, _str ){\
|
||||||
|
lenval = sizeof( uint8_t );\
|
||||||
|
if( lenval > left ){\
|
||||||
|
PUTLOG("[%s:%02X(%s)]", par, inst par,\
|
||||||
|
"Value lenght exceed buffer lenght");\
|
||||||
|
return( -1 );\
|
||||||
|
};\
|
||||||
|
memcpy(&inst par, aux, lenval);\
|
||||||
|
left -= lenval; aux += lenval;\
|
||||||
|
_str(inst par, dummy_b);\
|
||||||
|
if( strcmp("", dummy_b) == 0 ){\
|
||||||
|
PUTLOG( "[%s:%02X(%s)]", par, inst par, "Invalid value");\
|
||||||
|
return( -1 );\
|
||||||
|
};\
|
||||||
|
PUTLOG("[%s:%02X(%s)]", par, inst par, "OK");\
|
||||||
|
};
|
||||||
|
|
||||||
|
/* NOTA: Importante, Los WARNINGs de los octetos, advierten de una
|
||||||
|
* inconsistencia de largo en los octets/c_octets recibidos, segun se
|
||||||
|
* decida el grado de restriccion estos pueden ser errores graves.
|
||||||
|
* La accion a tomar es truncar estos datos a los largos permitidos en la
|
||||||
|
* especicacion, pero seguir parseando (saltando segun los largos
|
||||||
|
* invalidos) los datos recibidos.
|
||||||
|
*/
|
||||||
|
#define O_C_OCTET( inst, par, sizeval ){\
|
||||||
|
if( !(inst command_status) ){\
|
||||||
|
C_OCTET( inst, par, sizeval );\
|
||||||
|
} else {\
|
||||||
|
PUTLOG("[%s:%s(%s)]", par, inst par, "OK");\
|
||||||
|
};\
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#define C_OCTET( inst, par, size ){\
|
||||||
|
lenval = strlen( (char*) aux ) + 1;\
|
||||||
|
if( lenval > left ){\
|
||||||
|
PUTLOG("[len(%s):%d(%s)]", par, lenval, \
|
||||||
|
"Value lenght exceed buffer lenght");\
|
||||||
|
return( -1 );\
|
||||||
|
};\
|
||||||
|
if( lenval > size ){\
|
||||||
|
PUTLOG("[%s:%s(%s)]", par, inst par, "Data length is invalid");\
|
||||||
|
return( -1 );\
|
||||||
|
} else {\
|
||||||
|
/*snprintf(inst par, (lenval>size)?size:lenval, "%s", aux); */ \
|
||||||
|
memcpy(inst par, aux, lenval);\
|
||||||
|
left -= lenval; aux += lenval;\
|
||||||
|
PUTLOG("[%s:%s(%s)]", par, inst par, "OK");\
|
||||||
|
};\
|
||||||
|
}
|
||||||
|
|
||||||
|
#define OCTET8( inst, par, size ){\
|
||||||
|
lenval = *((inst par) - 1);\
|
||||||
|
if( lenval > left ){\
|
||||||
|
PUTLOG("[leng %s:%d(%s)]", par, lenval,\
|
||||||
|
"Value lenght exceed buffer lenght");\
|
||||||
|
return( -1 );\
|
||||||
|
};\
|
||||||
|
if( lenval > size ){\
|
||||||
|
PUTLOG("[%s:%s(%s)]", par, "<bin>",\
|
||||||
|
"Data length is invalid (truncate)");\
|
||||||
|
return( -1 );\
|
||||||
|
};\
|
||||||
|
memcpy(&inst par, aux, (lenval>size)?size:lenval);\
|
||||||
|
left -= lenval; aux += lenval;\
|
||||||
|
PUTLOG("[%s:%s(%s)]", par, "<bin>", "OK");\
|
||||||
|
}
|
||||||
|
|
||||||
|
#define OCTET16( inst, par, size ){\
|
||||||
|
uint16_t l_lenval = 0; /* VERIFICAR ESTO */\
|
||||||
|
memcpy(&l_lenval, (inst par - sizeof(uint16_t)), sizeof(uint16_t));\
|
||||||
|
if( l_lenval > left ){\
|
||||||
|
PUTLOG("[leng %s:%d(%s)]", par, l_lenval,\
|
||||||
|
"Value lenght exceed buffer lenght");\
|
||||||
|
return( -1 );\
|
||||||
|
};\
|
||||||
|
if( l_lenval > size ){\
|
||||||
|
PUTLOG("[%s:%s(%s)]", par, "<bin>", "Data length is invalid");\
|
||||||
|
return( -1 );\
|
||||||
|
};\
|
||||||
|
PUTLOG("[%s:%s(%s)]", par, "<bin>", "OK");\
|
||||||
|
memcpy(&(inst par), aux, (l_lenval>size)?size:l_lenval);\
|
||||||
|
left -= l_lenval; aux += l_lenval;\
|
||||||
|
}
|
||||||
|
|
||||||
|
#define TLV( inst, tlv3, do_tlv ){\
|
||||||
|
tlv_t *aux_tlv = NULL;\
|
||||||
|
while( (aux - ini) < t1->command_length ){\
|
||||||
|
aux_tlv = (tlv_t *) malloc(sizeof( tlv_t ));\
|
||||||
|
memset(aux_tlv, 0, sizeof(tlv_t));\
|
||||||
|
do_tlv( aux_tlv );\
|
||||||
|
aux_tlv->next = inst tlv3;\
|
||||||
|
inst tlv3 = aux_tlv;\
|
||||||
|
};\
|
||||||
|
};
|
||||||
|
|
||||||
|
#define UDAD( inst, udad3, do_udad ){\
|
||||||
|
udad_t *aux_udad = NULL;\
|
||||||
|
int c = 0;\
|
||||||
|
while( c < t1->no_unsuccess ){\
|
||||||
|
aux_udad = (udad_t *) malloc(sizeof( udad_t ));\
|
||||||
|
memset(aux_udad, 0, sizeof(udad_t));\
|
||||||
|
do_udad( aux_udad );\
|
||||||
|
aux_udad->next = inst udad3;\
|
||||||
|
inst udad3 = aux_udad;\
|
||||||
|
c++;\
|
||||||
|
};\
|
||||||
|
};
|
||||||
|
|
||||||
|
#define DAD( inst, dad3, do_dad ){\
|
||||||
|
dad_t *aux_dad = NULL;\
|
||||||
|
int c = 0;\
|
||||||
|
while( c < t1->number_of_dests ){\
|
||||||
|
aux_dad = (dad_t *) malloc(sizeof( dad_t ));\
|
||||||
|
memset(aux_dad, 0, sizeof(dad_t));\
|
||||||
|
do_dad( aux_dad );\
|
||||||
|
aux_dad->next = inst dad3;\
|
||||||
|
inst dad3 = aux_dad;\
|
||||||
|
c++;\
|
||||||
|
};\
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "def_frame/alert_notification.tlv"
|
||||||
|
#include "def_frame/bind_receiver_resp.tlv"
|
||||||
|
#include "def_frame/bind_transceiver_resp.tlv"
|
||||||
|
#include "def_frame/bind_transmitter_resp.tlv"
|
||||||
|
#include "def_frame/data_sm.tlv"
|
||||||
|
#include "def_frame/data_sm_resp.tlv"
|
||||||
|
#include "def_frame/deliver_sm.tlv"
|
||||||
|
#include "def_frame/submit_multi_resp.udad"
|
||||||
|
#include "def_frame/submit_multi.dad"
|
||||||
|
#include "def_frame/submit_multi.tlv"
|
||||||
|
#include "def_frame/submit_sm.tlv"
|
||||||
|
#include "def_list/smpp34_protocol.def"
|
||||||
|
|
||||||
|
{ /* Hace algunas Verificaciones **************************************/
|
||||||
|
uint32_t len_orig;
|
||||||
|
uint32_t l;
|
||||||
|
memcpy(&len_orig, tt, sizeof(uint32_t));
|
||||||
|
l = ntohl( len_orig );
|
||||||
|
if( len_orig != (aux - ini) ){
|
||||||
|
PUTLOG("[%s:(Error in PDU length %d!=%d)]",PDU,len_orig,(uint32_t)(aux-ini));
|
||||||
|
return( -1 );
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "def_frame/clean.frame"
|
||||||
|
return( 0 );
|
||||||
|
};
|
||||||
|
|
||||||
|
int
|
||||||
|
smpp34_unpack2(void* tt, uint8_t *ptrBuf, int ptrLen)
|
||||||
|
{
|
||||||
|
uint32_t cmdid;
|
||||||
|
uint32_t tempo;
|
||||||
|
memcpy(&tempo, ptrBuf + 4, sizeof(uint32_t)); /* get command_id PDU */
|
||||||
|
cmdid = ntohl( tempo );
|
||||||
|
return( smpp34_unpack(cmdid, tt, ptrBuf, ptrLen) );
|
||||||
|
};
|
|
@ -0,0 +1,35 @@
|
||||||
|
# test_pdu/Makefile.am #
|
||||||
|
|
||||||
|
TESTAPPS_SOURCE_DIR = $(top_srcdir)/test_apps
|
||||||
|
sendwp_SOURCES = \
|
||||||
|
$(TESTAPPS_SOURCE_DIR)/tcp.c\
|
||||||
|
$(TESTAPPS_SOURCE_DIR)/smpp.c\
|
||||||
|
$(TESTAPPS_SOURCE_DIR)/sendwp.h\
|
||||||
|
$(TESTAPPS_SOURCE_DIR)/sendwp.c
|
||||||
|
|
||||||
|
sendwp_CPPFLAGS = `xml2-config --cflags`
|
||||||
|
sendwp_LDFLAGS = `xml2-config --libs`
|
||||||
|
sendwp_pkgdatadir = $(prefix)/bin
|
||||||
|
sendwp_pkgdata_DATA = \
|
||||||
|
$(TESTAPPS_SOURCE_DIR)/sendwp.xml
|
||||||
|
|
||||||
|
esme_SOURCES = \
|
||||||
|
$(TESTAPPS_SOURCE_DIR)/tcp.c\
|
||||||
|
$(TESTAPPS_SOURCE_DIR)/smpp.c\
|
||||||
|
$(TESTAPPS_SOURCE_DIR)/esme.h\
|
||||||
|
$(TESTAPPS_SOURCE_DIR)/esme.c
|
||||||
|
|
||||||
|
esme_CPPFLAGS = `xml2-config --cflags`
|
||||||
|
esme_LDFLAGS = `xml2-config --libs`
|
||||||
|
esme_pkgdatadir = $(prefix)/bin
|
||||||
|
esme_pkgdata_DATA = \
|
||||||
|
$(TESTAPPS_SOURCE_DIR)/esme.xml
|
||||||
|
|
||||||
|
analizer_SOURCES = \
|
||||||
|
$(TESTAPPS_SOURCE_DIR)/analizer.c
|
||||||
|
|
||||||
|
analizer_CPPFLAGS =
|
||||||
|
analizer_LDFLAGS =
|
||||||
|
analizer_pkgdatadir =
|
||||||
|
analizer_pkgdata_DATA =
|
||||||
|
|
|
@ -0,0 +1,245 @@
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006 Raul Tremsal
|
||||||
|
* File : esme.c
|
||||||
|
* Author: Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
*
|
||||||
|
* This file is part of libsmpp34 (c-open-smpp3.4 library).
|
||||||
|
*
|
||||||
|
* The libsmpp34 library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "smpp34.h"
|
||||||
|
#include "smpp34_structs.h"
|
||||||
|
#include "smpp34_params.h"
|
||||||
|
|
||||||
|
extern char *optarg;
|
||||||
|
char file_pdu[256];
|
||||||
|
|
||||||
|
int ret = 0;
|
||||||
|
uint8_t bufPDU[2048];
|
||||||
|
int bufPDULen = 0;
|
||||||
|
uint8_t bPrint[2048];
|
||||||
|
|
||||||
|
#define HELP_FORMAT " -f file [-h]\n" \
|
||||||
|
" -f /path/to/file: binary file path.\n" \
|
||||||
|
" -h : Help, show this message.\n"
|
||||||
|
|
||||||
|
|
||||||
|
int work( uint32_t id, void* dst )
|
||||||
|
{
|
||||||
|
|
||||||
|
/* Print Buffer *******************************************************/
|
||||||
|
memset(bPrint, 0, sizeof(bPrint));
|
||||||
|
ret = smpp34_dumpBuf(bPrint, sizeof(bPrint), bufPDU, bufPDULen);
|
||||||
|
if( ret != 0 ){
|
||||||
|
printf("Error in smpp34_dumpBuf():%d:\n%s\n",
|
||||||
|
smpp34_errno, smpp34_strerror );
|
||||||
|
return( -1 );
|
||||||
|
};
|
||||||
|
printf("parse smpp34_dumpBuf()\n%s\n", smpp34_strerror);
|
||||||
|
printf("-----------------------------------------------------------\n");
|
||||||
|
printf("%s", bPrint);
|
||||||
|
printf("-----------------------------------------------------------\n");
|
||||||
|
|
||||||
|
/* Copy PDU from Buffer ***********************************************/
|
||||||
|
ret = smpp34_unpack(id, (void*)dst, bufPDU, bufPDULen);
|
||||||
|
if( ret != 0 ){
|
||||||
|
printf("Error in smpp34_unpack():%d:\n%s\n",
|
||||||
|
smpp34_errno, smpp34_strerror);
|
||||||
|
return( -1 );
|
||||||
|
};
|
||||||
|
printf("parse smpp34_unpack()\n%s\n", smpp34_strerror);
|
||||||
|
|
||||||
|
/* Print PDU **********************************************************/
|
||||||
|
memset(bPrint, 0, sizeof(bPrint));
|
||||||
|
ret = smpp34_dumpPdu(id, bPrint, sizeof(bPrint), (void*)dst );
|
||||||
|
if( ret != 0){
|
||||||
|
printf("Error in smpp34_dumpPdu():%d:\n%s\n",
|
||||||
|
smpp34_errno, smpp34_strerror);
|
||||||
|
return( -1 );
|
||||||
|
};
|
||||||
|
printf("parse smpp34_dumpPdu()\n%s\n", smpp34_strerror);
|
||||||
|
printf("-----------------------------------------------------------\n");
|
||||||
|
printf("%s\n", bPrint);
|
||||||
|
printf("-----------------------------------------------------------\n");
|
||||||
|
|
||||||
|
return( 0 );
|
||||||
|
};
|
||||||
|
|
||||||
|
int main( int argc, char **argv )
|
||||||
|
{
|
||||||
|
int co;
|
||||||
|
FILE *fd = NULL;
|
||||||
|
uint32_t tt, id;
|
||||||
|
tt = id = 0;
|
||||||
|
|
||||||
|
while( (co = getopt(argc, argv, "f:h")) != EOF ){
|
||||||
|
switch( co ){
|
||||||
|
case 'f':
|
||||||
|
snprintf(file_pdu, sizeof(file_pdu), "%s", optarg);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
printf("Error: unrecognized option\n");
|
||||||
|
case 'h':
|
||||||
|
printf("usage: %s %s\n", argv[0], HELP_FORMAT);
|
||||||
|
return( -1 );
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if( strcmp(file_pdu, "") == 0 ){ printf("Error in parameters\n");
|
||||||
|
printf("usage: %s %s\n", argv[0], HELP_FORMAT); return( -1 ); };
|
||||||
|
|
||||||
|
/* Open File **********************************************************/
|
||||||
|
|
||||||
|
if( (fd = fopen(file_pdu, "r")) == NULL ){
|
||||||
|
printf("Can't open file %s\n", file_pdu);
|
||||||
|
return( -1 );
|
||||||
|
};
|
||||||
|
|
||||||
|
memset(bufPDU, 0, sizeof(bufPDU)); bufPDULen = 0;
|
||||||
|
/* char *fgets(char *s, int size, FILE *stream); */
|
||||||
|
while( !feof( fd ) ){
|
||||||
|
*(bufPDU + (bufPDULen++)) = (uint8_t)getc( fd );
|
||||||
|
};
|
||||||
|
fclose( fd ); bufPDULen--;
|
||||||
|
|
||||||
|
memcpy(&tt, (bufPDU+4), 4); id = ntohl( tt );
|
||||||
|
|
||||||
|
if( id == BIND_TRANSMITTER ){
|
||||||
|
bind_transmitter_t t1;
|
||||||
|
memset(&t1, 0, sizeof(bind_transmitter_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == BIND_TRANSMITTER_RESP ){
|
||||||
|
bind_transmitter_resp_t t1;
|
||||||
|
memset(&t1, 0, sizeof(bind_transmitter_resp_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == BIND_RECEIVER ){
|
||||||
|
bind_receiver_t t1;
|
||||||
|
memset(&t1, 0, sizeof(bind_receiver_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == BIND_RECEIVER_RESP ){
|
||||||
|
bind_receiver_resp_t t1;
|
||||||
|
memset(&t1, 0, sizeof(bind_receiver_resp_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == BIND_TRANSCEIVER ){
|
||||||
|
bind_transceiver_t t1;
|
||||||
|
memset(&t1, 0, sizeof(bind_transceiver_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == BIND_TRANSCEIVER_RESP ){
|
||||||
|
bind_transceiver_resp_t t1;
|
||||||
|
memset(&t1, 0, sizeof(bind_transceiver_resp_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == OUTBIND ){
|
||||||
|
outbind_t t1;
|
||||||
|
memset(&t1, 0, sizeof(outbind_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == UNBIND ){
|
||||||
|
unbind_t t1;
|
||||||
|
memset(&t1, 0, sizeof(unbind_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == UNBIND_RESP ){
|
||||||
|
unbind_resp_t t1;
|
||||||
|
memset(&t1, 0, sizeof(unbind_resp_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == GENERIC_NACK ){
|
||||||
|
generic_nack_t t1;
|
||||||
|
memset(&t1, 0, sizeof(generic_nack_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == SUBMIT_SM ){
|
||||||
|
submit_sm_t t1;
|
||||||
|
memset(&t1, 0, sizeof(submit_sm_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == SUBMIT_SM_RESP ){
|
||||||
|
submit_sm_resp_t t1;
|
||||||
|
memset(&t1, 0, sizeof(submit_sm_resp_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == SUBMIT_MULTI ){
|
||||||
|
submit_multi_t t1;
|
||||||
|
memset(&t1, 0, sizeof(submit_multi_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == SUBMIT_MULTI_RESP ){
|
||||||
|
submit_multi_resp_t t1;
|
||||||
|
memset(&t1, 0, sizeof(submit_multi_resp_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == DELIVER_SM ){
|
||||||
|
deliver_sm_t t1;
|
||||||
|
memset(&t1, 0, sizeof(deliver_sm_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == DELIVER_SM_RESP ){
|
||||||
|
deliver_sm_resp_t t1;
|
||||||
|
memset(&t1, 0, sizeof(deliver_sm_resp_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == DATA_SM ){
|
||||||
|
data_sm_t t1;
|
||||||
|
memset(&t1, 0, sizeof(data_sm_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == DATA_SM_RESP ){
|
||||||
|
data_sm_resp_t t1;
|
||||||
|
memset(&t1, 0, sizeof(data_sm_resp_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == QUERY_SM ){
|
||||||
|
query_sm_t t1;
|
||||||
|
memset(&t1, 0, sizeof(query_sm_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == QUERY_SM_RESP ){
|
||||||
|
query_sm_resp_t t1;
|
||||||
|
memset(&t1, 0, sizeof(query_sm_resp_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == CANCEL_SM ){
|
||||||
|
cancel_sm_t t1;
|
||||||
|
memset(&t1, 0, sizeof(cancel_sm_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == CANCEL_SM_RESP ){
|
||||||
|
cancel_sm_resp_t t1;
|
||||||
|
memset(&t1, 0, sizeof(cancel_sm_resp_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == REPLACE_SM ){
|
||||||
|
replace_sm_t t1;
|
||||||
|
memset(&t1, 0, sizeof(replace_sm_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == REPLACE_SM_RESP ){
|
||||||
|
replace_sm_resp_t t1;
|
||||||
|
memset(&t1, 0, sizeof(replace_sm_resp_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == ENQUIRE_LINK ){
|
||||||
|
enquire_link_t t1;
|
||||||
|
memset(&t1, 0, sizeof(enquire_link_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == ENQUIRE_LINK_RESP ){
|
||||||
|
enquire_link_resp_t t1;
|
||||||
|
memset(&t1, 0, sizeof(enquire_link_resp_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else if( id == ALERT_NOTIFICATION ){
|
||||||
|
alert_notification_t t1;
|
||||||
|
memset(&t1, 0, sizeof(alert_notification_t));
|
||||||
|
return( work( id, (void*)&t1 ) );
|
||||||
|
} else {
|
||||||
|
printf("Invalid SMPP PDU [%08X].\n", id);
|
||||||
|
};
|
||||||
|
return( -1 );
|
||||||
|
|
||||||
|
};
|
|
@ -0,0 +1,109 @@
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006 Raul Tremsal
|
||||||
|
* File : esme.c
|
||||||
|
* Author: Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
*
|
||||||
|
* This file is part of libsmpp34 (c-open-smpp3.4 library).
|
||||||
|
*
|
||||||
|
* The libsmpp34 library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <libxml/xmlmemory.h>
|
||||||
|
#include <libxml/parser.h>
|
||||||
|
|
||||||
|
#include "esme.h"
|
||||||
|
|
||||||
|
extern char *optarg;
|
||||||
|
char file_config[256];
|
||||||
|
xmlDocPtr d; /* document */
|
||||||
|
xmlNodePtr c; /* config */
|
||||||
|
xmlNodePtr conn_tcp; /* conn_tcp */
|
||||||
|
xmlNodePtr conn_smpp; /* conn_smpp */
|
||||||
|
xmlNodePtr smpp_msg; /* smpp_msg */
|
||||||
|
|
||||||
|
int sock_tcp = 0;
|
||||||
|
|
||||||
|
|
||||||
|
#define HELP_FORMAT " -c file.xml [-h]\n" \
|
||||||
|
" -c /path/to/file.xml: config file path.\n" \
|
||||||
|
" -h : Help, show this message.\n"
|
||||||
|
|
||||||
|
int main( int argc, char **argv )
|
||||||
|
{
|
||||||
|
int co;
|
||||||
|
|
||||||
|
while( (co = getopt(argc, argv, "c:h")) != EOF ){
|
||||||
|
switch( co ){
|
||||||
|
case 'c':
|
||||||
|
snprintf(file_config, sizeof(file_config), "%s", optarg);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
printf("Error: unrecognized option\n");
|
||||||
|
case 'h':
|
||||||
|
printf("usage: %s %s\n", argv[0], HELP_FORMAT);
|
||||||
|
return( -1 );
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if( strcmp(file_config, "") == 0 ){ printf("Error in parameters\n");
|
||||||
|
printf("usage: %s %s\n", argv[0], HELP_FORMAT); return( -1 ); };
|
||||||
|
d = xmlParseFile( file_config );
|
||||||
|
if( d == NULL ){ printf("Error in xmlParseFile()\n");
|
||||||
|
printf("usage: %s %s\n", argv[0], HELP_FORMAT); return( -1 ); };
|
||||||
|
c = xmlDocGetRootElement( d );
|
||||||
|
if( c == NULL ){ printf("Error in xmlDocGetRootElement()\n");
|
||||||
|
printf("usage: %s %s\n", argv[0], HELP_FORMAT); return( -1 ); };
|
||||||
|
|
||||||
|
XML_IN_NODE(c, "config", c=c->xmlChildrenNode;break;, return(-1); );
|
||||||
|
XML_IN_NODE(c, "conn_tcp", conn_tcp=c;break;, return(-1); );
|
||||||
|
XML_IN_NODE(c, "conn_smpp", conn_smpp=c;break;, return(-1); );
|
||||||
|
XML_IN_NODE(c, "smpp_msg", smpp_msg=c;break;, return(-1); );
|
||||||
|
|
||||||
|
/* do tcp connect */
|
||||||
|
if( do_tcp_connect( conn_tcp, &sock_tcp ) ){
|
||||||
|
printf("Error in tcp connect.\n"); goto lb_free_document; };
|
||||||
|
|
||||||
|
/* do smpp connect */
|
||||||
|
if( do_smpp_connect( conn_smpp, sock_tcp ) ){
|
||||||
|
printf("Error in smpp connect.\n"); goto lb_tcp_close; };
|
||||||
|
|
||||||
|
/* do smpp send message */
|
||||||
|
if( do_smpp_send_message( smpp_msg, sock_tcp ) ){
|
||||||
|
printf("Error in smpp send message.\n"); goto lb_smpp_close; };
|
||||||
|
|
||||||
|
/* That's all folks */
|
||||||
|
/* taaa taratatata tatatatatata */
|
||||||
|
/* taaa taratatata tatatatatata */
|
||||||
|
/* ta aaa ta aaa tatatata */
|
||||||
|
/* ta aaa ta aaa tatatata */
|
||||||
|
/* taaa taratatata tatatatatata */
|
||||||
|
/* :) */
|
||||||
|
|
||||||
|
lb_smpp_close: /* do smpp close */
|
||||||
|
if( do_smpp_close( sock_tcp ) ) printf("Error in smpp close.\n");
|
||||||
|
|
||||||
|
lb_tcp_close: /* do tcp close */
|
||||||
|
if( do_tcp_close( sock_tcp ) ) printf("Error in tcp close.\n");
|
||||||
|
|
||||||
|
lb_free_document: /* free xml document */
|
||||||
|
xmlFreeDoc( d );
|
||||||
|
|
||||||
|
return( 0 );
|
||||||
|
};
|
|
@ -0,0 +1,67 @@
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006 Raul Tremsal
|
||||||
|
* File : esme.h
|
||||||
|
* Author: Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
*
|
||||||
|
* This file is part of libsmpp34 (c-open-smpp3.4 library).
|
||||||
|
*
|
||||||
|
* The libsmpp34 library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _esme_h_
|
||||||
|
#define _esme_h_
|
||||||
|
|
||||||
|
#define GET_PROP_INT( dst, c, src )\
|
||||||
|
{\
|
||||||
|
xmlChar *clave = NULL; dst = 0;\
|
||||||
|
if( (clave = xmlGetProp(c, (xmlChar*)src)) != NULL ){\
|
||||||
|
dst = strtol((char*)clave, NULL, 10);\
|
||||||
|
xmlFree( clave );\
|
||||||
|
}\
|
||||||
|
};
|
||||||
|
|
||||||
|
#define GET_PROP_STR( dst, c, src )\
|
||||||
|
{\
|
||||||
|
xmlChar *clave = NULL;\
|
||||||
|
memset(dst, 0, sizeof(dst));\
|
||||||
|
if( (clave = xmlGetProp(c, (xmlChar*)src)) != NULL ){\
|
||||||
|
snprintf((char*)dst, sizeof(dst), "%s", (char*)clave);\
|
||||||
|
xmlFree( clave );\
|
||||||
|
}\
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define _xmlChar( str ) (const xmlChar*) str
|
||||||
|
#define XML_IN_NODE( c, str, exito, fracaso )\
|
||||||
|
while( c != NULL ){\
|
||||||
|
if( xmlStrcmp(c->name, _xmlChar(str)) == 0 ){\
|
||||||
|
exito;\
|
||||||
|
};\
|
||||||
|
c = c->next;\
|
||||||
|
};\
|
||||||
|
if( c == NULL ){\
|
||||||
|
printf("Can't find tag <%s>.", str);\
|
||||||
|
fracaso;\
|
||||||
|
};
|
||||||
|
|
||||||
|
int do_tcp_connect( xmlNodePtr p, int *sock_tcp );
|
||||||
|
int do_tcp_close( int sock_tcp );
|
||||||
|
int do_smpp_connect( xmlNodePtr p, int sock_tcp );
|
||||||
|
int do_smpp_send_message( xmlNodePtr p, int sock_tcp );
|
||||||
|
int do_smpp_close( int sock_tcp );
|
||||||
|
#endif /* _esme_h_ */
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<config>
|
||||||
|
<conn_tcp host="127.0.0.1" port="9090"/>
|
||||||
|
<conn_smpp system_id="sytem" password="asdfg34" system_type="type01"/>
|
||||||
|
<smpp_msg src="5565" dst="0911110000" msg="Este es un ejemplo 01"/>
|
||||||
|
</config>
|
|
@ -0,0 +1,25 @@
|
||||||
|
|
||||||
|
/* Linealize PDU to buffer ********************************************/
|
||||||
|
memset(local_buffer, 0, sizeof(local_buffer));
|
||||||
|
ret = smpp34_pack2( local_buffer, sizeof(local_buffer),
|
||||||
|
&local_buffer_len, (void*)&req);
|
||||||
|
if( ret != 0 ){ printf("Error in smpp34_pack():%d:\n%s\n",
|
||||||
|
smpp34_errno, smpp34_strerror); return( -1 ); };
|
||||||
|
/* Print PDU **********************************************************/
|
||||||
|
memset(print_buffer, 0, sizeof(print_buffer));
|
||||||
|
ret = smpp34_dumpPdu2( print_buffer, sizeof(print_buffer), (void*)&req);
|
||||||
|
if( ret != 0){ printf("Error in smpp34_dumpPdu():%d:\n%s\n",
|
||||||
|
smpp34_errno, smpp34_strerror); return( -1 ); };
|
||||||
|
printf("-----------------------------------------------------------\n");
|
||||||
|
printf("SENDING PDU \n%s\n", print_buffer);
|
||||||
|
/* Print Buffer *******************************************************/
|
||||||
|
memset(print_buffer, 0, sizeof(print_buffer));
|
||||||
|
ret = smpp34_dumpBuf(print_buffer, sizeof(print_buffer),
|
||||||
|
local_buffer, local_buffer_len);
|
||||||
|
if( ret != 0 ){ printf("Error in smpp34_dumpBuf():%d:\n%s\n",
|
||||||
|
smpp34_errno, smpp34_strerror ); return( -1 ); };
|
||||||
|
printf("SENDING BUFFER \n%s\n", print_buffer);
|
||||||
|
/* Write to socket ****************************************************/
|
||||||
|
ret = send(sock_tcp, local_buffer, local_buffer_len, 0);
|
||||||
|
if( ret != local_buffer_len ){ printf("Error in send()\n");return( -1 );};
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
|
||||||
|
memset(local_buffer, 0, sizeof(local_buffer));
|
||||||
|
/* Read from socket (This is a sample, must be more complex) **********/
|
||||||
|
ret = recv(sock_tcp, local_buffer, 4, MSG_PEEK);
|
||||||
|
if( ret != 4 ){ printf("Error in recv(PEEK)\n");return( -1 );};
|
||||||
|
memcpy(&tempo, local_buffer, sizeof(uint32_t)); /* get lenght PDU */
|
||||||
|
local_buffer_len = ntohl( tempo );
|
||||||
|
ret = recv(sock_tcp, local_buffer, local_buffer_len, 0);
|
||||||
|
if( ret != local_buffer_len ){
|
||||||
|
printf("Error in recv(%d bytes)\n", local_buffer_len);return( -1 );};
|
||||||
|
/* Print Buffer *******************************************************/
|
||||||
|
memset(print_buffer, 0, sizeof(print_buffer));
|
||||||
|
ret = smpp34_dumpBuf(print_buffer, sizeof(print_buffer),
|
||||||
|
local_buffer, local_buffer_len);
|
||||||
|
if( ret != 0 ){ printf("Error in smpp34_dumpBuf():%d:\n%s\n",
|
||||||
|
smpp34_errno, smpp34_strerror ); return( -1 ); };
|
||||||
|
printf("-----------------------------------------------------------\n");
|
||||||
|
printf("RECEIVE BUFFER \n%s\n", print_buffer);
|
||||||
|
/* unpack PDU *********************************************************/
|
||||||
|
ret = smpp34_unpack2((void*)&res, local_buffer, local_buffer_len);
|
||||||
|
if( ret != 0){ printf( "Error in smpp34_unpack():%d:%s\n",
|
||||||
|
smpp34_errno, smpp34_strerror); return( -1 ); };
|
||||||
|
/* Print PDU **********************************************************/
|
||||||
|
memset(print_buffer, 0, sizeof(print_buffer));
|
||||||
|
ret = smpp34_dumpPdu2(print_buffer, sizeof(print_buffer), (void*)&res);
|
||||||
|
if( ret != 0){ printf("Error in smpp34_dumpPdu():%d:\n%s\n",
|
||||||
|
smpp34_errno, smpp34_strerror); return( -1 ); };
|
||||||
|
printf("RECEIVE PDU \n%s\n", print_buffer);
|
||||||
|
|
|
@ -0,0 +1,109 @@
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006 Raul Tremsal
|
||||||
|
* File : sendwp.c
|
||||||
|
* Author: Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
*
|
||||||
|
* This file is part of libsmpp34 (c-open-smpp3.4 library).
|
||||||
|
*
|
||||||
|
* The libsmpp34 library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <libxml/xmlmemory.h>
|
||||||
|
#include <libxml/parser.h>
|
||||||
|
|
||||||
|
#include "sendwp.h"
|
||||||
|
|
||||||
|
extern char *optarg;
|
||||||
|
char file_config[256];
|
||||||
|
xmlDocPtr d; /* document */
|
||||||
|
xmlNodePtr c; /* config */
|
||||||
|
xmlNodePtr conn_tcp; /* conn_tcp */
|
||||||
|
xmlNodePtr conn_smpp; /* conn_smpp */
|
||||||
|
xmlNodePtr smpp_msg; /* smpp_msg */
|
||||||
|
|
||||||
|
int sock_tcp = 0;
|
||||||
|
|
||||||
|
|
||||||
|
#define HELP_FORMAT " -c file.xml [-h]\n" \
|
||||||
|
" -c /path/to/file.xml: config file path.\n" \
|
||||||
|
" -h : Help, show this message.\n"
|
||||||
|
|
||||||
|
int main( int argc, char **argv )
|
||||||
|
{
|
||||||
|
int co;
|
||||||
|
int secuencia = 3;
|
||||||
|
|
||||||
|
while( (co = getopt(argc, argv, "c:h")) != EOF ){
|
||||||
|
switch( co ){
|
||||||
|
case 'c':
|
||||||
|
snprintf(file_config, sizeof(file_config), "%s", optarg);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
printf("Error: unrecognized option\n");
|
||||||
|
case 'h':
|
||||||
|
printf("usage: %s %s\n", argv[0], HELP_FORMAT);
|
||||||
|
return( -1 );
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if( strcmp(file_config, "") == 0 ){ printf("Error in parameters\n");
|
||||||
|
printf("usage: %s %s\n", argv[0], HELP_FORMAT); return( -1 ); };
|
||||||
|
d = xmlParseFile( file_config );
|
||||||
|
if( d == NULL ){ printf("Error in xmlParseFile()\n");
|
||||||
|
printf("usage: %s %s\n", argv[0], HELP_FORMAT); return( -1 ); };
|
||||||
|
c = xmlDocGetRootElement( d );
|
||||||
|
if( c == NULL ){ printf("Error in xmlDocGetRootElement()\n");
|
||||||
|
printf("usage: %s %s\n", argv[0], HELP_FORMAT); return( -1 ); };
|
||||||
|
|
||||||
|
XML_IN_NODE(c, "config", c=c->xmlChildrenNode;break;, return(-1); );
|
||||||
|
XML_IN_NODE(c, "conn_tcp", conn_tcp=c;break;, return(-1); );
|
||||||
|
XML_IN_NODE(c, "conn_smpp", conn_smpp=c;break;, return(-1); );
|
||||||
|
XML_IN_NODE(c, "smpp_msg", smpp_msg=c;break;, return(-1); );
|
||||||
|
|
||||||
|
/* do tcp connect */
|
||||||
|
if( do_tcp_connect( conn_tcp, &sock_tcp ) ){
|
||||||
|
printf("Error in tcp connect.\n"); goto lb_free_document; };
|
||||||
|
|
||||||
|
/* do smpp connect */
|
||||||
|
if( do_smpp_connect( conn_smpp, sock_tcp ) ){
|
||||||
|
printf("Error in smpp connect.\n"); goto lb_tcp_close; };
|
||||||
|
|
||||||
|
/* do smpp send message */
|
||||||
|
while( smpp_msg != NULL ){
|
||||||
|
if( do_smpp_send_message2( smpp_msg, sock_tcp, secuencia++ ) ){
|
||||||
|
printf("Error in smpp send message.\n");
|
||||||
|
goto lb_smpp_close;
|
||||||
|
};
|
||||||
|
smpp_msg = smpp_msg->next;
|
||||||
|
smpp_msg = smpp_msg->next;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
lb_smpp_close: /* do smpp close */
|
||||||
|
if( do_smpp_close( sock_tcp ) ) printf("Error in smpp close.\n");
|
||||||
|
|
||||||
|
lb_tcp_close: /* do tcp close */
|
||||||
|
if( do_tcp_close( sock_tcp ) ) printf("Error in tcp close.\n");
|
||||||
|
|
||||||
|
lb_free_document: /* free xml document */
|
||||||
|
xmlFreeDoc( d );
|
||||||
|
|
||||||
|
return( 0 );
|
||||||
|
};
|
|
@ -0,0 +1,68 @@
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006 Raul Tremsal
|
||||||
|
* File : sendwp.h
|
||||||
|
* Author: Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
*
|
||||||
|
* This file is part of libsmpp34 (c-open-smpp3.4 library).
|
||||||
|
*
|
||||||
|
* The libsmpp34 library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _sendwp_h_
|
||||||
|
#define _sendwp_h_
|
||||||
|
|
||||||
|
#define GET_PROP_INT( dst, c, src )\
|
||||||
|
{\
|
||||||
|
xmlChar *clave = NULL; dst = 0;\
|
||||||
|
if( (clave = xmlGetProp(c, (xmlChar*)src)) != NULL ){\
|
||||||
|
dst = strtol((char*)clave, NULL, 10);\
|
||||||
|
xmlFree( clave );\
|
||||||
|
}\
|
||||||
|
};
|
||||||
|
|
||||||
|
#define GET_PROP_STR( dst, c, src )\
|
||||||
|
{\
|
||||||
|
xmlChar *clave = NULL;\
|
||||||
|
memset(dst, 0, sizeof(dst));\
|
||||||
|
if( (clave = xmlGetProp(c, (xmlChar*)src)) != NULL ){\
|
||||||
|
snprintf((char*)dst, sizeof(dst), "%s", (char*)clave);\
|
||||||
|
xmlFree( clave );\
|
||||||
|
}\
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define _xmlChar( str ) (const xmlChar*) str
|
||||||
|
#define XML_IN_NODE( c, str, exito, fracaso )\
|
||||||
|
while( c != NULL ){\
|
||||||
|
if( xmlStrcmp(c->name, _xmlChar(str)) == 0 ){\
|
||||||
|
exito;\
|
||||||
|
};\
|
||||||
|
c = c->next;\
|
||||||
|
};\
|
||||||
|
if( c == NULL ){\
|
||||||
|
printf("Can't find tag <%s>.", str);\
|
||||||
|
fracaso;\
|
||||||
|
};
|
||||||
|
|
||||||
|
int do_tcp_connect( xmlNodePtr p, int *sock_tcp );
|
||||||
|
int do_tcp_close( int sock_tcp );
|
||||||
|
int do_smpp_connect( xmlNodePtr p, int sock_tcp );
|
||||||
|
int do_smpp_send_message( xmlNodePtr p, int sock_tcp );
|
||||||
|
int do_smpp_send_message2( xmlNodePtr p, int sock_tcp, int sequence );
|
||||||
|
int do_smpp_close( int sock_tcp );
|
||||||
|
#endif /* _sendwp_h_ */
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<config>
|
||||||
|
<conn_tcp host="192.168.0.27" port="6060"/>
|
||||||
|
<conn_smpp system_id="test" password="test" system_type="test"/>
|
||||||
|
|
||||||
|
<smpp_msg src="5565" dst="0911110000" esm_class = "64" data_coding="245"
|
||||||
|
hex="0b05040b8423f00003500201500601ae02056a0045c60c037761702e74696178612e636f6d00070103546578746f206465207072756562612c20546578746f206465207072756562612c20546578746f206465207072756562612c20546578746f206465207072756562612c20546578746f206465207072756562612c20546578746f206465207072756562"/>
|
||||||
|
|
||||||
|
<smpp_msg src="5565" dst="0911110000" esm_class = "64" data_coding="245"
|
||||||
|
hex="0b05040b8423f00003500202612c20546578746f206465207072756562612e000101"/>
|
||||||
|
|
||||||
|
</config>
|
|
@ -0,0 +1,289 @@
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006 Raul Tremsal
|
||||||
|
* File : smpp.c
|
||||||
|
* Author: Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
*
|
||||||
|
* This file is part of libsmpp34 (c-open-smpp3.4 library).
|
||||||
|
*
|
||||||
|
* The libsmpp34 library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#include <libxml/xmlmemory.h>
|
||||||
|
#include <libxml/parser.h>
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "smpp34.h"
|
||||||
|
#include "smpp34_structs.h"
|
||||||
|
#include "smpp34_params.h"
|
||||||
|
|
||||||
|
#include "esme.h"
|
||||||
|
|
||||||
|
extern int smpp34_errno;
|
||||||
|
extern char smpp34_strerror[2048];
|
||||||
|
|
||||||
|
uint8_t print_buffer[2048];
|
||||||
|
uint8_t local_buffer[1024];
|
||||||
|
int local_buffer_len = 0;
|
||||||
|
int ret = 0;
|
||||||
|
uint32_t tempo = 0;
|
||||||
|
uint32_t cmd_id = 0;
|
||||||
|
|
||||||
|
int unhex(char c) {
|
||||||
|
if (c >= '0' && c <= '9')
|
||||||
|
return (c - '0');
|
||||||
|
if (c >= 'a' && c <= 'f')
|
||||||
|
return (c - 'a' + 10);
|
||||||
|
if (c >= 'A' && c <= 'F')
|
||||||
|
return (c - 'A' + 10);
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
int hex2bin(char *hex, unsigned char *bin) {
|
||||||
|
int i = 0;
|
||||||
|
int j = 0;
|
||||||
|
|
||||||
|
/* Trim string if comments present */
|
||||||
|
if (strchr(hex, '#') != NULL)
|
||||||
|
*strchr(hex, '#') = 0;
|
||||||
|
if (strchr(hex, '*') != NULL)
|
||||||
|
*strchr(hex, '*') = 0;
|
||||||
|
if (strchr(hex, '\'') != NULL)
|
||||||
|
*strchr(hex, '\'') = 0;
|
||||||
|
|
||||||
|
for (i = 0; i < strlen(hex); i++) {
|
||||||
|
if (hex[i] >= '0' && unhex(hex[i]) < 0){
|
||||||
|
printf("Bad hex digit encountered.\n");
|
||||||
|
return( -1 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < strlen(hex); i++) {
|
||||||
|
if (hex[i] < '0')
|
||||||
|
continue;
|
||||||
|
if (hex[i] >= '0' && hex[i+1] >= '0') {
|
||||||
|
bin[j++] = unhex(hex[i])*16+unhex(hex[i+1]);
|
||||||
|
i++; // skip one
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (hex[i] >= '0') {
|
||||||
|
bin[j++] = unhex(hex[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (j);
|
||||||
|
}
|
||||||
|
|
||||||
|
int do_smpp_connect( xmlNodePtr p, int sock_tcp )
|
||||||
|
{
|
||||||
|
bind_transmitter_t req;
|
||||||
|
bind_transmitter_resp_t res;
|
||||||
|
memset(&req, 0, sizeof(bind_transmitter_t));
|
||||||
|
memset(&res, 0, sizeof(bind_transmitter_resp_t));
|
||||||
|
|
||||||
|
/* Init PDU ***********************************************************/
|
||||||
|
req.command_length = 0;
|
||||||
|
req.command_id = BIND_TRANSMITTER;
|
||||||
|
req.command_status = ESME_ROK;
|
||||||
|
req.sequence_number = 1;
|
||||||
|
GET_PROP_STR( req.system_id, p, "system_id" );
|
||||||
|
GET_PROP_STR( req.password, p, "password" );
|
||||||
|
GET_PROP_STR( req.system_type, p, "system_type" );
|
||||||
|
req.interface_version = SMPP_VERSION;
|
||||||
|
#if 0 /* if you need add */
|
||||||
|
req.addr_ton = 2;
|
||||||
|
req.addr_npi = 1;
|
||||||
|
snprintf( b.address_range, sizeof(b.address_range), "%s", "");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* FIRST STEP: PACK AND SEND */
|
||||||
|
#include "pack_and_send.inc"
|
||||||
|
/* Set a timer (PENDIENTE) ********************************************/
|
||||||
|
/* SECOND STEP: READ AND UNPACK Response */
|
||||||
|
#include "recv_and_unpack.inc"
|
||||||
|
destroy_tlv( res.tlv ); /* Por las dudas */
|
||||||
|
|
||||||
|
if( res.command_id != BIND_TRANSMITTER_RESP ||
|
||||||
|
res.command_status != ESME_ROK ){
|
||||||
|
printf("Error in BIND(BIND_TRANSMITTER)[%d:%d]\n",
|
||||||
|
res.command_id, res.command_status);
|
||||||
|
return( -1 );
|
||||||
|
};
|
||||||
|
return( 0 );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
int do_smpp_send_message( xmlNodePtr p, int sock_tcp )
|
||||||
|
{
|
||||||
|
|
||||||
|
char message[256];
|
||||||
|
tlv_t tlv;
|
||||||
|
submit_sm_t req;
|
||||||
|
submit_sm_resp_t res;
|
||||||
|
memset(&req, 0, sizeof(submit_sm_t));
|
||||||
|
memset(&res, 0, sizeof(submit_sm_resp_t));
|
||||||
|
|
||||||
|
/* Init PDU ***********************************************************/
|
||||||
|
req.command_length = 0;
|
||||||
|
req.command_id = SUBMIT_SM;
|
||||||
|
req.command_status = ESME_ROK;
|
||||||
|
req.sequence_number = 2;
|
||||||
|
#if 0 /* if you need this */
|
||||||
|
snprintf(b.service_type, sizeof(b.service_type), "%s", "SMS");
|
||||||
|
b.source_addr_ton = 2;
|
||||||
|
b.source_addr_npi = 1;
|
||||||
|
#endif
|
||||||
|
GET_PROP_STR( req.source_addr, p, "src" );
|
||||||
|
#if 0 /* if you need this */
|
||||||
|
b.dest_addr_ton = 2;
|
||||||
|
b.dest_addr_npi = 0;
|
||||||
|
#endif
|
||||||
|
GET_PROP_STR( req.destination_addr, p, "dst" );
|
||||||
|
#if 0 /* if you need this */
|
||||||
|
b.esm_class = 0;
|
||||||
|
b.protocol_id = 0;
|
||||||
|
b.priority_flag = 0;
|
||||||
|
snprintf( b.schedule_delivery_time, TIME_LENGTH, "%s", "");
|
||||||
|
snprintf( b.validity_period, TIME_LENGTH, "%s", "");
|
||||||
|
b.registered_delivery = 0;
|
||||||
|
b.replace_if_present_flag =0;
|
||||||
|
b.data_coding = 0;
|
||||||
|
b.sm_default_msg_id = 0;
|
||||||
|
#endif
|
||||||
|
GET_PROP_STR( message, p, "msg" );
|
||||||
|
|
||||||
|
#if 0 /* Message in short_message scope */
|
||||||
|
b.sm_length = strlen(TEXTO);
|
||||||
|
memcpy(b.short_message, TEXTO, b.sm_length);
|
||||||
|
#else /* Message in Payload */
|
||||||
|
tlv.tag = TLVID_message_payload;
|
||||||
|
tlv.length = strlen(message);
|
||||||
|
memcpy(tlv.value.octet, message, tlv.length);
|
||||||
|
build_tlv( &(req.tlv), &tlv );
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Add other optional param */
|
||||||
|
tlv.tag = TLVID_user_message_reference;
|
||||||
|
tlv.length = sizeof(uint16_t);
|
||||||
|
tlv.value.val16 = 0x0024;
|
||||||
|
build_tlv( &(req.tlv), &tlv );
|
||||||
|
|
||||||
|
/* FIRST STEP: PACK AND SEND */
|
||||||
|
#include "pack_and_send.inc"
|
||||||
|
destroy_tlv( req.tlv ); /* Por las dudas */
|
||||||
|
/* Set a timer (PENDIENTE) ********************************************/
|
||||||
|
/* SECOND STEP: READ AND UNPACK Response */
|
||||||
|
#include "recv_and_unpack.inc"
|
||||||
|
|
||||||
|
if( res.command_id != SUBMIT_SM_RESP ||
|
||||||
|
res.command_status != ESME_ROK ){
|
||||||
|
printf("Error in send(SUBMIT_SM)[%08X:%08X]\n",
|
||||||
|
res.command_id, res.command_status);
|
||||||
|
return( -1 );
|
||||||
|
};
|
||||||
|
return( 0 );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
int do_smpp_send_message2( xmlNodePtr p, int sock_tcp, int sequence )
|
||||||
|
{
|
||||||
|
|
||||||
|
char message[512];
|
||||||
|
submit_sm_t req;
|
||||||
|
submit_sm_resp_t res;
|
||||||
|
memset(&req, 0, sizeof(submit_sm_t));
|
||||||
|
memset(&res, 0, sizeof(submit_sm_resp_t));
|
||||||
|
|
||||||
|
/* Init PDU ***********************************************************/
|
||||||
|
req.command_length = 0;
|
||||||
|
req.command_id = SUBMIT_SM;
|
||||||
|
req.command_status = ESME_ROK;
|
||||||
|
req.sequence_number = sequence;
|
||||||
|
GET_PROP_STR( req.service_type, p, "service_type" );
|
||||||
|
|
||||||
|
GET_PROP_INT( req.source_addr_ton, p, "source_addr_ton" );
|
||||||
|
GET_PROP_INT( req.source_addr_npi, p, "source_addr_npi" );
|
||||||
|
GET_PROP_STR( req.source_addr, p, "src" );
|
||||||
|
|
||||||
|
GET_PROP_INT( req.dest_addr_ton, p, "dest_addr_ton" );
|
||||||
|
GET_PROP_INT( req.dest_addr_npi, p, "dest_addr_npi" );
|
||||||
|
GET_PROP_STR( req.destination_addr, p, "dst" );
|
||||||
|
|
||||||
|
GET_PROP_INT( req.esm_class, p, "esm_class" );
|
||||||
|
GET_PROP_INT( req.protocol_id, p, "protocol_id" );
|
||||||
|
GET_PROP_INT( req.priority_flag, p, "priority_flag" );
|
||||||
|
GET_PROP_STR( req.schedule_delivery_time, p, "schedule_delivery_time" );
|
||||||
|
GET_PROP_STR( req.validity_period, p, "validity_period" );
|
||||||
|
GET_PROP_INT( req.registered_delivery, p, "registered_delivery" );
|
||||||
|
GET_PROP_INT( req.replace_if_present_flag, p, "replace_if_present_flag" );
|
||||||
|
GET_PROP_INT( req.data_coding, p, "data_coding" );
|
||||||
|
GET_PROP_INT( req.sm_default_msg_id, p, "sm_default_msg_id" );
|
||||||
|
GET_PROP_STR( message, p, "hex" );
|
||||||
|
req.sm_length = hex2bin(message, req.short_message);
|
||||||
|
|
||||||
|
/* FIRST STEP: PACK AND SEND */
|
||||||
|
#include "pack_and_send.inc"
|
||||||
|
destroy_tlv( req.tlv ); /* Por las dudas */
|
||||||
|
/* Set a timer (PENDIENTE) ********************************************/
|
||||||
|
/* SECOND STEP: READ AND UNPACK Response */
|
||||||
|
#include "recv_and_unpack.inc"
|
||||||
|
|
||||||
|
if( res.command_id != SUBMIT_SM_RESP ||
|
||||||
|
res.command_status != ESME_ROK ){
|
||||||
|
printf("Error in send(SUBMIT_SM)[%d:%d]\n",
|
||||||
|
res.command_id, res.command_status);
|
||||||
|
return( -1 );
|
||||||
|
};
|
||||||
|
return( 0 );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
int do_smpp_close( int sock_tcp )
|
||||||
|
{
|
||||||
|
unbind_t req;
|
||||||
|
unbind_resp_t res;
|
||||||
|
memset(&req, 0, sizeof(unbind_t));
|
||||||
|
memset(&res, 0, sizeof(unbind_resp_t));
|
||||||
|
|
||||||
|
/* Init PDU ***********************************************************/
|
||||||
|
req.command_length = 0;
|
||||||
|
req.command_id = UNBIND;
|
||||||
|
req.command_status = ESME_ROK;
|
||||||
|
req.sequence_number = 3;
|
||||||
|
|
||||||
|
/* FIRST STEP: PACK AND SEND */
|
||||||
|
#include "pack_and_send.inc"
|
||||||
|
/* Set a timer (PENDIENTE) ********************************************/
|
||||||
|
/* SECOND STEP: READ AND UNPACK Response */
|
||||||
|
#include "recv_and_unpack.inc"
|
||||||
|
|
||||||
|
if( res.command_id != UNBIND_RESP ||
|
||||||
|
res.command_status != ESME_ROK ){
|
||||||
|
printf("Error in send(UNBIND)[%d:%d]\n",
|
||||||
|
res.command_id, res.command_status);
|
||||||
|
return( -1 );
|
||||||
|
};
|
||||||
|
|
||||||
|
return( 0 );
|
||||||
|
};
|
|
@ -0,0 +1,94 @@
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006 Raul Tremsal
|
||||||
|
* File : tcp.c
|
||||||
|
* Author: Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
*
|
||||||
|
* This file is part of libsmpp34 (c-open-smpp3.4 library).
|
||||||
|
*
|
||||||
|
* The libsmpp34 library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <netdb.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <libxml/xmlmemory.h>
|
||||||
|
#include <libxml/parser.h>
|
||||||
|
|
||||||
|
#include "esme.h"
|
||||||
|
|
||||||
|
int do_tcp_connect( xmlNodePtr p, int *s )
|
||||||
|
{
|
||||||
|
int ret = 0;
|
||||||
|
int n = 1;
|
||||||
|
struct hostent _host;
|
||||||
|
#ifdef __linux__
|
||||||
|
struct hostent *__host_result;
|
||||||
|
#endif
|
||||||
|
struct in_addr addr;
|
||||||
|
struct sockaddr_in name;
|
||||||
|
|
||||||
|
char h[256];
|
||||||
|
char ahost[1024];
|
||||||
|
int port = 0;
|
||||||
|
|
||||||
|
|
||||||
|
GET_PROP_STR(h, p, "host");
|
||||||
|
GET_PROP_INT(port, p, "port");
|
||||||
|
|
||||||
|
if((*s = socket(AF_INET, SOCK_STREAM, 0)) == -1){
|
||||||
|
printf("Error in socket()\n");
|
||||||
|
ret = -1; goto lb_tcp_connect_end;
|
||||||
|
};
|
||||||
|
if( setsockopt(*s, SOL_SOCKET, SO_REUSEADDR, (char*)&n, sizeof(n)) == -1){
|
||||||
|
printf("Error in setsockopt().\n");
|
||||||
|
ret = -1; goto lb_tcp_connect_end;
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
if( gethostbyname_r(h,&_host,ahost,sizeof(ahost),&__host_result,&n) != 0)
|
||||||
|
#else /* solaris */
|
||||||
|
if( gethostbyname_r(h,&_host,ahost,sizeof(ahost),&n) == NULL)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
printf("Error in gethostbyname_r().\n");
|
||||||
|
ret = -1; goto lb_tcp_connect_end;
|
||||||
|
};
|
||||||
|
|
||||||
|
memcpy(&addr.s_addr, _host.h_addr_list[0], sizeof(struct in_addr));
|
||||||
|
name.sin_family = AF_INET;
|
||||||
|
name.sin_port = htons( port );
|
||||||
|
name.sin_addr = addr;
|
||||||
|
|
||||||
|
if(connect(*s,(struct sockaddr *)&name,sizeof(name)) != 0){
|
||||||
|
printf("Error in connect(%s:%d)\n", h, port);
|
||||||
|
ret = -1; goto lb_tcp_connect_end;
|
||||||
|
};
|
||||||
|
|
||||||
|
lb_tcp_connect_end:
|
||||||
|
return( ret );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
int do_tcp_close( int sock_tcp )
|
||||||
|
{
|
||||||
|
|
||||||
|
close( sock_tcp );
|
||||||
|
return( 0 );
|
||||||
|
};
|
|
@ -0,0 +1,113 @@
|
||||||
|
# test_pdu/Makefile.am #
|
||||||
|
TESTPDU_SOURCE_DIR = $(top_srcdir)/test_pdu
|
||||||
|
|
||||||
|
submit_multi_resp_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/submit_multi_resp_test.c
|
||||||
|
|
||||||
|
submit_multi_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/submit_multi_test.c
|
||||||
|
|
||||||
|
alert_notification_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/alert_notification_test.c
|
||||||
|
|
||||||
|
bind_receiver_resp_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/bind_receiver_resp_test.c
|
||||||
|
|
||||||
|
bind_receiver_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/bind_receiver_test.c
|
||||||
|
|
||||||
|
bind_transceiver_resp_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/bind_transceiver_resp_test.c
|
||||||
|
|
||||||
|
bind_transceiver_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/bind_transceiver_test.c
|
||||||
|
|
||||||
|
bind_transmitter_resp_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/bind_transmitter_resp_test.c
|
||||||
|
|
||||||
|
bind_transmitter_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/bind_transmitter_test.c
|
||||||
|
|
||||||
|
cancel_sm_resp_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/cancel_sm_resp_test.c
|
||||||
|
|
||||||
|
cancel_sm_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/cancel_sm_test.c
|
||||||
|
|
||||||
|
data_sm_resp_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/data_sm_resp_test.c
|
||||||
|
|
||||||
|
data_sm_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/data_sm_test.c
|
||||||
|
|
||||||
|
deliver_sm_resp_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/deliver_sm_resp_test.c
|
||||||
|
|
||||||
|
deliver_sm_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/deliver_sm_test.c
|
||||||
|
|
||||||
|
enquire_link_resp_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/enquire_link_resp_test.c
|
||||||
|
|
||||||
|
enquire_link_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/enquire_link_test.c
|
||||||
|
|
||||||
|
generic_nack_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/generic_nack_test.c
|
||||||
|
|
||||||
|
outbind_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/outbind_test.c
|
||||||
|
|
||||||
|
query_sm_resp_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/query_sm_resp_test.c
|
||||||
|
|
||||||
|
query_sm_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/query_sm_test.c
|
||||||
|
|
||||||
|
replace_sm_resp_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/replace_sm_resp_test.c
|
||||||
|
|
||||||
|
replace_sm_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/replace_sm_test.c
|
||||||
|
|
||||||
|
submit_sm_resp_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/submit_sm_resp_test.c
|
||||||
|
|
||||||
|
submit_sm_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/submit_sm_test.c
|
||||||
|
|
||||||
|
unbind_resp_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/unbind_resp_test.c
|
||||||
|
|
||||||
|
unbind_test_SOURCES = \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/core.c \
|
||||||
|
$(TESTPDU_SOURCE_DIR)/unbind_test.c
|
||||||
|
|
||||||
|
noinst_HEADERS = $(TESTPDU_SOURCE_DIR)/core.h
|
||||||
|
|
|
@ -0,0 +1,74 @@
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006 Raul Tremsal
|
||||||
|
* File : alert_notification_test.c
|
||||||
|
* Author: Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
*
|
||||||
|
* This file is part of libsmpp34 (c-open-smpp3.4 library).
|
||||||
|
*
|
||||||
|
* The libsmpp34 library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
#include "smpp34.h"
|
||||||
|
#include "smpp34_structs.h"
|
||||||
|
#include "smpp34_params.h"
|
||||||
|
#include "core.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define TEXTO "Raul Antonio Tremsal"
|
||||||
|
int
|
||||||
|
main( int argc, char *argv[] )
|
||||||
|
{
|
||||||
|
|
||||||
|
alert_notification_t a;
|
||||||
|
alert_notification_t b;
|
||||||
|
tlv_t tlv;
|
||||||
|
|
||||||
|
memset(&a, 0, sizeof(alert_notification_t));
|
||||||
|
memset(&b, 0, sizeof(alert_notification_t));
|
||||||
|
memset(&tlv, 0, sizeof(tlv_t));
|
||||||
|
|
||||||
|
/* Init PDU ***********************************************************/
|
||||||
|
b.command_length = 0;
|
||||||
|
b.command_id = ALERT_NOTIFICATION;
|
||||||
|
b.command_status = ESME_ROK;
|
||||||
|
b.sequence_number = 1;
|
||||||
|
b.source_addr_ton = 2;
|
||||||
|
b.source_addr_npi = 1;
|
||||||
|
snprintf((char*)b.source_addr, ADDRESS_LENGTH, "%s", "0900001111");
|
||||||
|
b.esme_addr_ton = 2;
|
||||||
|
b.esme_addr_npi = 1;
|
||||||
|
snprintf((char*)b.esme_addr, ADDRESS_LENGTH, "%s", "0900001111");
|
||||||
|
|
||||||
|
tlv.tag = TLVID_ms_availability_status; /* defined in smpp34.h */
|
||||||
|
tlv.length = sizeof(uint8_t);
|
||||||
|
tlv.value.val08 = 0x24;
|
||||||
|
build_tlv( &(b.tlv), &tlv );
|
||||||
|
|
||||||
|
doTest(ALERT_NOTIFICATION, &a, &b);
|
||||||
|
destroy_tlv( b.tlv );
|
||||||
|
destroy_tlv( a.tlv );
|
||||||
|
|
||||||
|
return( 0 );
|
||||||
|
};
|
|
@ -0,0 +1,69 @@
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006 Raul Tremsal
|
||||||
|
* File : bind_receiver_resp_test.c
|
||||||
|
* Author: Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
*
|
||||||
|
* This file is part of libsmpp34 (c-open-smpp3.4 library).
|
||||||
|
*
|
||||||
|
* The libsmpp34 library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "smpp34.h"
|
||||||
|
#include "smpp34_structs.h"
|
||||||
|
#include "smpp34_params.h"
|
||||||
|
#include "core.h"
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main( int argc, char *argv[] )
|
||||||
|
{
|
||||||
|
|
||||||
|
bind_receiver_resp_t a;
|
||||||
|
bind_receiver_resp_t b;
|
||||||
|
tlv_t tlv;
|
||||||
|
|
||||||
|
memset(&b, 0, sizeof(bind_receiver_resp_t));
|
||||||
|
memset(&a, 0, sizeof(bind_receiver_resp_t));
|
||||||
|
memset(&tlv, 0, sizeof(tlv_t));
|
||||||
|
|
||||||
|
/* Init PDU ***********************************************************/
|
||||||
|
b.command_length = 0;
|
||||||
|
b.command_id = BIND_RECEIVER_RESP;
|
||||||
|
b.command_status = ESME_ROK;
|
||||||
|
b.sequence_number = 1;
|
||||||
|
snprintf((char*)b.system_id, sizeof(b.system_id), "%s", "1234567890123456");
|
||||||
|
|
||||||
|
tlv.tag = TLVID_sc_interface_version;
|
||||||
|
tlv.length = sizeof(uint8_t);
|
||||||
|
tlv.value.val16 = 0x34;
|
||||||
|
build_tlv( &(b.tlv), &tlv );
|
||||||
|
|
||||||
|
doTest(BIND_RECEIVER_RESP, &a, &b);
|
||||||
|
destroy_tlv( b.tlv );
|
||||||
|
destroy_tlv( a.tlv );
|
||||||
|
|
||||||
|
return( 0 );
|
||||||
|
};
|
|
@ -0,0 +1,65 @@
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006 Raul Tremsal
|
||||||
|
* File : bind_receiver_test.c
|
||||||
|
* Author: Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
*
|
||||||
|
* This file is part of libsmpp34 (c-open-smpp3.4 library).
|
||||||
|
*
|
||||||
|
* The libsmpp34 library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "smpp34.h"
|
||||||
|
#include "smpp34_structs.h"
|
||||||
|
#include "smpp34_params.h"
|
||||||
|
#include "core.h"
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main( int argc, char *argv[] )
|
||||||
|
{
|
||||||
|
|
||||||
|
bind_receiver_t a;
|
||||||
|
bind_receiver_t b;
|
||||||
|
|
||||||
|
memset(&a, 0, sizeof(bind_receiver_t));
|
||||||
|
memset(&b, 0, sizeof(bind_receiver_t));
|
||||||
|
|
||||||
|
/* Init PDU ***********************************************************/
|
||||||
|
b.command_length = 0;
|
||||||
|
b.command_id = BIND_RECEIVER;
|
||||||
|
b.command_status = ESME_ROK;
|
||||||
|
b.sequence_number = 1;
|
||||||
|
snprintf((char*)b.system_id, sizeof(b.system_id), "%s", "system_id");
|
||||||
|
snprintf((char*)b.password, sizeof(b.password), "%s", "pass");
|
||||||
|
snprintf((char*)b.system_type, sizeof(b.system_type), "%s", "syste");
|
||||||
|
b.addr_ton = 0x34;
|
||||||
|
b.addr_ton = 2;
|
||||||
|
b.addr_npi = 1;
|
||||||
|
snprintf((char*)b.address_range, sizeof(b.address_range), "%s", "address_range");
|
||||||
|
|
||||||
|
doTest(BIND_RECEIVER, &a, &b);
|
||||||
|
return( 0 );
|
||||||
|
};
|
|
@ -0,0 +1,69 @@
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006 Raul Tremsal
|
||||||
|
* File : bind_transceiver_resp_test.c
|
||||||
|
* Author: Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
*
|
||||||
|
* This file is part of libsmpp34 (c-open-smpp3.4 library).
|
||||||
|
*
|
||||||
|
* The libsmpp34 library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "smpp34.h"
|
||||||
|
#include "smpp34_structs.h"
|
||||||
|
#include "smpp34_params.h"
|
||||||
|
#include "core.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define TEXTO "Raul Antonio Tremsal"
|
||||||
|
|
||||||
|
int
|
||||||
|
main( int argc, char *argv[] )
|
||||||
|
{
|
||||||
|
bind_transceiver_resp_t a;
|
||||||
|
bind_transceiver_resp_t b;
|
||||||
|
tlv_t tlv;
|
||||||
|
|
||||||
|
memset(&a, 0, sizeof(bind_transceiver_resp_t));
|
||||||
|
memset(&b, 0, sizeof(bind_transceiver_resp_t));
|
||||||
|
memset(&tlv, 0, sizeof(tlv));
|
||||||
|
|
||||||
|
/* Init PDU ***********************************************************/
|
||||||
|
b.command_length = 0;
|
||||||
|
b.command_id = BIND_TRANSCEIVER_RESP;
|
||||||
|
b.command_status = ESME_ROK;
|
||||||
|
b.sequence_number = 1;
|
||||||
|
snprintf((char*)b.system_id, sizeof(b.system_id), "%s", "system_id");
|
||||||
|
|
||||||
|
tlv.tag = TLVID_sc_interface_version;
|
||||||
|
tlv.length = sizeof(uint8_t);
|
||||||
|
tlv.value.val16 = 0x34;
|
||||||
|
build_tlv( &(b.tlv), &tlv );
|
||||||
|
|
||||||
|
doTest(BIND_TRANSCEIVER_RESP, &a, &b);
|
||||||
|
destroy_tlv( b.tlv );
|
||||||
|
destroy_tlv( a.tlv );
|
||||||
|
return( 0 );
|
||||||
|
};
|
|
@ -0,0 +1,64 @@
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006 Raul Tremsal
|
||||||
|
* File : bind_transceiver_test.c
|
||||||
|
* Author: Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
*
|
||||||
|
* This file is part of libsmpp34 (c-open-smpp3.4 library).
|
||||||
|
*
|
||||||
|
* The libsmpp34 library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "smpp34.h"
|
||||||
|
#include "smpp34_structs.h"
|
||||||
|
#include "smpp34_params.h"
|
||||||
|
#include "core.h"
|
||||||
|
|
||||||
|
int
|
||||||
|
main( int argc, char *argv[] )
|
||||||
|
{
|
||||||
|
|
||||||
|
bind_transceiver_t a;
|
||||||
|
bind_transceiver_t b;
|
||||||
|
|
||||||
|
memset(&a, 0, sizeof(bind_transceiver_t));
|
||||||
|
memset(&b, 0, sizeof(bind_transceiver_t));
|
||||||
|
|
||||||
|
/* Init PDU ***********************************************************/
|
||||||
|
b.command_length = 0;
|
||||||
|
b.command_id = BIND_TRANSCEIVER;
|
||||||
|
b.command_status = ESME_ROK;
|
||||||
|
b.sequence_number = 1;
|
||||||
|
snprintf((char*)b.system_id, sizeof(b.system_id), "%s", "system_id");
|
||||||
|
snprintf((char*)b.password, sizeof(b.password), "%s", "pas");
|
||||||
|
snprintf((char*)b.system_type, sizeof(b.system_type), "%s", "syst");
|
||||||
|
b.interface_version= 0x34;
|
||||||
|
b.addr_ton = 2;
|
||||||
|
b.addr_npi = 1;
|
||||||
|
snprintf((char*)b.address_range, sizeof(b.address_range), "%s", "address_range");
|
||||||
|
|
||||||
|
doTest(BIND_TRANSCEIVER, &a, &b);
|
||||||
|
return( 0 );
|
||||||
|
};
|
|
@ -0,0 +1,68 @@
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006 Raul Tremsal
|
||||||
|
* File : bind_transmitter_resp_test.c
|
||||||
|
* Author: Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
*
|
||||||
|
* This file is part of libsmpp34 (c-open-smpp3.4 library).
|
||||||
|
*
|
||||||
|
* The libsmpp34 library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "smpp34.h"
|
||||||
|
#include "smpp34_structs.h"
|
||||||
|
#include "smpp34_params.h"
|
||||||
|
#include "core.h"
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main( int argc, char *argv[] )
|
||||||
|
{
|
||||||
|
|
||||||
|
bind_transmitter_resp_t a;
|
||||||
|
bind_transmitter_resp_t b;
|
||||||
|
tlv_t tlv;
|
||||||
|
|
||||||
|
memset(&a, 0, sizeof(bind_transmitter_resp_t));
|
||||||
|
memset(&b, 0, sizeof(bind_transmitter_resp_t));
|
||||||
|
memset(&tlv, 0, sizeof(tlv_t));
|
||||||
|
|
||||||
|
/* Init PDU ***********************************************************/
|
||||||
|
b.command_length = 0;
|
||||||
|
b.command_id = BIND_TRANSMITTER_RESP;
|
||||||
|
b.command_status = ESME_ROK;
|
||||||
|
b.sequence_number = 1;
|
||||||
|
snprintf((char*)b.system_id, sizeof(b.system_id), "%s", "system_id");
|
||||||
|
|
||||||
|
tlv.tag = TLVID_sc_interface_version;
|
||||||
|
tlv.length = sizeof(uint8_t);
|
||||||
|
tlv.value.val16 = 0x34;
|
||||||
|
build_tlv( &(b.tlv), &tlv );
|
||||||
|
|
||||||
|
doTest(BIND_TRANSMITTER_RESP, &a, &b);
|
||||||
|
destroy_tlv( b.tlv );
|
||||||
|
destroy_tlv( a.tlv );
|
||||||
|
return( 0 );
|
||||||
|
};
|
|
@ -0,0 +1,64 @@
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006 Raul Tremsal
|
||||||
|
* File : bind_transmitter_test.c
|
||||||
|
* Author: Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
*
|
||||||
|
* This file is part of libsmpp34 (c-open-smpp3.4 library).
|
||||||
|
*
|
||||||
|
* The libsmpp34 library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "smpp34.h"
|
||||||
|
#include "smpp34_structs.h"
|
||||||
|
#include "smpp34_params.h"
|
||||||
|
#include "core.h"
|
||||||
|
|
||||||
|
int
|
||||||
|
main( int argc, char *argv[] )
|
||||||
|
{
|
||||||
|
|
||||||
|
bind_transmitter_t a;
|
||||||
|
bind_transmitter_t b;
|
||||||
|
|
||||||
|
memset(&a, 0, sizeof(bind_transmitter_t));
|
||||||
|
memset(&b, 0, sizeof(bind_transmitter_t));
|
||||||
|
|
||||||
|
/* Init PDU ***********************************************************/
|
||||||
|
b.command_length = 0;
|
||||||
|
b.command_id = BIND_TRANSMITTER;
|
||||||
|
b.command_status = ESME_ROK;
|
||||||
|
b.sequence_number = 1;
|
||||||
|
snprintf((char*)b.system_id, sizeof(b.system_id), "%s", "system_id");
|
||||||
|
snprintf((char*)b.password, sizeof(b.password), "%s", "pass");
|
||||||
|
snprintf((char*)b.system_type, sizeof(b.system_type), "%s", "syst");
|
||||||
|
b.interface_version = 0x34;
|
||||||
|
b.addr_ton = 2;
|
||||||
|
b.addr_npi = 1;
|
||||||
|
snprintf((char*)b.address_range, sizeof(b.address_range), "%s", "address_range");
|
||||||
|
|
||||||
|
doTest(BIND_TRANSMITTER, &a, &b);
|
||||||
|
return( 0 );
|
||||||
|
};
|
|
@ -0,0 +1,58 @@
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006 Raul Tremsal
|
||||||
|
* File : cancel_sm_resp_test.c
|
||||||
|
* Author: Raul Tremsal <ultraismo@yahoo.com>
|
||||||
|
*
|
||||||
|
* This file is part of libsmpp34 (c-open-smpp3.4 library).
|
||||||
|
*
|
||||||
|
* The libsmpp34 library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "smpp34.h"
|
||||||
|
#include "smpp34_structs.h"
|
||||||
|
#include "smpp34_params.h"
|
||||||
|
#include "core.h"
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main( int argc, char *argv[] )
|
||||||
|
{
|
||||||
|
|
||||||
|
cancel_sm_resp_t a;
|
||||||
|
cancel_sm_resp_t b;
|
||||||
|
|
||||||
|
memset(&a, 0, sizeof(cancel_sm_resp_t));
|
||||||
|
memset(&b, 0, sizeof(cancel_sm_resp_t));
|
||||||
|
|
||||||
|
/* Init PDU ***********************************************************/
|
||||||
|
b.command_length = 0;
|
||||||
|
b.command_id = CANCEL_SM_RESP;
|
||||||
|
b.command_status = ESME_ROK;
|
||||||
|
b.sequence_number = 1;
|
||||||
|
|
||||||
|
doTest(CANCEL_SM_RESP, &a, &b);
|
||||||
|
return( 0 );
|
||||||
|
};
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue