renamed openair-cn to openair3

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7886 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
gauthier
2015-10-06 16:53:42 +00:00
parent c7518ecf42
commit 7b5431a62c
705 changed files with 206 additions and 208 deletions
+674
View File
@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If 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 convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+674
View File
@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If 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 convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+674
View File
@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If 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 convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
@@ -0,0 +1,232 @@
-- **************************************************************
--
-- Common definitions
--
-- **************************************************************
S1AP-CommonDataTypes {
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-CommonDataTypes (3) }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
S1ap-Criticality ::= ENUMERATED { reject, ignore, notify }
S1ap-Presence ::= ENUMERATED { optional, conditional, mandatory }
S1ap-PrivateIE-ID ::= CHOICE {
local INTEGER (0..65535),
global OBJECT IDENTIFIER
}
S1ap-ProcedureCode ::= INTEGER {
id-HandoverPreparation(0),
id-HandoverResourceAllocation(1),
id-HandoverNotification(2),
id-PathSwitchRequest(3),
id-HandoverCancel(4),
id-E-RABSetup(5),
id-E-RABModify(6),
id-E-RABRelease(7),
id-E-RABReleaseIndication(8),
id-InitialContextSetup(9),
id-Paging(10),
id-downlinkNASTransport(11),
id-initialUEMessage(12),
id-uplinkNASTransport(13),
id-Reset(14),
id-ErrorIndication(15),
id-NASNonDeliveryIndication(16),
id-S1Setup(17),
id-UEContextReleaseRequest(18),
id-DownlinkS1cdma2000tunneling(19),
id-UplinkS1cdma2000tunneling(20),
id-UEContextModification(21),
id-UECapabilityInfoIndication(22),
id-UEContextRelease(23),
id-eNBStatusTransfer(24),
id-MMEStatusTransfer(25),
id-DeactivateTrace(26),
id-TraceStart(27),
id-TraceFailureIndication(28),
id-ENBConfigurationUpdate(29),
id-MMEConfigurationUpdate(30),
id-LocationReportingControl(31),
id-LocationReportingFailureIndication(32),
id-LocationReport(33),
id-OverloadStart(34),
id-OverloadStop(35),
id-WriteReplaceWarning(36),
id-eNBDirectInformationTransfer(37),
id-MMEDirectInformationTransfer(38),
id-PrivateMessage(39),
id-eNBConfigurationTransfer(40),
id-MMEConfigurationTransfer(41),
id-CellTrafficTrace(42),
id-Kill(43),
id-downlinkUEAssociatedLPPaTransport(44),
id-uplinkUEAssociatedLPPaTransport(45),
id-downlinkNonUEAssociatedLPPaTransport(46),
id-uplinkNonUEAssociatedLPPaTransport(47)
} (0..255)
S1ap-ProtocolExtensionID ::= INTEGER (0..65535)
S1ap-ProtocolIE-ID ::= INTEGER {
id-MME-UE-S1AP-ID (0),
id-HandoverType (1),
id-Cause (2),
id-SourceID (3),
id-TargetID (4),
id-eNB-UE-S1AP-ID (8),
id-E-RABSubjecttoDataForwardingList (12),
id-E-RABtoReleaseListHOCmd (13),
id-E-RABDataForwardingItem (14),
id-E-RABReleaseItemBearerRelComp (15),
id-E-RABToBeSetupListBearerSUReq (16),
id-E-RABToBeSetupItemBearerSUReq (17),
id-E-RABAdmittedList (18),
id-E-RABFailedToSetupListHOReqAck (19),
id-E-RABAdmittedItem (20),
id-E-RABFailedToSetupItemHOReqAck (21),
id-E-RABToBeSwitchedDLList (22),
id-E-RABToBeSwitchedDLItem (23),
id-E-RABToBeSetupListCtxtSUReq (24),
id-TraceActivation (25),
id-NAS-PDU (26),
id-E-RABToBeSetupItemHOReq (27),
id-E-RABSetupListBearerSURes (28),
id-E-RABFailedToSetupListBearerSURes (29),
id-E-RABToBeModifiedListBearerModReq (30),
id-E-RABModifyListBearerModRes (31),
id-E-RABFailedToModifyList (32),
id-E-RABToBeReleasedList (33),
id-E-RABFailedToReleaseList (34),
id-E-RABItem (35),
id-E-RABToBeModifiedItemBearerModReq (36),
id-E-RABModifyItemBearerModRes (37),
id-E-RABReleaseItem (38),
id-E-RABSetupItemBearerSURes (39),
id-SecurityContext (40),
id-HandoverRestrictionList (41),
id-UEPagingID (43),
id-pagingDRX (44),
id-TAIList (46),
id-TAIItem (47),
id-E-RABFailedToSetupListCtxtSURes (48),
id-E-RABReleaseItemHOCmd (49),
id-E-RABSetupItemCtxtSURes (50),
id-E-RABSetupListCtxtSURes (51),
id-E-RABToBeSetupItemCtxtSUReq (52),
id-E-RABToBeSetupListHOReq (53),
id-GERANtoLTEHOInformationRes (55),
id-UTRANtoLTEHOInformationRes (57),
id-CriticalityDiagnostics (58),
id-Global-ENB-ID (59),
id-eNBname (60),
id-MMEname (61),
id-ServedPLMNs (63),
id-SupportedTAs (64),
id-TimeToWait (65),
id-uEaggregateMaximumBitrate (66),
id-TAI (67),
id-E-RABReleaseListBearerRelComp (69),
id-cdma2000PDU (70),
id-cdma2000RATType (71),
id-cdma2000SectorID (72),
id-SecurityKey (73),
id-UERadioCapability (74),
id-GUMMEI-ID (75),
id-E-RABInformationListItem (78),
id-Direct-Forwarding-Path-Availability (79),
id-UEIdentityIndexValue (80),
id-cdma2000HOStatus (83),
id-cdma2000HORequiredIndication (84),
id-E-UTRAN-Trace-ID (86),
id-RelativeMMECapacity (87),
id-SourceMME-UE-S1AP-ID (88),
id-Bearers-SubjectToStatusTransfer-Item (89),
id-eNB-StatusTransfer-TransparentContainer (90),
id-UE-associatedLogicalS1-ConnectionItem (91),
id-ResetType (92),
id-UE-associatedLogicalS1-ConnectionListResAck (93),
id-E-RABToBeSwitchedULItem (94),
id-E-RABToBeSwitchedULList (95),
id-S-TMSI (96),
id-cdma2000OneXRAND (97),
id-RequestType (98),
id-UE-S1AP-IDs (99),
id-EUTRAN-CGI (100),
id-OverloadResponse (101),
id-cdma2000OneXSRVCCInfo (102),
id-E-RABFailedToBeReleasedList (103),
id-Source-ToTarget-TransparentContainer (104),
id-ServedGUMMEIs (105),
id-SubscriberProfileIDforRFP (106),
id-UESecurityCapabilities (107),
id-CSFallbackIndicator (108),
id-CNDomain (109),
id-E-RABReleasedList (110),
id-MessageIdentifier (111),
id-SerialNumber (112),
id-WarningAreaList (113),
id-RepetitionPeriod (114),
id-NumberofBroadcastRequest (115),
id-WarningType (116),
id-WarningSecurityInfo (117),
id-DataCodingScheme (118),
id-WarningMessageContents (119),
id-BroadcastCompletedAreaList (120),
id-Inter-SystemInformationTransferTypeEDT (121),
id-Inter-SystemInformationTransferTypeMDT (122),
id-Target-ToSource-TransparentContainer (123),
id-SRVCCOperationPossible (124),
id-SRVCCHOIndication (125),
id-NAS-DownlinkCount (126),
id-CSG-Id (127),
id-CSG-IdList (128),
id-SONConfigurationTransferECT (129),
id-SONConfigurationTransferMCT (130),
id-TraceCollectionEntityIPAddress (131),
id-MSClassmark2 (132),
id-MSClassmark3 (133),
id-RRC-Establishment-Cause (134),
id-NASSecurityParametersfromE-UTRAN (135),
id-NASSecurityParameterstoE-UTRAN (136),
id-DefaultPagingDRX (137),
id-Source-ToTarget-TransparentContainer-Secondary (138),
id-Target-ToSource-TransparentContainer-Secondary (139),
id-EUTRANRoundTripDelayEstimationInfo (140),
id-BroadcastCancelledAreaList (141),
id-ConcurrentWarningMessageIndicator (142),
id-Data-Forwarding-Not-Possible (143),
id-ExtendedRepetitionPeriod (144),
id-CellAccessMode (145),
id-CSGMembershipStatus (146),
id-LPPa-PDU (147),
id-Routing-ID (148),
id-Time-Synchronization-Info (149),
id-PS-ServiceNotAvailable (150),
id-PagingPriority (151),
id-x2TNLConfigurationInfo (152),
id-eNBX2ExtendedTransportLayerAddresses (153),
id-GUMMEIList (154),
id-GW-TransportLayerAddress (155),
id-Correlation-ID (156),
id-SourceMME-GUMMEI (157),
id-MME-UE-S1AP-ID-2 (158),
id-RegisteredLAI (159),
id-RelayNode-Indicator (160),
id-TrafficLoadReductionIndication (161),
id-MDTConfiguration (162),
id-MMERelaySupportIndicator (163),
id-GWContextReleaseIndication (164),
id-ManagementBasedMDTAllowed (165),
id-PrivacyIndicator (166)
} (0..65535)
S1ap-TriggeringMessage ::= ENUMERATED { initiating-message, successful-outcome, unsuccessfull-outcome }
END
@@ -0,0 +1,283 @@
-- **************************************************************
--
-- Constant definitions
--
-- **************************************************************
S1AP-Constants {
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-Constants (4) }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
-- **************************************************************
--
-- IE parameter types from other modules.
--
-- **************************************************************
IMPORTS
S1ap-ProcedureCode,
S1ap-ProtocolIE-ID
FROM S1AP-CommonDataTypes;
-- **************************************************************
--
-- Elementary Procedures
--
-- **************************************************************
id-HandoverPreparation S1ap-ProcedureCode ::= 0
id-HandoverResourceAllocation S1ap-ProcedureCode ::= 1
id-HandoverNotification S1ap-ProcedureCode ::= 2
id-PathSwitchRequest S1ap-ProcedureCode ::= 3
id-HandoverCancel S1ap-ProcedureCode ::= 4
id-E-RABSetup S1ap-ProcedureCode ::= 5
id-E-RABModify S1ap-ProcedureCode ::= 6
id-E-RABRelease S1ap-ProcedureCode ::= 7
id-E-RABReleaseIndication S1ap-ProcedureCode ::= 8
id-InitialContextSetup S1ap-ProcedureCode ::= 9
id-Paging S1ap-ProcedureCode ::= 10
id-downlinkNASTransport S1ap-ProcedureCode ::= 11
id-initialUEMessage S1ap-ProcedureCode ::= 12
id-uplinkNASTransport S1ap-ProcedureCode ::= 13
id-Reset S1ap-ProcedureCode::= 14
id-ErrorIndication S1ap-ProcedureCode ::= 15
id-NASNonDeliveryIndication S1ap-ProcedureCode ::= 16
id-S1Setup S1ap-ProcedureCode ::= 17
id-UEContextReleaseRequest S1ap-ProcedureCode ::= 18
id-DownlinkS1cdma2000tunneling S1ap-ProcedureCode ::= 19
id-UplinkS1cdma2000tunneling S1ap-ProcedureCode ::= 20
id-UEContextModification S1ap-ProcedureCode ::= 21
id-UECapabilityInfoIndication S1ap-ProcedureCode ::= 22
id-UEContextRelease S1ap-ProcedureCode ::= 23
id-eNBStatusTransfer S1ap-ProcedureCode ::= 24
id-MMEStatusTransfer S1ap-ProcedureCode ::= 25
id-DeactivateTrace S1ap-ProcedureCode ::= 26
id-TraceStart S1ap-ProcedureCode ::= 27
id-TraceFailureIndication S1ap-ProcedureCode ::= 28
id-ENBConfigurationUpdate S1ap-ProcedureCode ::= 29
id-MMEConfigurationUpdate S1ap-ProcedureCode ::= 30
id-LocationReportingControl S1ap-ProcedureCode ::= 31
id-LocationReportingFailureIndication S1ap-ProcedureCode ::= 32
id-LocationReport S1ap-ProcedureCode ::= 33
id-OverloadStart S1ap-ProcedureCode ::= 34
id-OverloadStop S1ap-ProcedureCode ::= 35
id-WriteReplaceWarning S1ap-ProcedureCode ::= 36
id-eNBDirectInformationTransfer S1ap-ProcedureCode ::= 37
id-MMEDirectInformationTransfer S1ap-ProcedureCode ::= 38
id-PrivateMessage S1ap-ProcedureCode ::= 39
id-eNBConfigurationTransfer S1ap-ProcedureCode ::= 40
id-MMEConfigurationTransfer S1ap-ProcedureCode ::= 41
id-CellTrafficTrace S1ap-ProcedureCode ::= 42
id-Kill S1ap-ProcedureCode ::= 43
id-downlinkUEAssociatedLPPaTransport S1ap-ProcedureCode ::= 44
id-uplinkUEAssociatedLPPaTransport S1ap-ProcedureCode ::= 45
id-downlinkNonUEAssociatedLPPaTransport S1ap-ProcedureCode ::= 46
id-uplinkNonUEAssociatedLPPaTransport S1ap-ProcedureCode ::= 47
-- **************************************************************
--
-- Extension constants
--
-- **************************************************************
s1ap-maxPrivateIEs INTEGER ::= 65535
s1ap-maxProtocolExtensions INTEGER ::= 65535
s1ap-maxProtocolIEs INTEGER ::= 65535
-- **************************************************************
--
-- Lists
--
-- **************************************************************
s1ap-maxNrOfCSGs INTEGER ::= 256
s1ap-maxNrOfE-RABs INTEGER ::= 256
s1ap-maxnoofTAIs INTEGER ::= 256
s1ap-maxnoofTACs INTEGER ::= 256
s1ap-maxNrOfErrors INTEGER ::= 256
s1ap-maxnoofBPLMNs INTEGER ::= 6
s1ap-maxnoofPLMNsPerMME INTEGER ::= 32
s1ap-maxnoofEPLMNs INTEGER ::= 15
s1ap-maxnoofEPLMNsPlusOne INTEGER ::= 16
s1ap-maxnoofForbLACs INTEGER ::= 4096
s1ap-maxnoofForbTACs INTEGER ::= 4096
s1ap-maxNrOfIndividualS1ConnectionsToReset INTEGER ::= 256
s1ap-maxnoofCells INTEGER ::= 16
s1ap-maxnoofTAIforWarning INTEGER ::= 65535
s1ap-maxnoofCellID INTEGER ::= 65535
s1ap-maxnoofEmergencyAreaID INTEGER ::= 65535
s1ap-maxnoofCellinTAI INTEGER ::= 65535
s1ap-maxnoofCellinEAI INTEGER ::= 65535
s1ap-maxnoofeNBX2TLAs INTEGER ::= 2
s1ap-maxnoofeNBX2ExtTLAs INTEGER ::= 16
s1ap-maxnoofeNBX2GTPTLAs INTEGER ::= 16
s1ap-maxnoofRATs INTEGER ::= 8
s1ap-maxnoofGroupIDs INTEGER ::= 65535
s1ap-maxnoofMMECs INTEGER ::= 256
s1ap-maxnoofCellIDforMDT INTEGER ::= 32
s1ap-maxnoofTAforMDT INTEGER ::= 8
-- **************************************************************
--
-- IEs
--
-- **************************************************************
id-MME-UE-S1AP-ID S1ap-ProtocolIE-ID ::= 0
id-HandoverType S1ap-ProtocolIE-ID ::= 1
id-Cause S1ap-ProtocolIE-ID ::= 2
id-SourceID S1ap-ProtocolIE-ID ::= 3
id-TargetID S1ap-ProtocolIE-ID ::= 4
id-eNB-UE-S1AP-ID S1ap-ProtocolIE-ID ::= 8
id-E-RABSubjecttoDataForwardingList S1ap-ProtocolIE-ID ::= 12
id-E-RABtoReleaseListHOCmd S1ap-ProtocolIE-ID ::= 13
id-E-RABDataForwardingItem S1ap-ProtocolIE-ID ::= 14
id-E-RABReleaseItemBearerRelComp S1ap-ProtocolIE-ID ::= 15
id-E-RABToBeSetupListBearerSUReq S1ap-ProtocolIE-ID ::= 16
id-E-RABToBeSetupItemBearerSUReq S1ap-ProtocolIE-ID ::= 17
id-E-RABAdmittedList S1ap-ProtocolIE-ID ::= 18
id-E-RABFailedToSetupListHOReqAck S1ap-ProtocolIE-ID ::= 19
id-E-RABAdmittedItem S1ap-ProtocolIE-ID ::= 20
id-E-RABFailedtoSetupItemHOReqAck S1ap-ProtocolIE-ID ::= 21
id-E-RABToBeSwitchedDLList S1ap-ProtocolIE-ID ::= 22
id-E-RABToBeSwitchedDLItem S1ap-ProtocolIE-ID ::= 23
id-E-RABToBeSetupListCtxtSUReq S1ap-ProtocolIE-ID ::= 24
id-TraceActivation S1ap-ProtocolIE-ID ::= 25
id-NAS-PDU S1ap-ProtocolIE-ID ::= 26
id-E-RABToBeSetupItemHOReq S1ap-ProtocolIE-ID ::= 27
id-E-RABSetupListBearerSURes S1ap-ProtocolIE-ID ::= 28
id-E-RABFailedToSetupListBearerSURes S1ap-ProtocolIE-ID ::= 29
id-E-RABToBeModifiedListBearerModReq S1ap-ProtocolIE-ID ::= 30
id-E-RABModifyListBearerModRes S1ap-ProtocolIE-ID ::= 31
id-E-RABFailedToModifyList S1ap-ProtocolIE-ID ::= 32
id-E-RABToBeReleasedList S1ap-ProtocolIE-ID ::= 33
id-E-RABFailedToReleaseList S1ap-ProtocolIE-ID ::= 34
id-E-RABItem S1ap-ProtocolIE-ID ::= 35
id-E-RABToBeModifiedItemBearerModReq S1ap-ProtocolIE-ID ::= 36
id-E-RABModifyItemBearerModRes S1ap-ProtocolIE-ID ::= 37
id-E-RABReleaseItem S1ap-ProtocolIE-ID ::= 38
id-E-RABSetupItemBearerSURes S1ap-ProtocolIE-ID ::= 39
id-SecurityContext S1ap-ProtocolIE-ID ::= 40
id-HandoverRestrictionList S1ap-ProtocolIE-ID ::= 41
id-UEPagingID S1ap-ProtocolIE-ID ::= 43
id-pagingDRX S1ap-ProtocolIE-ID ::= 44
id-TAIList S1ap-ProtocolIE-ID ::= 46
id-TAIItem S1ap-ProtocolIE-ID ::= 47
id-E-RABFailedToSetupListCtxtSURes S1ap-ProtocolIE-ID ::= 48
id-E-RABReleaseItemHOCmd S1ap-ProtocolIE-ID ::= 49
id-E-RABSetupItemCtxtSURes S1ap-ProtocolIE-ID ::= 50
id-E-RABSetupListCtxtSURes S1ap-ProtocolIE-ID ::= 51
id-E-RABToBeSetupItemCtxtSUReq S1ap-ProtocolIE-ID ::= 52
id-E-RABToBeSetupListHOReq S1ap-ProtocolIE-ID ::= 53
id-GERANtoLTEHOInformationRes S1ap-ProtocolIE-ID ::= 55
id-UTRANtoLTEHOInformationRes S1ap-ProtocolIE-ID ::= 57
id-CriticalityDiagnostics S1ap-ProtocolIE-ID ::= 58
id-Global-ENB-ID S1ap-ProtocolIE-ID ::= 59
id-eNBname S1ap-ProtocolIE-ID ::= 60
id-MMEname S1ap-ProtocolIE-ID ::= 61
id-ServedPLMNs S1ap-ProtocolIE-ID ::= 63
id-SupportedTAs S1ap-ProtocolIE-ID ::= 64
id-TimeToWait S1ap-ProtocolIE-ID ::= 65
id-uEaggregateMaximumBitrate S1ap-ProtocolIE-ID ::= 66
id-TAI S1ap-ProtocolIE-ID ::= 67
id-E-RABReleaseListBearerRelComp S1ap-ProtocolIE-ID ::= 69
id-cdma2000PDU S1ap-ProtocolIE-ID ::= 70
id-cdma2000RATType S1ap-ProtocolIE-ID ::= 71
id-cdma2000SectorID S1ap-ProtocolIE-ID ::= 72
id-SecurityKey S1ap-ProtocolIE-ID ::= 73
id-UERadioCapability S1ap-ProtocolIE-ID ::= 74
id-GUMMEI-ID S1ap-ProtocolIE-ID ::= 75
id-E-RABInformationListItem S1ap-ProtocolIE-ID ::= 78
id-Direct-Forwarding-Path-Availability S1ap-ProtocolIE-ID ::= 79
id-UEIdentityIndexValue S1ap-ProtocolIE-ID ::= 80
id-cdma2000HOStatus S1ap-ProtocolIE-ID ::= 83
id-cdma2000HORequiredIndication S1ap-ProtocolIE-ID ::= 84
id-E-UTRAN-Trace-ID S1ap-ProtocolIE-ID ::= 86
id-RelativeMMECapacity S1ap-ProtocolIE-ID ::= 87
id-SourceMME-UE-S1AP-ID S1ap-ProtocolIE-ID ::= 88
id-Bearers-SubjectToStatusTransfer-Item S1ap-ProtocolIE-ID ::= 89
id-eNB-StatusTransfer-TransparentContainer S1ap-ProtocolIE-ID ::= 90
id-UE-associatedLogicalS1-ConnectionItem S1ap-ProtocolIE-ID ::= 91
id-ResetType S1ap-ProtocolIE-ID ::= 92
id-UE-associatedLogicalS1-ConnectionListResAck S1ap-ProtocolIE-ID ::= 93
id-E-RABToBeSwitchedULItem S1ap-ProtocolIE-ID ::= 94
id-E-RABToBeSwitchedULList S1ap-ProtocolIE-ID ::= 95
id-S-TMSI S1ap-ProtocolIE-ID ::= 96
id-cdma2000OneXRAND S1ap-ProtocolIE-ID ::= 97
id-RequestType S1ap-ProtocolIE-ID ::= 98
id-UE-S1AP-IDs S1ap-ProtocolIE-ID ::= 99
id-EUTRAN-CGI S1ap-ProtocolIE-ID ::= 100
id-OverloadResponse S1ap-ProtocolIE-ID ::= 101
id-cdma2000OneXSRVCCInfo S1ap-ProtocolIE-ID ::= 102
id-E-RABFailedToBeReleasedList S1ap-ProtocolIE-ID ::= 103
id-Source-ToTarget-TransparentContainer S1ap-ProtocolIE-ID ::= 104
id-ServedGUMMEIs S1ap-ProtocolIE-ID ::= 105
id-SubscriberProfileIDforRFP S1ap-ProtocolIE-ID ::= 106
id-UESecurityCapabilities S1ap-ProtocolIE-ID ::= 107
id-CSFallbackIndicator S1ap-ProtocolIE-ID ::= 108
id-CNDomain S1ap-ProtocolIE-ID ::= 109
id-E-RABReleasedList S1ap-ProtocolIE-ID ::= 110
id-MessageIdentifier S1ap-ProtocolIE-ID ::= 111
id-SerialNumber S1ap-ProtocolIE-ID ::= 112
id-WarningAreaList S1ap-ProtocolIE-ID ::= 113
id-RepetitionPeriod S1ap-ProtocolIE-ID ::= 114
id-NumberofBroadcastRequest S1ap-ProtocolIE-ID ::= 115
id-WarningType S1ap-ProtocolIE-ID ::= 116
id-WarningSecurityInfo S1ap-ProtocolIE-ID ::= 117
id-DataCodingScheme S1ap-ProtocolIE-ID ::= 118
id-WarningMessageContents S1ap-ProtocolIE-ID ::= 119
id-BroadcastCompletedAreaList S1ap-ProtocolIE-ID ::= 120
id-Inter-SystemInformationTransferTypeEDT S1ap-ProtocolIE-ID ::= 121
id-Inter-SystemInformationTransferTypeMDT S1ap-ProtocolIE-ID ::= 122
id-Target-ToSource-TransparentContainer S1ap-ProtocolIE-ID ::= 123
id-SRVCCOperationPossible S1ap-ProtocolIE-ID ::= 124
id-SRVCCHOIndication S1ap-ProtocolIE-ID ::= 125
id-NAS-DownlinkCount S1ap-ProtocolIE-ID ::= 126
id-CSG-Id S1ap-ProtocolIE-ID ::= 127
id-CSG-IdList S1ap-ProtocolIE-ID ::= 128
id-SONConfigurationTransferECT S1ap-ProtocolIE-ID ::= 129
id-SONConfigurationTransferMCT S1ap-ProtocolIE-ID ::= 130
id-TraceCollectionEntityIPAddress S1ap-ProtocolIE-ID ::= 131
id-MSClassmark2 S1ap-ProtocolIE-ID ::= 132
id-MSClassmark3 S1ap-ProtocolIE-ID ::= 133
id-RRC-Establishment-Cause S1ap-ProtocolIE-ID ::= 134
id-NASSecurityParametersfromE-UTRAN S1ap-ProtocolIE-ID ::= 135
id-NASSecurityParameterstoE-UTRAN S1ap-ProtocolIE-ID ::= 136
id-DefaultPagingDRX S1ap-ProtocolIE-ID ::= 137
id-Source-ToTarget-TransparentContainer-Secondary S1ap-ProtocolIE-ID ::= 138
id-Target-ToSource-TransparentContainer-Secondary S1ap-ProtocolIE-ID ::= 139
id-EUTRANRoundTripDelayEstimationInfo S1ap-ProtocolIE-ID ::= 140
id-BroadcastCancelledAreaList S1ap-ProtocolIE-ID ::= 141
id-ConcurrentWarningMessageIndicator S1ap-ProtocolIE-ID ::= 142
id-Data-Forwarding-Not-Possible S1ap-ProtocolIE-ID ::= 143
id-ExtendedRepetitionPeriod S1ap-ProtocolIE-ID ::= 144
id-CellAccessMode S1ap-ProtocolIE-ID ::= 145
id-CSGMembershipStatus S1ap-ProtocolIE-ID ::= 146
id-LPPa-PDU S1ap-ProtocolIE-ID ::= 147
id-Routing-ID S1ap-ProtocolIE-ID ::= 148
id-Time-Synchronization-Info S1ap-ProtocolIE-ID ::= 149
id-PS-ServiceNotAvailable S1ap-ProtocolIE-ID ::= 150
id-PagingPriority S1ap-ProtocolIE-ID ::= 151
id-x2TNLConfigurationInfo S1ap-ProtocolIE-ID ::= 152
id-eNBX2ExtendedTransportLayerAddresses S1ap-ProtocolIE-ID ::= 153
id-GUMMEIList S1ap-ProtocolIE-ID ::= 154
id-GW-TransportLayerAddress S1ap-ProtocolIE-ID ::= 155
id-Correlation-ID S1ap-ProtocolIE-ID ::= 156
id-SourceMME-GUMMEI S1ap-ProtocolIE-ID ::= 157
id-MME-UE-S1AP-ID-2 S1ap-ProtocolIE-ID ::= 158
id-RegisteredLAI S1ap-ProtocolIE-ID ::= 159
id-RelayNode-Indicator S1ap-ProtocolIE-ID ::= 160
id-TrafficLoadReductionIndication S1ap-ProtocolIE-ID ::= 161
id-MDTConfiguration S1ap-ProtocolIE-ID ::= 162
id-MMERelaySupportIndicator S1ap-ProtocolIE-ID ::= 163
id-GWContextReleaseIndication S1ap-ProtocolIE-ID ::= 164
id-ManagementBasedMDTAllowed S1ap-ProtocolIE-ID ::= 165
id-PrivacyIndicator S1ap-ProtocolIE-ID ::= 166
END
@@ -0,0 +1,197 @@
-- **************************************************************
--
-- Container definitions
--
-- **************************************************************
S1AP-Containers {
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-Containers (5) }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
-- **************************************************************
--
-- IE parameter types from other modules.
--
-- **************************************************************
IMPORTS
S1ap-Criticality,
S1ap-Presence,
S1ap-PrivateIE-ID,
S1ap-ProtocolExtensionID,
S1ap-ProtocolIE-ID
FROM S1AP-CommonDataTypes
s1ap-maxPrivateIEs,
s1ap-maxProtocolExtensions,
s1ap-maxProtocolIEs
FROM S1AP-Constants;
-- **************************************************************
--
-- Class Definition for Protocol IEs
--
-- **************************************************************
S1AP-PROTOCOL-IES ::= CLASS {
&id S1ap-ProtocolIE-ID UNIQUE,
&criticality S1ap-Criticality,
&Value,
&presence S1ap-Presence
}
WITH SYNTAX {
ID &id
CRITICALITY &criticality
TYPE &Value
PRESENCE &presence
}
-- **************************************************************
--
-- Class Definition for Protocol IEs
--
-- **************************************************************
S1AP-PROTOCOL-IES-PAIR ::= CLASS {
&id S1ap-ProtocolIE-ID UNIQUE,
&firstCriticality S1ap-Criticality,
&FirstValue,
&secondCriticality S1ap-Criticality,
&SecondValue,
&presence S1ap-Presence
}
WITH SYNTAX {
ID &id
FIRST CRITICALITY &firstCriticality
FIRST TYPE &FirstValue
SECOND CRITICALITY &secondCriticality
SECOND TYPE &SecondValue
PRESENCE &presence
}
-- **************************************************************
--
-- Class Definition for Protocol Extensions
--
-- **************************************************************
S1AP-PROTOCOL-EXTENSION ::= CLASS {
&id S1ap-ProtocolExtensionID UNIQUE,
&criticality S1ap-Criticality,
&Extension,
&presence S1ap-Presence
}
WITH SYNTAX {
ID &id
CRITICALITY &criticality
EXTENSION &Extension
PRESENCE &presence
}
-- **************************************************************
--
-- Class Definition for Private IEs
--
-- **************************************************************
S1AP-PRIVATE-IES ::= CLASS {
&id S1ap-PrivateIE-ID,
&criticality S1ap-Criticality,
&Value,
&presence S1ap-Presence
}
WITH SYNTAX {
ID &id
CRITICALITY &criticality
TYPE &Value
PRESENCE &presence
}
-- **************************************************************
--
-- Container for Protocol IEs
--
-- **************************************************************
ProtocolIE-Container {S1AP-PROTOCOL-IES : IEsSetParam} ::=
SEQUENCE (SIZE (0..maxProtocolIEs)) OF
ProtocolIE-Field {{IEsSetParam}}
ProtocolIE-SingleContainer {S1AP-PROTOCOL-IES : IEsSetParam} ::=
ProtocolIE-Field {{IEsSetParam}}
ProtocolIE-Field {S1AP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE {
id S1AP-PROTOCOL-IES.&id ({IEsSetParam}),
criticality S1AP-PROTOCOL-IES.&criticality ({IEsSetParam}{@id}),
value S1AP-PROTOCOL-IES.&Value ({IEsSetParam}{@id})
}
-- **************************************************************
--
-- Container for Protocol IE Pairs
--
-- **************************************************************
ProtocolIE-ContainerPair {S1AP-PROTOCOL-IES-PAIR : IEsSetParam} ::=
SEQUENCE (SIZE (0..maxProtocolIEs)) OF
ProtocolIE-FieldPair {{IEsSetParam}}
ProtocolIE-FieldPair {S1AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= SEQUENCE {
id S1AP-PROTOCOL-IES-PAIR.&id ({IEsSetParam}),
firstCriticality S1AP-PROTOCOL-IES-PAIR.&firstCriticality ({IEsSetParam}{@id}),
firstValue S1AP-PROTOCOL-IES-PAIR.&FirstValue ({IEsSetParam}{@id}),
secondCriticality S1AP-PROTOCOL-IES-PAIR.&secondCriticality ({IEsSetParam}{@id}),
secondValue S1AP-PROTOCOL-IES-PAIR.&SecondValue ({IEsSetParam}{@id})
}
-- **************************************************************
--
-- Container Lists for Protocol IE Containers
--
-- **************************************************************
ProtocolIE-ContainerList {INTEGER : lowerBound, INTEGER : upperBound, S1AP-PROTOCOL-IES : IEsSetParam} ::=
SEQUENCE (SIZE (lowerBound..upperBound)) OF
ProtocolIE-SingleContainer {{IEsSetParam}}
ProtocolIE-ContainerPairList {INTEGER : lowerBound, INTEGER : upperBound, S1AP-PROTOCOL-IES-PAIR : IEsSetParam} ::=
SEQUENCE (SIZE (lowerBound..upperBound)) OF
ProtocolIE-ContainerPair {{IEsSetParam}}
-- **************************************************************
--
-- Container for Protocol Extensions
--
-- **************************************************************
ProtocolExtensionContainer {S1AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::=
SEQUENCE (SIZE (1..maxProtocolExtensions)) OF
ProtocolExtensionField {{ExtensionSetParam}}
ProtocolExtensionField {S1AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= SEQUENCE {
id S1AP-PROTOCOL-EXTENSION.&id ({ExtensionSetParam}),
criticality S1AP-PROTOCOL-EXTENSION.&criticality ({ExtensionSetParam}{@id}),
extensionValue S1AP-PROTOCOL-EXTENSION.&Extension ({ExtensionSetParam}{@id})
}
-- **************************************************************
--
-- Container for Private IEs
--
-- **************************************************************
PrivateIE-Container {S1AP-PRIVATE-IES : IEsSetParam } ::=
SEQUENCE (SIZE (1.. maxPrivateIEs)) OF
PrivateIE-Field {{IEsSetParam}}
PrivateIE-Field {S1AP-PRIVATE-IES : IEsSetParam} ::= SEQUENCE {
id S1AP-PRIVATE-IES.&id ({IEsSetParam}),
criticality S1AP-PRIVATE-IES.&criticality ({IEsSetParam}{@id}),
value S1AP-PRIVATE-IES.&Value ({IEsSetParam}{@id})
}
END
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,590 @@
-- **************************************************************
--
-- Elementary Procedure definitions
--
-- **************************************************************
S1AP-PDU-Descriptions {
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-PDU-Descriptions (0)}
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
-- **************************************************************
--
-- IE parameter types from other modules.
--
-- **************************************************************
IMPORTS
S1ap-Criticality,
S1ap-ProcedureCode
FROM S1AP-CommonDataTypes
S1ap-CellTrafficTrace,
S1ap-DeactivateTrace,
S1ap-DownlinkUEAssociatedLPPaTransport,
S1ap-DownlinkNASTransport,
S1ap-DownlinkNonUEAssociatedLPPaTransport,
S1ap-DownlinkS1cdma2000tunneling,
S1ap-ENBDirectInformationTransfer,
S1ap-ENBStatusTransfer,
S1ap-ENBConfigurationUpdate,
S1ap-ENBConfigurationUpdateAcknowledge,
S1ap-ENBConfigurationUpdateFailure,
S1ap-ErrorIndication,
S1ap-HandoverCancel,
S1ap-HandoverCancelAcknowledge,
S1ap-HandoverCommand,
S1ap-HandoverFailure,
S1ap-HandoverNotify,
S1ap-HandoverPreparationFailure,
S1ap-HandoverRequest,
S1ap-HandoverRequestAcknowledge,
S1ap-HandoverRequired,
S1ap-InitialContextSetupFailure,
S1ap-InitialContextSetupRequest,
S1ap-InitialContextSetupResponse,
S1ap-InitialUEMessage,
S1ap-KillRequest,
S1ap-KillResponse,
S1ap-LocationReportingControl,
S1ap-LocationReportingFailureIndication,
S1ap-LocationReport,
S1ap-MMEConfigurationUpdate,
S1ap-MMEConfigurationUpdateAcknowledge,
S1ap-MMEConfigurationUpdateFailure,
S1ap-MMEDirectInformationTransfer,
S1ap-MMEStatusTransfer,
S1ap-NASNonDeliveryIndication,
S1ap-OverloadStart,
S1ap-OverloadStop,
S1ap-Paging,
S1ap-PathSwitchRequest,
S1ap-PathSwitchRequestAcknowledge,
S1ap-PathSwitchRequestFailure,
S1ap-PrivateMessage,
S1ap-Reset,
S1ap-ResetAcknowledge,
S1ap-S1SetupFailure,
S1ap-S1SetupRequest,
S1ap-S1SetupResponse,
E-S1ap-RABModifyRequest,
E-S1ap-RABModifyResponse,
E-S1ap-RABReleaseCommand,
E-S1ap-RABReleaseResponse,
E-S1ap-RABReleaseIndication,
E-S1ap-RABSetupRequest,
E-S1ap-RABSetupResponse,
S1ap-TraceFailureIndication,
S1ap-TraceStart,
S1ap-UECapabilityInfoIndication,
S1ap-UEContextModificationFailure,
S1ap-UEContextModificationRequest,
S1ap-UEContextModificationResponse,
S1ap-UEContextReleaseCommand,
S1ap-UEContextReleaseComplete,
S1ap-UEContextReleaseRequest,
S1ap-UplinkUEAssociatedLPPaTransport,
S1ap-UplinkNASTransport,
S1ap-UplinkNonUEAssociatedLPPaTransport,
S1ap-UplinkS1cdma2000tunneling,
S1ap-WriteReplaceWarningRequest,
S1ap-WriteReplaceWarningResponse,
S1ap-ENBConfigurationTransfer,
S1ap-MMEConfigurationTransfer
FROM S1AP-PDU-Contents
id-CellTrafficTrace,
id-DeactivateTrace,
id-downlinkUEAssociatedLPPaTransport,
id-downlinkNASTransport,
id-downlinkNonUEAssociatedLPPaTransport,
id-DownlinkS1cdma2000tunneling,
id-eNBStatusTransfer,
id-ErrorIndication,
id-HandoverCancel,
id-HandoverNotification,
id-HandoverPreparation,
id-HandoverResourceAllocation,
id-InitialContextSetup,
id-initialUEMessage,
id-ENBConfigurationUpdate,
id-Kill,
id-LocationReportingControl,
id-LocationReportingFailureIndication,
id-LocationReport,
id-eNBDirectInformationTransfer,
id-MMEConfigurationUpdate,
id-MMEDirectInformationTransfer,
id-MMEStatusTransfer,
id-NASNonDeliveryIndication,
id-OverloadStart,
id-OverloadStop,
id-Paging,
id-PathSwitchRequest,
id-PrivateMessage,
id-Reset,
id-S1Setup,
id-E-RABModify,
id-E-RABRelease,
id-E-RABReleaseIndication,
id-E-RABSetup,
id-TraceFailureIndication,
id-TraceStart,
id-UECapabilityInfoIndication,
id-UEContextModification,
id-UEContextRelease,
id-UEContextReleaseRequest,
id-uplinkUEAssociatedLPPaTransport,
id-uplinkNASTransport,
id-uplinkNonUEAssociatedLPPaTransport,
id-UplinkS1cdma2000tunneling,
id-WriteReplaceWarning,
id-eNBConfigurationTransfer,
id-MMEConfigurationTransfer
FROM S1AP-Constants;
-- **************************************************************
--
-- Interface Elementary Procedure Class
--
-- **************************************************************
S1AP-ELEMENTARY-PROCEDURE ::= CLASS {
&InitiatingMessage ,
&SuccessfulOutcome OPTIONAL,
&UnsuccessfulOutcome OPTIONAL,
&procedureCode ProcedureCode UNIQUE,
&criticality Criticality DEFAULT ignore
}
WITH SYNTAX {
INITIATING MESSAGE &InitiatingMessage
[SUCCESSFUL OUTCOME &SuccessfulOutcome]
[UNSUCCESSFUL OUTCOME &UnsuccessfulOutcome]
PROCEDURE CODE &procedureCode
[CRITICALITY &criticality]
}
-- **************************************************************
--
-- Interface PDU Definition
--
-- **************************************************************
S1AP-PDU ::= CHOICE {
initiatingMessage InitiatingMessage,
successfulOutcome SuccessfulOutcome,
unsuccessfulOutcome UnsuccessfulOutcome,
...
}
InitiatingMessage ::= SEQUENCE {
procedureCode S1AP-ELEMENTARY-PROCEDURE.&procedureCode ({S1AP-ELEMENTARY-PROCEDURES}),
criticality S1AP-ELEMENTARY-PROCEDURE.&criticality ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
value S1AP-ELEMENTARY-PROCEDURE.&InitiatingMessage ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode})
}
SuccessfulOutcome ::= SEQUENCE {
procedureCode S1AP-ELEMENTARY-PROCEDURE.&procedureCode ({S1AP-ELEMENTARY-PROCEDURES}),
criticality S1AP-ELEMENTARY-PROCEDURE.&criticality ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
value S1AP-ELEMENTARY-PROCEDURE.&SuccessfulOutcome ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode})
}
UnsuccessfulOutcome ::= SEQUENCE {
procedureCode S1AP-ELEMENTARY-PROCEDURE.&procedureCode ({S1AP-ELEMENTARY-PROCEDURES}),
criticality S1AP-ELEMENTARY-PROCEDURE.&criticality ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
value S1AP-ELEMENTARY-PROCEDURE.&UnsuccessfulOutcome ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode})
}
-- **************************************************************
--
-- Interface Elementary Procedure List
--
-- **************************************************************
S1AP-ELEMENTARY-PROCEDURES S1AP-ELEMENTARY-PROCEDURE ::= {
S1AP-ELEMENTARY-PROCEDURES-CLASS-1 |
S1AP-ELEMENTARY-PROCEDURES-CLASS-2,
...
}
S1AP-ELEMENTARY-PROCEDURES-CLASS-1 S1AP-ELEMENTARY-PROCEDURE ::= {
handoverPreparation |
handoverResourceAllocation |
pathSwitchRequest |
e-RABSetup |
e-RABModify |
e-RABRelease |
initialContextSetup |
handoverCancel |
kill |
reset |
s1Setup |
uEContextModification |
uEContextRelease |
eNBConfigurationUpdate |
mMEConfigurationUpdate |
writeReplaceWarning ,
...
}
S1AP-ELEMENTARY-PROCEDURES-CLASS-2 S1AP-ELEMENTARY-PROCEDURE ::= {
handoverNotification |
e-RABReleaseIndication |
paging |
downlinkNASTransport |
initialUEMessage |
uplinkNASTransport |
errorIndication |
nASNonDeliveryIndication |
uEContextReleaseRequest |
downlinkS1cdma2000tunneling |
uplinkS1cdma2000tunneling |
uECapabilityInfoIndication |
eNBStatusTransfer |
mMEStatusTransfer |
deactivateTrace |
traceStart |
traceFailureIndication |
cellTrafficTrace |
locationReportingControl |
locationReportingFailureIndication |
locationReport |
overloadStart |
overloadStop |
eNBDirectInformationTransfer |
mMEDirectInformationTransfer |
eNBConfigurationTransfer |
mMEConfigurationTransfer |
privateMessage ,
...,
downlinkUEAssociatedLPPaTransport |
uplinkUEAssociatedLPPaTransport |
downlinkNonUEAssociatedLPPaTransport |
uplinkNonUEAssociatedLPPaTransport
}
-- **************************************************************
--
-- Interface Elementary Procedures
--
-- **************************************************************
handoverPreparation S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE HandoverRequired
SUCCESSFUL OUTCOME HandoverCommand
UNSUCCESSFUL OUTCOME HandoverPreparationFailure
PROCEDURE CODE id-HandoverPreparation
CRITICALITY reject
}
handoverResourceAllocation S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE HandoverRequest
SUCCESSFUL OUTCOME HandoverRequestAcknowledge
UNSUCCESSFUL OUTCOME HandoverFailure
PROCEDURE CODE id-HandoverResourceAllocation
CRITICALITY reject
}
handoverNotification S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE HandoverNotify
PROCEDURE CODE id-HandoverNotification
CRITICALITY ignore
}
pathSwitchRequest S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE PathSwitchRequest
SUCCESSFUL OUTCOME PathSwitchRequestAcknowledge
UNSUCCESSFUL OUTCOME PathSwitchRequestFailure
PROCEDURE CODE id-PathSwitchRequest
CRITICALITY reject
}
e-RABSetup S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE E-RABSetupRequest
SUCCESSFUL OUTCOME E-RABSetupResponse
PROCEDURE CODE id-E-RABSetup
CRITICALITY reject
}
e-RABModify S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE E-RABModifyRequest
SUCCESSFUL OUTCOME E-RABModifyResponse
PROCEDURE CODE id-E-RABModify
CRITICALITY reject
}
e-RABRelease S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE E-RABReleaseCommand
SUCCESSFUL OUTCOME E-RABReleaseResponse
PROCEDURE CODE id-E-RABRelease
CRITICALITY reject
}
e-RABReleaseIndication S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE E-RABReleaseIndication
PROCEDURE CODE id-E-RABReleaseIndication
CRITICALITY ignore
}
initialContextSetup S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE InitialContextSetupRequest
SUCCESSFUL OUTCOME InitialContextSetupResponse
UNSUCCESSFUL OUTCOME InitialContextSetupFailure
PROCEDURE CODE id-InitialContextSetup
CRITICALITY reject
}
uEContextReleaseRequest S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE UEContextReleaseRequest
PROCEDURE CODE id-UEContextReleaseRequest
CRITICALITY ignore
}
paging S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE Paging
PROCEDURE CODE id-Paging
CRITICALITY ignore
}
downlinkNASTransport S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE DownlinkNASTransport
PROCEDURE CODE id-downlinkNASTransport
CRITICALITY ignore
}
initialUEMessage S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE InitialUEMessage
PROCEDURE CODE id-initialUEMessage
CRITICALITY ignore
}
uplinkNASTransport S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE UplinkNASTransport
PROCEDURE CODE id-uplinkNASTransport
CRITICALITY ignore
}
nASNonDeliveryIndication S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE NASNonDeliveryIndication
PROCEDURE CODE id-NASNonDeliveryIndication
CRITICALITY ignore
}
handoverCancel S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE HandoverCancel
SUCCESSFUL OUTCOME HandoverCancelAcknowledge
PROCEDURE CODE id-HandoverCancel
CRITICALITY reject
}
reset S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE Reset
SUCCESSFUL OUTCOME ResetAcknowledge
PROCEDURE CODE id-Reset
CRITICALITY reject
}
errorIndication S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE ErrorIndication
PROCEDURE CODE id-ErrorIndication
CRITICALITY ignore
}
s1Setup S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE S1SetupRequest
SUCCESSFUL OUTCOME S1SetupResponse
UNSUCCESSFUL OUTCOME S1SetupFailure
PROCEDURE CODE id-S1Setup
CRITICALITY reject
}
eNBConfigurationUpdate S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE ENBConfigurationUpdate
SUCCESSFUL OUTCOME ENBConfigurationUpdateAcknowledge
UNSUCCESSFUL OUTCOME ENBConfigurationUpdateFailure
PROCEDURE CODE id-ENBConfigurationUpdate
CRITICALITY reject
}
mMEConfigurationUpdate S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE MMEConfigurationUpdate
SUCCESSFUL OUTCOME MMEConfigurationUpdateAcknowledge
UNSUCCESSFUL OUTCOME MMEConfigurationUpdateFailure
PROCEDURE CODE id-MMEConfigurationUpdate
CRITICALITY reject
}
downlinkS1cdma2000tunneling S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE DownlinkS1cdma2000tunneling
PROCEDURE CODE id-DownlinkS1cdma2000tunneling
CRITICALITY ignore
}
uplinkS1cdma2000tunneling S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE UplinkS1cdma2000tunneling
PROCEDURE CODE id-UplinkS1cdma2000tunneling
CRITICALITY ignore
}
uEContextModification S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE UEContextModificationRequest
SUCCESSFUL OUTCOME UEContextModificationResponse
UNSUCCESSFUL OUTCOME UEContextModificationFailure
PROCEDURE CODE id-UEContextModification
CRITICALITY reject
}
uECapabilityInfoIndication S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE UECapabilityInfoIndication
PROCEDURE CODE id-UECapabilityInfoIndication
CRITICALITY ignore
}
uEContextRelease S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE UEContextReleaseCommand
SUCCESSFUL OUTCOME UEContextReleaseComplete
PROCEDURE CODE id-UEContextRelease
CRITICALITY reject
}
eNBStatusTransfer S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE ENBStatusTransfer
PROCEDURE CODE id-eNBStatusTransfer
CRITICALITY ignore
}
mMEStatusTransfer S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE MMEStatusTransfer
PROCEDURE CODE id-MMEStatusTransfer
CRITICALITY ignore
}
deactivateTrace S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE DeactivateTrace
PROCEDURE CODE id-DeactivateTrace
CRITICALITY ignore
}
traceStart S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE TraceStart
PROCEDURE CODE id-TraceStart
CRITICALITY ignore
}
traceFailureIndication S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE TraceFailureIndication
PROCEDURE CODE id-TraceFailureIndication
CRITICALITY ignore
}
cellTrafficTrace S1AP-ELEMENTARY-PROCEDURE ::={
INITIATING MESSAGE CellTrafficTrace
PROCEDURE CODE id-CellTrafficTrace
CRITICALITY ignore
}
locationReportingControl S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE LocationReportingControl
PROCEDURE CODE id-LocationReportingControl
CRITICALITY ignore
}
locationReportingFailureIndication S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE LocationReportingFailureIndication
PROCEDURE CODE id-LocationReportingFailureIndication
CRITICALITY ignore
}
locationReport S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE LocationReport
PROCEDURE CODE id-LocationReport
CRITICALITY ignore
}
overloadStart S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE OverloadStart
PROCEDURE CODE id-OverloadStart
CRITICALITY ignore
}
overloadStop S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE OverloadStop
PROCEDURE CODE id-OverloadStop
CRITICALITY reject
}
writeReplaceWarning S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE WriteReplaceWarningRequest
SUCCESSFUL OUTCOME WriteReplaceWarningResponse
PROCEDURE CODE id-WriteReplaceWarning
CRITICALITY reject
}
eNBDirectInformationTransfer S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE ENBDirectInformationTransfer
PROCEDURE CODE id-eNBDirectInformationTransfer
CRITICALITY ignore
}
mMEDirectInformationTransfer S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE MMEDirectInformationTransfer
PROCEDURE CODE id-MMEDirectInformationTransfer
CRITICALITY ignore
}
eNBConfigurationTransfer S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE ENBConfigurationTransfer
PROCEDURE CODE id-eNBConfigurationTransfer
CRITICALITY ignore
}
mMEConfigurationTransfer S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE MMEConfigurationTransfer
PROCEDURE CODE id-MMEConfigurationTransfer
CRITICALITY ignore
}
privateMessage S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE PrivateMessage
PROCEDURE CODE id-PrivateMessage
CRITICALITY ignore
}
kill S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE KillRequest
SUCCESSFUL OUTCOME KillResponse
PROCEDURE CODE id-Kill
CRITICALITY reject
}
downlinkUEAssociatedLPPaTransport S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE DownlinkUEAssociatedLPPaTransport
PROCEDURE CODE id-downlinkUEAssociatedLPPaTransport
CRITICALITY ignore
}
uplinkUEAssociatedLPPaTransport S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE UplinkUEAssociatedLPPaTransport
PROCEDURE CODE id-uplinkUEAssociatedLPPaTransport
CRITICALITY ignore
}
downlinkNonUEAssociatedLPPaTransport S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE DownlinkNonUEAssociatedLPPaTransport
PROCEDURE CODE id-downlinkNonUEAssociatedLPPaTransport
CRITICALITY ignore
}
uplinkNonUEAssociatedLPPaTransport S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE UplinkNonUEAssociatedLPPaTransport
PROCEDURE CODE id-uplinkNonUEAssociatedLPPaTransport
CRITICALITY ignore
}
END
@@ -0,0 +1,412 @@
S1AP-PDU {
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
eps-Access (21) modules (3) s1ap (1) version1 (1)
}
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
IMPORTS
S1ap-Criticality,
S1ap-ProcedureCode,
S1ap-ProtocolIE-ID
FROM S1AP-CommonDataTypes
s1ap-maxProtocolIEs
FROM S1AP-Constants;
S1AP-PDU ::= CHOICE {
initiatingMessage S1ap-InitiatingMessage,
successfulOutcome S1ap-SuccessfulOutcome,
unsuccessfulOutcome S1ap-UnsuccessfulOutcome,
...
}
S1ap-InitiatingMessage ::= SEQUENCE {
procedureCode S1ap-ProcedureCode,
criticality S1ap-Criticality,
value ANY
}
S1ap-SuccessfulOutcome ::= SEQUENCE {
procedureCode S1ap-ProcedureCode,
criticality S1ap-Criticality,
value ANY
}
S1ap-UnsuccessfulOutcome ::= SEQUENCE {
procedureCode S1ap-ProcedureCode,
criticality S1ap-Criticality,
value ANY
}
S1ap-HandoverRequired ::= SEQUENCE {
s1ap-HandoverRequired-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-HandoverCommand ::= SEQUENCE {
s1ap-HandoverCommand-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-HandoverPreparationFailure ::= SEQUENCE {
s1ap-HandoverPreparationFailure-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-HandoverRequest ::= SEQUENCE {
s1ap-HandoverRequest-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-HandoverRequestAcknowledge ::= SEQUENCE {
s1ap-HandoverRequestAcknowledge-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-HandoverFailure ::= SEQUENCE {
s1ap-HandoverFailure-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-HandoverNotify ::= SEQUENCE {
s1ap-HandoverNotify-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-PathSwitchRequest ::= SEQUENCE {
s1ap-PathSwitchRequest-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-PathSwitchRequestAcknowledge ::= SEQUENCE {
s1ap-PathSwitchRequestAcknowledge-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-PathSwitchRequestFailure ::= SEQUENCE {
s1ap-PathSwitchRequestFailure-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-E-RABSetupRequest ::= SEQUENCE {
s1ap-E-RABSetupRequest-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-E-RABSetupResponse ::= SEQUENCE {
s1ap-E-RABSetupResponse-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-E-RABModifyRequest ::= SEQUENCE {
s1ap-E-RABModifyRequest-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-E-RABModifyResponse ::= SEQUENCE {
s1ap-E-RABModifyResponse-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-E-RABReleaseIndication ::= SEQUENCE {
s1ap-E-RABReleaseIndication-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-E-RABReleaseCommand ::= SEQUENCE {
s1ap-E-RABReleaseCommand-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-E-RABReleaseResponse ::= SEQUENCE {
s1ap-E-RABReleaseResponse-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-InitialContextSetupRequest ::= SEQUENCE {
s1ap-InitialContextSetupRequest-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-InitialContextSetupResponse ::= SEQUENCE {
s1ap-InitialContextSetupResponse-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-InitialContextSetupFailure ::= SEQUENCE {
s1ap-InitialContextSetupFailure-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-UEContextReleaseRequest ::= SEQUENCE {
s1ap-UEContextReleaseRequest-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-Paging ::= SEQUENCE {
s1ap-Paging-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-DownlinkNASTransport ::= SEQUENCE {
s1ap-DownlinkNASTransport-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-InitialUEMessage ::= SEQUENCE {
s1ap-InitialUEMessage-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-UplinkNASTransport ::= SEQUENCE {
s1ap-UplinkNASTransport-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-NASNonDeliveryIndication ::= SEQUENCE {
s1ap-NASNonDeliveryIndication-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-HandoverCancel ::= SEQUENCE {
s1ap-HandoverCancel-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-HandoverCancelAcknowledge ::= SEQUENCE {
s1ap-HandoverCancelAcknowledge-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-Reset ::= SEQUENCE {
s1ap-Reset-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-ResetAcknowledge ::= SEQUENCE {
s1ap-ResetAcknowledge-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-S1SetupResponse ::= SEQUENCE {
s1ap-S1SetupResponse-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-S1SetupRequest ::= SEQUENCE {
s1ap-S1SetupRequest-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-S1SetupFailure ::= SEQUENCE {
s1ap-S1SetupFailure-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-ErrorIndication ::= SEQUENCE {
s1ap-ErrorIndication-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-ENBConfigurationUpdate ::= SEQUENCE {
s1ap-ENBConfigurationUpdate-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-ENBConfigurationUpdateAcknowledge ::= SEQUENCE {
s1ap-ENBConfigurationUpdateAcknowledge-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-ENBConfigurationUpdateFailure ::= SEQUENCE {
s1ap-ENBConfigurationUpdateFailure-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-MMEConfigurationUpdate ::= SEQUENCE {
s1ap-MMEConfigurationUpdate-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-MMEConfigurationUpdateAcknowledge ::= SEQUENCE {
s1ap-MMEConfigurationUpdateAcknowledge-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-MMEConfigurationUpdateFailure ::= SEQUENCE {
s1ap-MMEConfigurationUpdateFailure-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-DownlinkS1cdma2000tunneling ::= SEQUENCE {
s1ap-DownlinkS1cdma2000tunneling-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-UplinkS1cdma2000tunneling ::= SEQUENCE {
s1ap-UplinkS1cdma2000tunneling-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-UEContextModificationRequest ::= SEQUENCE {
s1ap-UEContextModificationRequest-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-UEContextModificationResponse ::= SEQUENCE {
s1ap-UEContextModificationResponse-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-UEContextModificationFailure ::= SEQUENCE {
s1ap-UEContextModificationFailure-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-UECapabilityInfoIndication ::= SEQUENCE {
s1ap-UECapabilityInfoIndication-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-UEContextReleaseCommand ::= SEQUENCE {
s1ap-UEContextReleaseCommand-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-UEContextReleaseComplete ::= SEQUENCE {
s1ap-UEContextReleaseComplete-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-ENBStatusTransfer ::= SEQUENCE {
s1ap-ENBStatusTransfer-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-MMEStatusTransfer ::= SEQUENCE {
s1ap-MMEStatusTransfer-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-DeactivateTrace ::= SEQUENCE {
s1ap-DeactivateTrace-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-TraceStart ::= SEQUENCE {
s1ap-TraceStart-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-TraceFailureIndication ::= SEQUENCE {
s1ap-TraceFailureIndication-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-CellTrafficTrace ::= SEQUENCE {
s1ap-CellTrafficTrace-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-LocationReportingControl ::= SEQUENCE {
s1ap-LocationReportingControl-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-LocationReportingFailureIndication ::= SEQUENCE {
s1ap-LocationReportingFailureIndication-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-LocationReport ::= SEQUENCE {
s1ap-LocationReport-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-OverloadStart ::= SEQUENCE {
s1ap-OverloadStart-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-OverloadStop ::= SEQUENCE {
s1ap-OverloadStop-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-WriteReplaceWarningRequest ::= SEQUENCE {
s1ap-WriteReplaceWarningRequest-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-WriteReplaceWarningResponse ::= SEQUENCE {
s1ap-WriteReplaceWarningResponse-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-ENBDirectInformationTransfer ::= SEQUENCE {
s1ap-ENBDirectInformationTransfer-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-MMEDirectInformationTransfer ::= SEQUENCE {
s1ap-MMEDirectInformationTransfer-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-ENBConfigurationTransfer ::= SEQUENCE {
s1ap-ENBConfigurationTransfer-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-MMEConfigurationTransfer ::= SEQUENCE {
s1ap-MMEConfigurationTransfer-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-PrivateMessage ::= SEQUENCE {
s1ap-PrivateMessage-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-KillRequest ::= SEQUENCE {
s1ap-KillRequest-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-KillResponse ::= SEQUENCE {
s1ap-KillResponse-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-DownlinkUEAssociatedLPPaTransport ::= SEQUENCE {
s1ap-DownlinkUEAssociatedLPPaTransport-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-UplinkUEAssociatedLPPaTransport ::= SEQUENCE {
s1ap-UplinkUEAssociatedLPPaTransport-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-DownlinkNonUEAssociatedLPPaTransport ::= SEQUENCE {
s1ap-DownlinkNonUEAssociatedLPPaTransport-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-UplinkNonUEAssociatedLPPaTransport ::= SEQUENCE {
s1ap-UplinkNonUEAssociatedLPPaTransport-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE,
...
}
S1ap-IE ::= SEQUENCE {
id S1ap-ProtocolIE-ID,
criticality S1ap-Criticality,
value ANY
}
END
+674
View File
@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If 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 convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
@@ -0,0 +1,201 @@
-- **************************************************************
--
-- Common definitions
--
-- **************************************************************
S1AP-CommonDataTypes {
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-CommonDataTypes (3) }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
Criticality ::= ENUMERATED { reject, ignore, notify }
Presence ::= ENUMERATED { optional, conditional, mandatory }
PrivateIE-ID ::= CHOICE {
local INTEGER (0..65535),
global OBJECT IDENTIFIER
}
--ProcedureCode ::= INTEGER (0..255)
ProcedureCode ::= INTEGER {
id-HandoverPreparation(0),
id-HandoverResourceAllocation(1),
id-HandoverNotification(2),
id-PathSwitchRequest(3),
id-HandoverCancel(4),
id-E-RABSetup(5),
id-E-RABModify(6),
id-E-RABRelease(7),
id-E-RABReleaseIndication(8),
id-InitialContextSetup(9),
id-Paging(10),
id-downlinkNASTransport(11),
id-initialUEMessage(12),
id-uplinkNASTransport(13),
id-Reset(14),
id-ErrorIndication(15),
id-NASNonDeliveryIndication(16),
id-S1Setup(17),
id-UEContextReleaseRequest(18),
id-DownlinkS1cdma2000tunneling(19),
id-UplinkS1cdma2000tunneling(20),
id-UEContextModification(21),
id-UECapabilityInfoIndication(22),
id-UEContextRelease(23),
id-eNBStatusTransfer(24),
id-MMEStatusTransfer(25),
id-DeactivateTrace(26),
id-TraceStart(27),
id-TraceFailureIndication(28),
id-ENBConfigurationUpdate(29),
id-MMEConfigurationUpdate(30),
id-LocationReportingControl(31),
id-LocationReportingFailureIndication(32),
id-LocationReport(33),
id-OverloadStart(34),
id-OverloadStop(35),
id-WriteReplaceWarning(36),
id-eNBDirectInformationTransfer(37),
id-MMEDirectInformationTransfer(38),
id-PrivateMessage(39),
id-eNBConfigurationTransfer(40),
id-MMEConfigurationTransfer(41),
id-CellTrafficTrace(42)
} (0..255)
ProtocolExtensionID ::= INTEGER (0..65535)
ProtocolIE-ID ::= INTEGER {
id-MME-UE-S1AP-ID(0),
id-HandoverType(1),
id-Cause(2),
id-SourceID(3),
id-TargetID (4),
id-eNB-UE-S1AP-ID(8),
id-E-RABSubjecttoDataForwardingList(12),
id-E-RABtoReleaseListHOCmd(13),
id-E-RABDataForwardingItem(14),
id-E-RABReleaseItemBearerRelComp(15),
id-E-RABToBeSetupListBearerSUReq(16),
id-E-RABToBeSetupItemBearerSUReq(17),
id-E-RABAdmittedList(18),
id-E-RABFailedToSetupListHOReqAck(19),
id-E-RABAdmittedItem(20),
id-E-RABFailedtoSetupItemHOReqAck(21),
id-E-RABToBeSwitchedDLList(22),
id-E-RABToBeSwitchedDLItem(23),
id-E-RABToBeSetupListCtxtSUReq(24),
id-TraceActivation(25),
id-NAS-PDU(26),
id-E-RABToBeSetupItemHOReq(27),
id-E-RABSetupListBearerSURes(28),
id-E-RABFailedToSetupListBearerSURes(29),
id-E-RABToBeModifiedListBearerModReq(30),
id-E-RABModifyListBearerModRes(31),
id-E-RABFailedToModifyList(32),
id-E-RABToBeReleasedList(33),
id-E-RABFailedToReleaseList(34),
id-E-RABItem(35),
id-E-RABToBeModifiedItemBearerModReq(36),
id-E-RABModifyItemBearerModRes(37),
id-E-RABReleaseItem(38),
id-E-RABSetupItemBearerSURes(39),
id-SecurityContext(40),
id-HandoverRestrictionList(41),
id-UEPagingID(43),
id-pagingDRX(44),
id-TAIList(46),
id-TAIItem(47),
id-E-RABFailedToSetupListCtxtSURes(48),
id-E-RABReleaseItemHOCmd(49),
id-E-RABSetupItemCtxtSURes(50),
id-E-RABSetupListCtxtSURes(51),
id-E-RABToBeSetupItemCtxtSUReq(52),
id-E-RABToBeSetupListHOReq(53),
id-GERANtoLTEHOInformationRes(55),
id-UTRANtoLTEHOInformationRes(57),
id-CriticalityDiagnostics(58),
id-Global-ENB-ID(59),
id-eNBname(60),
id-MMEname(61),
id-ServedPLMNs(63),
id-SupportedTAs(64),
id-TimeToWait(65),
id-uEaggregateMaximumBitrate(66),
id-TAI(67),
id-E-RABReleaseListBearerRelComp(69),
id-cdma2000PDU(70),
id-cdma2000RATType(71),
id-cdma2000SectorID(72),
id-SecurityKey(73),
id-UERadioCapability(74),
id-GUMMEI-ID(75),
id-E-RABInformationListItem(78),
id-Direct-Forwarding-Path-Availability(79),
id-UEIdentityIndexValue(80),
id-cdma2000HOStatus(83),
id-cdma2000HORequiredIndication(84),
id-E-UTRAN-Trace-ID(86),
id-RelativeMMECapacity(87),
id-SourceMME-UE-S1AP-ID(88),
id-Bearers-SubjectToStatusTransfer-Item(89),
id-eNB-StatusTransfer-TransparentContainer(90),
id-UE-associatedLogicalS1-ConnectionItem(91),
id-ResetType(92),
id-UE-associatedLogicalS1-ConnectionListResAck(93),
id-E-RABToBeSwitchedULItem(94),
id-E-RABToBeSwitchedULList(95),
id-S-TMSI(96),
id-cdma2000OneXRAND(97),
id-RequestType(98),
id-UE-S1AP-IDs(99),
id-EUTRAN-CGI(100),
id-OverloadResponse(101),
id-cdma2000OneXSRVCCInfo(102),
id-E-RABFailedToBeReleasedList(103),
id-Source-ToTarget-TransparentContainer(104),
id-ServedGUMMEIs(105),
id-SubscriberProfileIDforRFP(106),
id-UESecurityCapabilities(107),
id-CSFallbackIndicator(108),
id-CNDomain(109),
id-E-RABReleasedList(110),
id-MessageIdentifier(111),
id-SerialNumber(112),
id-WarningAreaList(113),
id-RepetitionPeriod(114),
id-NumberofBroadcastRequest(115),
id-WarningType(116),
id-WarningSecurityInfo(117),
id-DataCodingScheme(118),
id-WarningMessageContents(119),
id-BroadcastCompletedAreaList(120),
id-Inter-SystemInformationTransferTypeEDT(121),
id-Inter-SystemInformationTransferTypeMDT(122),
id-Target-ToSource-TransparentContainer(123),
id-SRVCCOperationPossible(124),
id-SRVCCHOIndication(125),
id-NAS-DownlinkCount(126),
id-CSG-Id(127),
id-CSG-IdList(128),
id-SONConfigurationTransferECT(129),
id-SONConfigurationTransferMCT(130),
id-TraceCollectionEntityIPAddress(131),
id-MSClassmark2(132),
id-MSClassmark3(133),
id-RRC-Establishment-Cause(134),
id-NASSecurityParametersfromE-UTRAN(135),
id-NASSecurityParameterstoE-UTRAN(136),
id-DefaultPagingDRX(137),
id-Source-ToTarget-TransparentContainer-Secondary(138),
id-Target-ToSource-TransparentContainer-Secondary(139)
} (0..65535)
TriggeringMessage ::= ENUMERATED { initiating-message, successful-outcome, unsuccessfull-outcome }
END
@@ -0,0 +1,249 @@
-- **************************************************************
--
-- Constant definitions
--
-- **************************************************************
S1AP-Constants {
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-Constants (4) }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
-- **************************************************************
--
-- IE parameter types from other modules.
--
-- **************************************************************
IMPORTS
ProcedureCode,
ProtocolIE-ID
FROM S1AP-CommonDataTypes;
-- **************************************************************
--
-- Elementary Procedures
--
-- **************************************************************
id-HandoverPreparation ProcedureCode ::= 0
id-HandoverResourceAllocation ProcedureCode ::= 1
id-HandoverNotification ProcedureCode ::= 2
id-PathSwitchRequest ProcedureCode ::= 3
id-HandoverCancel ProcedureCode ::= 4
id-E-RABSetup ProcedureCode ::= 5
id-E-RABModify ProcedureCode ::= 6
id-E-RABRelease ProcedureCode ::= 7
id-E-RABReleaseIndication ProcedureCode ::= 8
id-InitialContextSetup ProcedureCode ::= 9
id-Paging ProcedureCode ::= 10
id-downlinkNASTransport ProcedureCode ::= 11
id-initialUEMessage ProcedureCode ::= 12
id-uplinkNASTransport ProcedureCode ::= 13
id-Reset ProcedureCode ::= 14
id-ErrorIndication ProcedureCode ::= 15
id-NASNonDeliveryIndication ProcedureCode ::= 16
id-S1Setup ProcedureCode ::= 17
id-UEContextReleaseRequest ProcedureCode ::= 18
id-DownlinkS1cdma2000tunneling ProcedureCode ::= 19
id-UplinkS1cdma2000tunneling ProcedureCode ::= 20
id-UEContextModification ProcedureCode ::= 21
id-UECapabilityInfoIndication ProcedureCode ::= 22
id-UEContextRelease ProcedureCode ::= 23
id-eNBStatusTransfer ProcedureCode ::= 24
id-MMEStatusTransfer ProcedureCode ::= 25
id-DeactivateTrace ProcedureCode ::= 26
id-TraceStart ProcedureCode ::= 27
id-TraceFailureIndication ProcedureCode ::= 28
id-ENBConfigurationUpdate ProcedureCode ::= 29
id-MMEConfigurationUpdate ProcedureCode ::= 30
id-LocationReportingControl ProcedureCode ::= 31
id-LocationReportingFailureIndication ProcedureCode ::= 32
id-LocationReport ProcedureCode ::= 33
id-OverloadStart ProcedureCode ::= 34
id-OverloadStop ProcedureCode ::= 35
id-WriteReplaceWarning ProcedureCode ::= 36
id-eNBDirectInformationTransfer ProcedureCode ::= 37
id-MMEDirectInformationTransfer ProcedureCode ::= 38
id-PrivateMessage ProcedureCode ::= 39
id-eNBConfigurationTransfer ProcedureCode ::= 40
id-MMEConfigurationTransfer ProcedureCode ::= 41
id-CellTrafficTrace ProcedureCode ::= 42
-- **************************************************************
--
-- Extension constants
--
-- **************************************************************
maxPrivateIEs INTEGER ::= 65535
maxProtocolExtensions INTEGER ::= 65535
maxProtocolIEs INTEGER ::= 65535
-- **************************************************************
--
-- Lists
--
-- **************************************************************
maxNrOfCSGs INTEGER ::= 256
maxNrOfE-RABs INTEGER ::= 256
maxnoofTAIs INTEGER ::= 256
maxnoofTACs INTEGER ::= 256
maxNrOfErrors INTEGER ::= 256
maxnoofBPLMNs INTEGER ::= 6
maxnoofPLMNsPerMME INTEGER ::= 32
maxnoofEPLMNs INTEGER ::= 15
maxnoofEPLMNsPlusOne INTEGER ::= 16
maxnoofForbLACs INTEGER ::= 4096
maxnoofForbTACs INTEGER ::= 4096
maxNrOfIndividualS1ConnectionsToReset INTEGER ::= 256
maxnoofCells INTEGER ::= 16
maxnoofTAIforWarning INTEGER ::= 65535
maxnoofCellID INTEGER ::= 65535
maxnoofEmergencyAreaID INTEGER ::= 65535
maxnoofCellinTAI INTEGER ::= 65535
maxnoofCellinEAI INTEGER ::= 65535
maxnoofeNBX2TLAs INTEGER ::= 2
maxnoofRATs INTEGER ::= 8
maxnoofGroupIDs INTEGER ::= 65535
maxnoofMMECs INTEGER ::= 256
-- **************************************************************
--
-- IEs
--
-- **************************************************************
id-MME-UE-S1AP-ID ProtocolIE-ID ::= 0
id-HandoverType ProtocolIE-ID ::= 1
id-Cause ProtocolIE-ID ::= 2
id-SourceID ProtocolIE-ID ::= 3
id-TargetID ProtocolIE-ID ::= 4
id-eNB-UE-S1AP-ID ProtocolIE-ID ::= 8
id-E-RABSubjecttoDataForwardingList ProtocolIE-ID ::= 12
id-E-RABtoReleaseListHOCmd ProtocolIE-ID ::= 13
id-E-RABDataForwardingItem ProtocolIE-ID ::= 14
id-E-RABReleaseItemBearerRelComp ProtocolIE-ID ::= 15
id-E-RABToBeSetupListBearerSUReq ProtocolIE-ID ::= 16
id-E-RABToBeSetupItemBearerSUReq ProtocolIE-ID ::= 17
id-E-RABAdmittedList ProtocolIE-ID ::= 18
id-E-RABFailedToSetupListHOReqAck ProtocolIE-ID ::= 19
id-E-RABAdmittedItem ProtocolIE-ID ::= 20
id-E-RABFailedtoSetupItemHOReqAck ProtocolIE-ID ::= 21
id-E-RABToBeSwitchedDLList ProtocolIE-ID ::= 22
id-E-RABToBeSwitchedDLItem ProtocolIE-ID ::= 23
id-E-RABToBeSetupListCtxtSUReq ProtocolIE-ID ::= 24
id-TraceActivation ProtocolIE-ID ::= 25
id-NAS-PDU ProtocolIE-ID ::= 26
id-E-RABToBeSetupItemHOReq ProtocolIE-ID ::= 27
id-E-RABSetupListBearerSURes ProtocolIE-ID ::= 28
id-E-RABFailedToSetupListBearerSURes ProtocolIE-ID ::= 29
id-E-RABToBeModifiedListBearerModReq ProtocolIE-ID ::= 30
id-E-RABModifyListBearerModRes ProtocolIE-ID ::= 31
id-E-RABFailedToModifyList ProtocolIE-ID ::= 32
id-E-RABToBeReleasedList ProtocolIE-ID ::= 33
id-E-RABFailedToReleaseList ProtocolIE-ID ::= 34
id-E-RABItem ProtocolIE-ID ::= 35
id-E-RABToBeModifiedItemBearerModReq ProtocolIE-ID ::= 36
id-E-RABModifyItemBearerModRes ProtocolIE-ID ::= 37
id-E-RABReleaseItem ProtocolIE-ID ::= 38
id-E-RABSetupItemBearerSURes ProtocolIE-ID ::= 39
id-SecurityContext ProtocolIE-ID ::= 40
id-HandoverRestrictionList ProtocolIE-ID ::= 41
id-UEPagingID ProtocolIE-ID ::= 43
id-pagingDRX ProtocolIE-ID ::= 44
id-TAIList ProtocolIE-ID ::= 46
id-TAIItem ProtocolIE-ID ::= 47
id-E-RABFailedToSetupListCtxtSURes ProtocolIE-ID ::= 48
id-E-RABReleaseItemHOCmd ProtocolIE-ID ::= 49
id-E-RABSetupItemCtxtSURes ProtocolIE-ID ::= 50
id-E-RABSetupListCtxtSURes ProtocolIE-ID ::= 51
id-E-RABToBeSetupItemCtxtSUReq ProtocolIE-ID ::= 52
id-E-RABToBeSetupListHOReq ProtocolIE-ID ::= 53
id-GERANtoLTEHOInformationRes ProtocolIE-ID ::= 55
id-UTRANtoLTEHOInformationRes ProtocolIE-ID ::= 57
id-CriticalityDiagnostics ProtocolIE-ID ::= 58
id-Global-ENB-ID ProtocolIE-ID ::= 59
id-eNBname ProtocolIE-ID ::= 60
id-MMEname ProtocolIE-ID ::= 61
id-ServedPLMNs ProtocolIE-ID ::= 63
id-SupportedTAs ProtocolIE-ID ::= 64
id-TimeToWait ProtocolIE-ID ::= 65
id-uEaggregateMaximumBitrate ProtocolIE-ID ::= 66
id-TAI ProtocolIE-ID ::= 67
id-E-RABReleaseListBearerRelComp ProtocolIE-ID ::= 69
id-cdma2000PDU ProtocolIE-ID ::= 70
id-cdma2000RATType ProtocolIE-ID ::= 71
id-cdma2000SectorID ProtocolIE-ID ::= 72
id-SecurityKey ProtocolIE-ID ::= 73
id-UERadioCapability ProtocolIE-ID ::= 74
id-GUMMEI-ID ProtocolIE-ID ::= 75
id-E-RABInformationListItem ProtocolIE-ID ::= 78
id-Direct-Forwarding-Path-Availability ProtocolIE-ID ::= 79
id-UEIdentityIndexValue ProtocolIE-ID ::= 80
id-cdma2000HOStatus ProtocolIE-ID ::= 83
id-cdma2000HORequiredIndication ProtocolIE-ID ::= 84
id-E-UTRAN-Trace-ID ProtocolIE-ID ::= 86
id-RelativeMMECapacity ProtocolIE-ID ::= 87
id-SourceMME-UE-S1AP-ID ProtocolIE-ID ::= 88
id-Bearers-SubjectToStatusTransfer-Item ProtocolIE-ID ::= 89
id-eNB-StatusTransfer-TransparentContainer ProtocolIE-ID ::= 90
id-UE-associatedLogicalS1-ConnectionItem ProtocolIE-ID ::= 91
id-ResetType ProtocolIE-ID ::= 92
id-UE-associatedLogicalS1-ConnectionListResAck ProtocolIE-ID ::= 93
id-E-RABToBeSwitchedULItem ProtocolIE-ID ::= 94
id-E-RABToBeSwitchedULList ProtocolIE-ID ::= 95
id-S-TMSI ProtocolIE-ID ::= 96
id-cdma2000OneXRAND ProtocolIE-ID ::= 97
id-RequestType ProtocolIE-ID ::= 98
id-UE-S1AP-IDs ProtocolIE-ID ::= 99
id-EUTRAN-CGI ProtocolIE-ID ::= 100
id-OverloadResponse ProtocolIE-ID ::= 101
id-cdma2000OneXSRVCCInfo ProtocolIE-ID ::= 102
id-E-RABFailedToBeReleasedList ProtocolIE-ID ::= 103
id-Source-ToTarget-TransparentContainer ProtocolIE-ID ::= 104
id-ServedGUMMEIs ProtocolIE-ID ::= 105
id-SubscriberProfileIDforRFP ProtocolIE-ID ::= 106
id-UESecurityCapabilities ProtocolIE-ID ::= 107
id-CSFallbackIndicator ProtocolIE-ID ::= 108
id-CNDomain ProtocolIE-ID ::= 109
id-E-RABReleasedList ProtocolIE-ID ::= 110
id-MessageIdentifier ProtocolIE-ID ::= 111
id-SerialNumber ProtocolIE-ID ::= 112
id-WarningAreaList ProtocolIE-ID ::= 113
id-RepetitionPeriod ProtocolIE-ID ::= 114
id-NumberofBroadcastRequest ProtocolIE-ID ::= 115
id-WarningType ProtocolIE-ID ::= 116
id-WarningSecurityInfo ProtocolIE-ID ::= 117
id-DataCodingScheme ProtocolIE-ID ::= 118
id-WarningMessageContents ProtocolIE-ID ::= 119
id-BroadcastCompletedAreaList ProtocolIE-ID ::= 120
id-Inter-SystemInformationTransferTypeEDT ProtocolIE-ID ::= 121
id-Inter-SystemInformationTransferTypeMDT ProtocolIE-ID ::= 122
id-Target-ToSource-TransparentContainer ProtocolIE-ID ::= 123
id-SRVCCOperationPossible ProtocolIE-ID ::= 124
id-SRVCCHOIndication ProtocolIE-ID ::= 125
id-NAS-DownlinkCount ProtocolIE-ID ::= 126
id-CSG-Id ProtocolIE-ID ::= 127
id-CSG-IdList ProtocolIE-ID ::= 128
id-SONConfigurationTransferECT ProtocolIE-ID ::= 129
id-SONConfigurationTransferMCT ProtocolIE-ID ::= 130
id-TraceCollectionEntityIPAddress ProtocolIE-ID ::= 131
id-MSClassmark2 ProtocolIE-ID ::= 132
id-MSClassmark3 ProtocolIE-ID ::= 133
id-RRC-Establishment-Cause ProtocolIE-ID ::= 134
id-NASSecurityParametersfromE-UTRAN ProtocolIE-ID ::= 135
id-NASSecurityParameterstoE-UTRAN ProtocolIE-ID ::= 136
id-DefaultPagingDRX ProtocolIE-ID ::= 137
id-Source-ToTarget-TransparentContainer-Secondary ProtocolIE-ID ::= 138
id-Target-ToSource-TransparentContainer-Secondary ProtocolIE-ID ::= 139
END
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,663 @@
S1AP-PDU {
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
eps-Access (21) modules (3) s1ap (1) version1 (1)
}
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
IMPORTS
UEAggregateMaximumBitrate,
Cause,
Cdma2000HORequiredIndication,
Cdma2000HOStatus,
Cdma2000OneXSRVCCInfo,
Cdma2000OneXRAND,
Cdma2000PDU,
Cdma2000RATType,
Cdma2000SectorID,
CNDomain,
CriticalityDiagnostics,
CSFallbackIndicator,
CSG-Id,
CSG-IdList,
Direct-Forwarding-Path-Availability,
Global-ENB-ID,
EUTRAN-CGI,
ENBname,
ENB-StatusTransfer-TransparentContainer,
ENB-UE-S1AP-ID,
GTP-TEID,
GUMMEI,
HandoverRestrictionList,
HandoverType,
MMEname,
MME-UE-S1AP-ID,
MSClassmark2,
MSClassmark3,
NAS-PDU,
NASSecurityParametersfromE-UTRAN,
NASSecurityParameterstoE-UTRAN,
OverloadResponse,
PagingDRX,
PLMNidentity,
RIMTransfer,
RelativeMMECapacity,
RequestType,
E-RAB-ID,
E-RABLevelQoSParameters,
E-RABList,
SecurityKey,
SecurityContext,
ServedGUMMEIs,
SONConfigurationTransfer,
Source-ToTarget-TransparentContainer,
SourceBSS-ToTargetBSS-TransparentContainer,
SourceeNB-ToTargeteNB-TransparentContainer,
SourceRNC-ToTargetRNC-TransparentContainer,
SubscriberProfileIDforRFP,
SRVCCOperationPossible,
SRVCCHOIndication,
SupportedTAs,
TAI,
Target-ToSource-TransparentContainer,
TargetBSS-ToSourceBSS-TransparentContainer,
TargeteNB-ToSourceeNB-TransparentContainer,
TargetID,
TargetRNC-ToSourceRNC-TransparentContainer,
TimeToWait,
TraceActivation,
E-UTRAN-Trace-ID,
TransportLayerAddress,
UEIdentityIndexValue,
UEPagingID,
UERadioCapability,
UE-S1AP-IDs,
UE-associatedLogicalS1-ConnectionItem,
UESecurityCapabilities,
S-TMSI,
MessageIdentifier,
SerialNumber,
WarningAreaList,
RepetitionPeriod,
NumberofBroadcastRequest,
WarningType,
WarningSecurityInfo,
DataCodingScheme,
WarningMessageContents,
BroadcastCompletedAreaList,
RRC-Establishment-Cause
FROM S1AP-IEs
ProcedureCode,
Criticality,
ProtocolIE-ID
FROM S1AP-CommonDataTypes
id-uEaggregateMaximumBitrate,
id-Cause,
id-cdma2000HORequiredIndication,
id-cdma2000HOStatus,
id-cdma2000OneXSRVCCInfo,
id-cdma2000OneXRAND,
id-cdma2000PDU,
id-cdma2000RATType,
id-cdma2000SectorID,
id-CNDomain,
id-CriticalityDiagnostics,
id-CSFallbackIndicator,
id-CSG-Id,
id-CSG-IdList,
id-DefaultPagingDRX,
id-Direct-Forwarding-Path-Availability,
id-Global-ENB-ID,
id-EUTRAN-CGI,
id-eNBname,
id-eNB-StatusTransfer-TransparentContainer,
id-eNB-UE-S1AP-ID,
id-GERANtoLTEHOInformationRes,
id-GUMMEI-ID,
id-HandoverRestrictionList,
id-HandoverType,
id-InitialContextSetup,
id-Inter-SystemInformationTransferTypeEDT,
id-Inter-SystemInformationTransferTypeMDT,
id-NAS-DownlinkCount,
id-MMEname,
id-MME-UE-S1AP-ID,
id-MSClassmark2,
id-MSClassmark3,
id-NAS-PDU,
id-NASSecurityParametersfromE-UTRAN,
id-NASSecurityParameterstoE-UTRAN,
id-OverloadResponse,
id-pagingDRX,
id-RelativeMMECapacity,
id-RequestType,
id-E-RABAdmittedItem,
id-E-RABAdmittedList,
id-E-RABDataForwardingItem,
id-E-RABFailedToModifyList,
id-E-RABFailedToReleaseList,
id-E-RABFailedtoSetupItemHOReqAck,
id-E-RABFailedToSetupListBearerSURes,
id-E-RABFailedToSetupListCtxtSURes,
id-E-RABFailedToSetupListHOReqAck,
id-E-RABFailedToBeReleasedList,
id-E-RABModify,
id-E-RABModifyItemBearerModRes,
id-E-RABModifyListBearerModRes,
id-E-RABRelease,
id-E-RABReleaseItemBearerRelComp,
id-E-RABReleaseItemHOCmd,
id-E-RABReleaseListBearerRelComp,
id-E-RABReleaseIndication,
id-E-RABSetup,
id-E-RABSetupItemBearerSURes,
id-E-RABSetupItemCtxtSURes,
id-E-RABSetupListBearerSURes,
id-E-RABSetupListCtxtSURes,
id-E-RABSubjecttoDataForwardingList,
id-E-RABToBeModifiedItemBearerModReq,
id-E-RABToBeModifiedListBearerModReq,
id-E-RABToBeReleasedList,
id-E-RABReleasedList,
id-E-RABToBeSetupItemBearerSUReq,
id-E-RABToBeSetupItemCtxtSUReq,
id-E-RABToBeSetupItemHOReq,
id-E-RABToBeSetupListBearerSUReq,
id-E-RABToBeSetupListCtxtSUReq,
id-E-RABToBeSetupListHOReq,
id-E-RABToBeSwitchedDLItem,
id-E-RABToBeSwitchedDLList,
id-E-RABToBeSwitchedULList,
id-E-RABToBeSwitchedULItem,
id-E-RABtoReleaseListHOCmd,
id-SecurityKey,
id-SecurityContext,
id-ServedGUMMEIs,
id-SONConfigurationTransferECT,
id-SONConfigurationTransferMCT,
id-Source-ToTarget-TransparentContainer,
id-Source-ToTarget-TransparentContainer-Secondary,
id-SourceMME-UE-S1AP-ID,
id-SRVCCOperationPossible,
id-SRVCCHOIndication,
id-SubscriberProfileIDforRFP,
id-SupportedTAs,
id-S-TMSI,
id-TAI,
id-TAIItem,
id-TAIList,
id-Target-ToSource-TransparentContainer,
id-Target-ToSource-TransparentContainer-Secondary,
id-TargetID,
id-TimeToWait,
id-TraceActivation,
id-E-UTRAN-Trace-ID,
id-UEIdentityIndexValue,
id-UEPagingID,
id-UERadioCapability,
id-UTRANtoLTEHOInformationRes,
id-UE-associatedLogicalS1-ConnectionListResAck,
id-UE-associatedLogicalS1-ConnectionItem,
id-UESecurityCapabilities,
id-UE-S1AP-IDs,
id-ResetType,
id-MessageIdentifier,
id-SerialNumber,
id-WarningAreaList,
id-RepetitionPeriod,
id-NumberofBroadcastRequest,
id-WarningType,
id-WarningSecurityInfo,
id-DataCodingScheme,
id-WarningMessageContents,
id-BroadcastCompletedAreaList,
id-RRC-Establishment-Cause,
id-TraceCollectionEntityIPAddress,
maxnoofTAIs,
maxNrOfErrors,
maxNrOfE-RABs,
maxNrOfIndividualS1ConnectionsToReset,
maxnoofEmergencyAreaID,
maxnoofCellID,
maxnoofTAIforWarning,
maxnoofCellinTAI,
maxnoofCellinEAI,
id-CellTrafficTrace,
id-DeactivateTrace,
id-downlinkNASTransport,
id-DownlinkS1cdma2000tunneling,
id-eNBStatusTransfer,
id-ErrorIndication,
id-HandoverCancel,
id-HandoverNotification,
id-HandoverPreparation,
id-HandoverResourceAllocation,
id-InitialContextSetup,
id-initialUEMessage,
id-ENBConfigurationUpdate,
id-LocationReportingControl,
id-LocationReportingFailureIndication,
id-LocationReport,
id-eNBDirectInformationTransfer,
id-MMEConfigurationUpdate,
id-MMEDirectInformationTransfer,
id-MMEStatusTransfer,
id-NASNonDeliveryIndication,
id-OverloadStart,
id-OverloadStop,
id-Paging,
id-PathSwitchRequest,
id-PrivateMessage,
id-Reset,
id-S1Setup,
id-E-RABModify,
id-E-RABRelease,
id-E-RABReleaseIndication,
id-E-RABSetup,
id-TraceFailureIndication,
id-TraceStart,
id-UECapabilityInfoIndication,
id-UEContextModification,
id-UEContextRelease,
id-UEContextReleaseRequest,
id-uplinkNASTransport,
id-UplinkS1cdma2000tunneling,
id-WriteReplaceWarning,
id-eNBConfigurationTransfer,
id-MMEConfigurationTransfer,
maxProtocolIEs
FROM S1AP-Constants;
-- **************************************************************
--
-- S1 SETUP ELEMENTARY PROCEDURE
--
-- **************************************************************
S1AP-ELEMENTARY-PROCEDURE ::= CLASS {
&InitiatingMessage ,
&SuccessfulOutcome OPTIONAL,
&UnsuccessfulOutcome OPTIONAL,
&procedureCode ProcedureCode UNIQUE,
&criticality Criticality DEFAULT ignore
}
WITH SYNTAX {
INITIATING MESSAGE &InitiatingMessage
[SUCCESSFUL OUTCOME &SuccessfulOutcome]
[UNSUCCESSFUL OUTCOME &UnsuccessfulOutcome]
PROCEDURE CODE &procedureCode
[CRITICALITY &criticality]
}
S1AP-PDU ::= CHOICE {
initiatingMessage InitiatingMessage,
successfulOutcome SuccessfulOutcome,
unsuccessfulOutcome UnsuccessfulOutcome,
...
}
InitiatingMessage ::= SEQUENCE {
procedureCode ProcedureCode,
criticality Criticality,
value ANY
}
SuccessfulOutcome ::= SEQUENCE {
procedureCode ProcedureCode,
criticality Criticality,
value ANY
}
UnsuccessfulOutcome ::= SEQUENCE {
procedureCode ProcedureCode,
criticality Criticality,
value ANY
}
HandoverRequired ::= SEQUENCE {
handoverRequired-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
HandoverCommand ::= SEQUENCE {
handoverCommand-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
HandoverPreparationFailure ::= SEQUENCE {
handoverPreparationFailure-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
HandoverRequest ::= SEQUENCE {
handoverRequest-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
HandoverRequestAcknowledge ::= SEQUENCE {
handoverRequestAcknowledge-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
HandoverFailure ::= SEQUENCE {
handoverFailure-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
HandoverNotify ::= SEQUENCE {
handoverNotify-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
PathSwitchRequest ::= SEQUENCE {
pathSwitchRequest-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
PathSwitchRequestAcknowledge ::= SEQUENCE {
pathSwitchRequestAcknowledge-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
PathSwitchRequestFailure ::= SEQUENCE {
pathSwitchRequestFailure-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
E-RABSetupRequest ::= SEQUENCE {
e-RABSetupRequest-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
E-RABSetupResponse ::= SEQUENCE {
e-RABSetupResponse-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
E-RABModifyRequest ::= SEQUENCE {
e-RABModifyRequest-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
E-RABModifyResponse ::= SEQUENCE {
e-RABModifyResponse-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
E-RABReleaseIndication ::= SEQUENCE {
e-RABReleaseIndication-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
E-RABReleaseCommand ::= SEQUENCE {
e-RABReleaseCommand-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
E-RABReleaseResponse ::= SEQUENCE {
e-RABReleaseResponse-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
InitialContextSetupRequest ::= SEQUENCE {
initialContextSetupRequest-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
InitialContextSetupResponse ::= SEQUENCE {
initialContextSetupResponse-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
InitialContextSetupFailure ::= SEQUENCE {
initialContextSetupFailure-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
UEContextReleaseRequest ::= SEQUENCE {
ueContextReleaseRequest-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
Paging ::= SEQUENCE {
paging-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
DownlinkNASTransport ::= SEQUENCE {
downlinkNASTransport-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
InitialUEMessage ::= SEQUENCE {
initialUEMessage-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
UplinkNASTransport ::= SEQUENCE {
uplinkNASTransport-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
NASNonDeliveryIndication ::= SEQUENCE {
nasNonDeliveryIndication-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
HandoverCancel ::= SEQUENCE {
handoverCancel-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
HandoverCancelAcknowledge ::= SEQUENCE {
handoverCancelAcknowledge-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
Reset ::= SEQUENCE {
reset-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
ResetAcknowledge ::= SEQUENCE {
resetAcknowledge-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
S1SetupResponse ::= SEQUENCE {
s1SetupResponse-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
S1SetupRequest ::= SEQUENCE {
s1SetupRequest-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
S1SetupFailure ::= SEQUENCE
{
s1SetupFailure-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
ErrorIndication ::= SEQUENCE {
errorIndication-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
ENBConfigurationUpdate ::= SEQUENCE {
eNBConfigurationUpdate-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
ENBConfigurationUpdateAcknowledge ::= SEQUENCE {
eNBConfigurationUpdateAcknowledge-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
ENBConfigurationUpdateFailure ::= SEQUENCE {
eNBConfigurationUpdateFailure-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
MMEConfigurationUpdate ::= SEQUENCE {
mmeConfigurationUpdate-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
MMEConfigurationUpdateAcknowledge ::= SEQUENCE {
mmeConfigurationUpdateAcknowledge-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
MMEConfigurationUpdateFailure ::= SEQUENCE {
mmeConfigurationUpdateFailure-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
DownlinkS1cdma2000tunneling ::= SEQUENCE {
downlinkS1cdma2000tunneling-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
UplinkS1cdma2000tunneling ::= SEQUENCE {
uplinkS1cdma2000tunneling-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
UEContextModificationRequest ::= SEQUENCE {
ueContextModificationRequest-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
UEContextModificationResponse ::= SEQUENCE {
ueContextModificationResponse-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
UEContextModificationFailure ::= SEQUENCE {
ueContextModificationFailure-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
UECapabilityInfoIndication ::= SEQUENCE {
ueCapabilityInfoIndication-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
UEContextReleaseCommand ::= SEQUENCE {
ueContextReleaseCommand-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
UEContextReleaseComplete ::= SEQUENCE {
ueContextReleaseComplete-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
ENBStatusTransfer ::= SEQUENCE {
eNBStatusTransfer-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
MMEStatusTransfer ::= SEQUENCE {
mmeStatusTransfer-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
DeactivateTrace ::= SEQUENCE {
deactivateTrace-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
TraceStart ::= SEQUENCE {
traceStart-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
TraceFailureIndication ::= SEQUENCE {
traceFailureIndication-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
CellTrafficTrace ::= SEQUENCE {
cellTrafficTrace-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
LocationReportingControl ::= SEQUENCE {
locationReportingControl-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
LocationReportingFailureIndication ::= SEQUENCE {
locationReportingFailureIndication-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
LocationReport ::= SEQUENCE {
locationReport-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
OverloadStart ::= SEQUENCE {
overloadStart-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
OverloadStop ::= SEQUENCE {
overloadStop-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
WriteReplaceWarningRequest ::= SEQUENCE {
writeReplaceWarningRequest-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
WriteReplaceWarningResponse ::= SEQUENCE {
writeReplaceWarningResponse-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
ENBDirectInformationTransfer ::= SEQUENCE {
eNBDirectInformationTransfer-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
MMEDirectInformationTransfer ::= SEQUENCE {
mmeDirectInformationTransfer-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
ENBConfigurationTransfer ::= SEQUENCE {
eNBConfigurationTransfer-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
MMEConfigurationTransfer ::= SEQUENCE {
mmeConfigurationTransfer-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
PrivateMessage ::= SEQUENCE {
privateMessage-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
IE ::= SEQUENCE {
id ProtocolIE-ID,
criticality Criticality,
value ANY
}
END
+674
View File
@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If 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 convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
@@ -0,0 +1,217 @@
-- **************************************************************
--
-- Common definitions
--
-- **************************************************************
S1AP-CommonDataTypes {
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-CommonDataTypes (3) }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
Criticality ::= ENUMERATED { reject, ignore, notify }
Presence ::= ENUMERATED { optional, conditional, mandatory }
PrivateIE-ID ::= CHOICE {
local INTEGER (0..65535),
global OBJECT IDENTIFIER
}
ProcedureCode ::= INTEGER {
id-HandoverPreparation(0),
id-HandoverResourceAllocation(1),
id-HandoverNotification(2),
id-PathSwitchRequest(3),
id-HandoverCancel(4),
id-E-RABSetup(5),
id-E-RABModify(6),
id-E-RABRelease(7),
id-E-RABReleaseIndication(8),
id-InitialContextSetup(9),
id-Paging(10),
id-downlinkNASTransport(11),
id-initialUEMessage(12),
id-uplinkNASTransport(13),
id-Reset(14),
id-ErrorIndication(15),
id-NASNonDeliveryIndication(16),
id-S1Setup(17),
id-UEContextReleaseRequest(18),
id-DownlinkS1cdma2000tunneling(19),
id-UplinkS1cdma2000tunneling(20),
id-UEContextModification(21),
id-UECapabilityInfoIndication(22),
id-UEContextRelease(23),
id-eNBStatusTransfer(24),
id-MMEStatusTransfer(25),
id-DeactivateTrace(26),
id-TraceStart(27),
id-TraceFailureIndication(28),
id-ENBConfigurationUpdate(29),
id-MMEConfigurationUpdate(30),
id-LocationReportingControl(31),
id-LocationReportingFailureIndication(32),
id-LocationReport(33),
id-OverloadStart(34),
id-OverloadStop(35),
id-WriteReplaceWarning(36),
id-eNBDirectInformationTransfer(37),
id-MMEDirectInformationTransfer(38),
id-PrivateMessage(39),
id-eNBConfigurationTransfer(40),
id-MMEConfigurationTransfer(41),
id-CellTrafficTrace(42),
id-Kill(43),
id-downlinkUEAssociatedLPPaTransport(44),
id-uplinkUEAssociatedLPPaTransport(45),
id-downlinkNonUEAssociatedLPPaTransport(46),
id-uplinkNonUEAssociatedLPPaTransport(47)
} (0..255)
ProtocolExtensionID ::= INTEGER (0..65535)
ProtocolIE-ID ::= INTEGER {
id-MME-UE-S1AP-ID(0),
id-HandoverType(1),
id-Cause(2),
id-SourceID(3),
id-TargetID (4),
id-eNB-UE-S1AP-ID(8),
id-E-RABSubjecttoDataForwardingList(12),
id-E-RABtoReleaseListHOCmd(13),
id-E-RABDataForwardingItem(14),
id-E-RABReleaseItemBearerRelComp(15),
id-E-RABToBeSetupListBearerSUReq(16),
id-E-RABToBeSetupItemBearerSUReq(17),
id-E-RABAdmittedList(18),
id-E-RABFailedToSetupListHOReqAck(19),
id-E-RABAdmittedItem(20),
id-E-RABFailedtoSetupItemHOReqAck(21),
id-E-RABToBeSwitchedDLList(22),
id-E-RABToBeSwitchedDLItem(23),
id-E-RABToBeSetupListCtxtSUReq(24),
id-TraceActivation(25),
id-NAS-PDU(26),
id-E-RABToBeSetupItemHOReq(27),
id-E-RABSetupListBearerSURes(28),
id-E-RABFailedToSetupListBearerSURes(29),
id-E-RABToBeModifiedListBearerModReq(30),
id-E-RABModifyListBearerModRes(31),
id-E-RABFailedToModifyList(32),
id-E-RABToBeReleasedList(33),
id-E-RABFailedToReleaseList(34),
id-E-RABItem(35),
id-E-RABToBeModifiedItemBearerModReq(36),
id-E-RABModifyItemBearerModRes(37),
id-E-RABReleaseItem(38),
id-E-RABSetupItemBearerSURes(39),
id-SecurityContext(40),
id-HandoverRestrictionList(41),
id-UEPagingID(43),
id-pagingDRX(44),
id-TAIList(46),
id-TAIItem(47),
id-E-RABFailedToSetupListCtxtSURes(48),
id-E-RABReleaseItemHOCmd(49),
id-E-RABSetupItemCtxtSURes(50),
id-E-RABSetupListCtxtSURes(51),
id-E-RABToBeSetupItemCtxtSUReq(52),
id-E-RABToBeSetupListHOReq(53),
id-GERANtoLTEHOInformationRes(55),
id-UTRANtoLTEHOInformationRes(57),
id-CriticalityDiagnostics(58),
id-Global-ENB-ID(59),
id-eNBname(60),
id-MMEname(61),
id-ServedPLMNs(63),
id-SupportedTAs(64),
id-TimeToWait(65),
id-uEaggregateMaximumBitrate(66),
id-TAI(67),
id-E-RABReleaseListBearerRelComp(69),
id-cdma2000PDU(70),
id-cdma2000RATType(71),
id-cdma2000SectorID(72),
id-SecurityKey(73),
id-UERadioCapability(74),
id-GUMMEI-ID(75),
id-E-RABInformationListItem(78),
id-Direct-Forwarding-Path-Availability(79),
id-UEIdentityIndexValue(80),
id-cdma2000HOStatus(83),
id-cdma2000HORequiredIndication(84),
id-E-UTRAN-Trace-ID(86),
id-RelativeMMECapacity(87),
id-SourceMME-UE-S1AP-ID(88),
id-Bearers-SubjectToStatusTransfer-Item(89),
id-eNB-StatusTransfer-TransparentContainer(90),
id-UE-associatedLogicalS1-ConnectionItem(91),
id-ResetType(92),
id-UE-associatedLogicalS1-ConnectionListResAck(93),
id-E-RABToBeSwitchedULItem(94),
id-E-RABToBeSwitchedULList(95),
id-S-TMSI(96),
id-cdma2000OneXRAND(97),
id-RequestType(98),
id-UE-S1AP-IDs(99),
id-EUTRAN-CGI(100),
id-OverloadResponse(101),
id-cdma2000OneXSRVCCInfo(102),
id-E-RABFailedToBeReleasedList(103),
id-Source-ToTarget-TransparentContainer(104),
id-ServedGUMMEIs(105),
id-SubscriberProfileIDforRFP(106),
id-UESecurityCapabilities(107),
id-CSFallbackIndicator(108),
id-CNDomain(109),
id-E-RABReleasedList(110),
id-MessageIdentifier(111),
id-SerialNumber(112),
id-WarningAreaList(113),
id-RepetitionPeriod(114),
id-NumberofBroadcastRequest(115),
id-WarningType(116),
id-WarningSecurityInfo(117),
id-DataCodingScheme(118),
id-WarningMessageContents(119),
id-BroadcastCompletedAreaList(120),
id-Inter-SystemInformationTransferTypeEDT(121),
id-Inter-SystemInformationTransferTypeMDT(122),
id-Target-ToSource-TransparentContainer(123),
id-SRVCCOperationPossible(124),
id-SRVCCHOIndication(125),
id-NAS-DownlinkCount(126),
id-CSG-Id(127),
id-CSG-IdList(128),
id-SONConfigurationTransferECT(129),
id-SONConfigurationTransferMCT(130),
id-TraceCollectionEntityIPAddress(131),
id-MSClassmark2(132),
id-MSClassmark3(133),
id-RRC-Establishment-Cause(134),
id-NASSecurityParametersfromE-UTRAN(135),
id-NASSecurityParameterstoE-UTRAN(136),
id-DefaultPagingDRX(137),
id-Source-ToTarget-TransparentContainer-Secondary(138),
id-Target-ToSource-TransparentContainer-Secondary(139),
id-EUTRANRoundTripDelayEstimationInfo(140),
id-BroadcastCancelledAreaList(141),
id-ConcurrentWarningMessageIndicator(142),
id-Data-Forwarding-Not-Possible(143),
id-ExtendedRepetitionPeriod(144),
id-CellAccessMode(145),
id-CSGMembershipStatus(146),
id-LPPa-PDU(147),
id-Routing-ID(148),
id-Time-Synchronization-Info(149),
id-PS-ServiceNotAvailable(150),
id-RegisteredLAI(159)
} (0..65535)
TriggeringMessage ::= ENUMERATED { initiating-message, successful-outcome, unsuccessfull-outcome }
END
@@ -0,0 +1,265 @@
-- **************************************************************
--
-- Constant definitions
--
-- **************************************************************
S1AP-Constants {
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-Constants (4) }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
-- **************************************************************
--
-- IE parameter types from other modules.
--
-- **************************************************************
IMPORTS
ProcedureCode,
ProtocolIE-ID
FROM S1AP-CommonDataTypes;
-- **************************************************************
--
-- Elementary Procedures
--
-- **************************************************************
id-HandoverPreparation ProcedureCode ::= 0
id-HandoverResourceAllocation ProcedureCode ::= 1
id-HandoverNotification ProcedureCode ::= 2
id-PathSwitchRequest ProcedureCode ::= 3
id-HandoverCancel ProcedureCode ::= 4
id-E-RABSetup ProcedureCode ::= 5
id-E-RABModify ProcedureCode ::= 6
id-E-RABRelease ProcedureCode ::= 7
id-E-RABReleaseIndication ProcedureCode ::= 8
id-InitialContextSetup ProcedureCode ::= 9
id-Paging ProcedureCode ::= 10
id-downlinkNASTransport ProcedureCode ::= 11
id-initialUEMessage ProcedureCode ::= 12
id-uplinkNASTransport ProcedureCode ::= 13
id-Reset ProcedureCode::= 14
id-ErrorIndication ProcedureCode ::= 15
id-NASNonDeliveryIndication ProcedureCode ::= 16
id-S1Setup ProcedureCode ::= 17
id-UEContextReleaseRequest ProcedureCode ::= 18
id-DownlinkS1cdma2000tunneling ProcedureCode ::= 19
id-UplinkS1cdma2000tunneling ProcedureCode ::= 20
id-UEContextModification ProcedureCode ::= 21
id-UECapabilityInfoIndication ProcedureCode ::= 22
id-UEContextRelease ProcedureCode ::= 23
id-eNBStatusTransfer ProcedureCode ::= 24
id-MMEStatusTransfer ProcedureCode ::= 25
id-DeactivateTrace ProcedureCode ::= 26
id-TraceStart ProcedureCode ::= 27
id-TraceFailureIndication ProcedureCode ::= 28
id-ENBConfigurationUpdate ProcedureCode ::= 29
id-MMEConfigurationUpdate ProcedureCode ::= 30
id-LocationReportingControl ProcedureCode ::= 31
id-LocationReportingFailureIndication ProcedureCode ::= 32
id-LocationReport ProcedureCode ::= 33
id-OverloadStart ProcedureCode ::= 34
id-OverloadStop ProcedureCode ::= 35
id-WriteReplaceWarning ProcedureCode ::= 36
id-eNBDirectInformationTransfer ProcedureCode ::= 37
id-MMEDirectInformationTransfer ProcedureCode ::= 38
id-PrivateMessage ProcedureCode ::= 39
id-eNBConfigurationTransfer ProcedureCode ::= 40
id-MMEConfigurationTransfer ProcedureCode ::= 41
id-CellTrafficTrace ProcedureCode ::= 42
id-Kill ProcedureCode ::= 43
id-downlinkUEAssociatedLPPaTransport ProcedureCode ::= 44
id-uplinkUEAssociatedLPPaTransport ProcedureCode ::= 45
id-downlinkNonUEAssociatedLPPaTransport ProcedureCode ::= 46
id-uplinkNonUEAssociatedLPPaTransport ProcedureCode ::= 47
-- **************************************************************
--
-- Extension constants
--
-- **************************************************************
maxPrivateIEs INTEGER ::= 65535
maxProtocolExtensions INTEGER ::= 65535
maxProtocolIEs INTEGER ::= 65535
-- **************************************************************
--
-- Lists
--
-- **************************************************************
maxNrOfCSGs INTEGER ::= 256
maxNrOfE-RABs INTEGER ::= 256
maxnoofTAIs INTEGER ::= 256
maxnoofTACs INTEGER ::= 256
maxNrOfErrors INTEGER ::= 256
maxnoofBPLMNs INTEGER ::= 6
maxnoofPLMNsPerMME INTEGER ::= 32
maxnoofEPLMNs INTEGER ::= 15
maxnoofEPLMNsPlusOne INTEGER ::= 16
maxnoofForbLACs INTEGER ::= 4096
maxnoofForbTACs INTEGER ::= 4096
maxNrOfIndividualS1ConnectionsToReset INTEGER ::= 256
maxnoofCells INTEGER ::= 16
maxnoofTAIforWarning INTEGER ::= 65535
maxnoofCellID INTEGER ::= 65535
maxnoofEmergencyAreaID INTEGER ::= 65535
maxnoofCellinTAI INTEGER ::= 65535
maxnoofCellinEAI INTEGER ::= 65535
maxnoofeNBX2TLAs INTEGER ::= 2
maxnoofRATs INTEGER ::= 8
maxnoofGroupIDs INTEGER ::= 65535
maxnoofMMECs INTEGER ::= 256
-- **************************************************************
--
-- IEs
--
-- **************************************************************
id-MME-UE-S1AP-ID ProtocolIE-ID ::= 0
id-HandoverType ProtocolIE-ID ::= 1
id-Cause ProtocolIE-ID ::= 2
id-SourceID ProtocolIE-ID ::= 3
id-TargetID ProtocolIE-ID ::= 4
id-eNB-UE-S1AP-ID ProtocolIE-ID ::= 8
id-E-RABSubjecttoDataForwardingList ProtocolIE-ID ::= 12
id-E-RABtoReleaseListHOCmd ProtocolIE-ID ::= 13
id-E-RABDataForwardingItem ProtocolIE-ID ::= 14
id-E-RABReleaseItemBearerRelComp ProtocolIE-ID ::= 15
id-E-RABToBeSetupListBearerSUReq ProtocolIE-ID ::= 16
id-E-RABToBeSetupItemBearerSUReq ProtocolIE-ID ::= 17
id-E-RABAdmittedList ProtocolIE-ID ::= 18
id-E-RABFailedToSetupListHOReqAck ProtocolIE-ID ::= 19
id-E-RABAdmittedItem ProtocolIE-ID ::= 20
id-E-RABFailedtoSetupItemHOReqAck ProtocolIE-ID ::= 21
id-E-RABToBeSwitchedDLList ProtocolIE-ID ::= 22
id-E-RABToBeSwitchedDLItem ProtocolIE-ID ::= 23
id-E-RABToBeSetupListCtxtSUReq ProtocolIE-ID ::= 24
id-TraceActivation ProtocolIE-ID ::= 25
id-NAS-PDU ProtocolIE-ID ::= 26
id-E-RABToBeSetupItemHOReq ProtocolIE-ID ::= 27
id-E-RABSetupListBearerSURes ProtocolIE-ID ::= 28
id-E-RABFailedToSetupListBearerSURes ProtocolIE-ID ::= 29
id-E-RABToBeModifiedListBearerModReq ProtocolIE-ID ::= 30
id-E-RABModifyListBearerModRes ProtocolIE-ID ::= 31
id-E-RABFailedToModifyList ProtocolIE-ID ::= 32
id-E-RABToBeReleasedList ProtocolIE-ID ::= 33
id-E-RABFailedToReleaseList ProtocolIE-ID ::= 34
id-E-RABItem ProtocolIE-ID ::= 35
id-E-RABToBeModifiedItemBearerModReq ProtocolIE-ID ::= 36
id-E-RABModifyItemBearerModRes ProtocolIE-ID ::= 37
id-E-RABReleaseItem ProtocolIE-ID ::= 38
id-E-RABSetupItemBearerSURes ProtocolIE-ID ::= 39
id-SecurityContext ProtocolIE-ID ::= 40
id-HandoverRestrictionList ProtocolIE-ID ::= 41
id-UEPagingID ProtocolIE-ID ::= 43
id-pagingDRX ProtocolIE-ID ::= 44
id-TAIList ProtocolIE-ID ::= 46
id-TAIItem ProtocolIE-ID ::= 47
id-E-RABFailedToSetupListCtxtSURes ProtocolIE-ID ::= 48
id-E-RABReleaseItemHOCmd ProtocolIE-ID ::= 49
id-E-RABSetupItemCtxtSURes ProtocolIE-ID ::= 50
id-E-RABSetupListCtxtSURes ProtocolIE-ID ::= 51
id-E-RABToBeSetupItemCtxtSUReq ProtocolIE-ID ::= 52
id-E-RABToBeSetupListHOReq ProtocolIE-ID ::= 53
id-GERANtoLTEHOInformationRes ProtocolIE-ID ::= 55
id-UTRANtoLTEHOInformationRes ProtocolIE-ID ::= 57
id-CriticalityDiagnostics ProtocolIE-ID ::= 58
id-Global-ENB-ID ProtocolIE-ID ::= 59
id-eNBname ProtocolIE-ID ::= 60
id-MMEname ProtocolIE-ID ::= 61
id-ServedPLMNs ProtocolIE-ID ::= 63
id-SupportedTAs ProtocolIE-ID ::= 64
id-TimeToWait ProtocolIE-ID ::= 65
id-uEaggregateMaximumBitrate ProtocolIE-ID ::= 66
id-TAI ProtocolIE-ID ::= 67
id-E-RABReleaseListBearerRelComp ProtocolIE-ID ::= 69
id-cdma2000PDU ProtocolIE-ID ::= 70
id-cdma2000RATType ProtocolIE-ID ::= 71
id-cdma2000SectorID ProtocolIE-ID ::= 72
id-SecurityKey ProtocolIE-ID ::= 73
id-UERadioCapability ProtocolIE-ID ::= 74
id-GUMMEI-ID ProtocolIE-ID ::= 75
id-E-RABInformationListItem ProtocolIE-ID ::= 78
id-Direct-Forwarding-Path-Availability ProtocolIE-ID ::= 79
id-UEIdentityIndexValue ProtocolIE-ID ::= 80
id-cdma2000HOStatus ProtocolIE-ID ::= 83
id-cdma2000HORequiredIndication ProtocolIE-ID ::= 84
id-E-UTRAN-Trace-ID ProtocolIE-ID ::= 86
id-RelativeMMECapacity ProtocolIE-ID ::= 87
id-SourceMME-UE-S1AP-ID ProtocolIE-ID ::= 88
id-Bearers-SubjectToStatusTransfer-Item ProtocolIE-ID ::= 89
id-eNB-StatusTransfer-TransparentContainer ProtocolIE-ID ::= 90
id-UE-associatedLogicalS1-ConnectionItem ProtocolIE-ID ::= 91
id-ResetType ProtocolIE-ID ::= 92
id-UE-associatedLogicalS1-ConnectionListResAck ProtocolIE-ID ::= 93
id-E-RABToBeSwitchedULItem ProtocolIE-ID ::= 94
id-E-RABToBeSwitchedULList ProtocolIE-ID ::= 95
id-S-TMSI ProtocolIE-ID ::= 96
id-cdma2000OneXRAND ProtocolIE-ID ::= 97
id-RequestType ProtocolIE-ID ::= 98
id-UE-S1AP-IDs ProtocolIE-ID ::= 99
id-EUTRAN-CGI ProtocolIE-ID ::= 100
id-OverloadResponse ProtocolIE-ID ::= 101
id-cdma2000OneXSRVCCInfo ProtocolIE-ID ::= 102
id-E-RABFailedToBeReleasedList ProtocolIE-ID ::= 103
id-Source-ToTarget-TransparentContainer ProtocolIE-ID ::= 104
id-ServedGUMMEIs ProtocolIE-ID ::= 105
id-SubscriberProfileIDforRFP ProtocolIE-ID ::= 106
id-UESecurityCapabilities ProtocolIE-ID ::= 107
id-CSFallbackIndicator ProtocolIE-ID ::= 108
id-CNDomain ProtocolIE-ID ::= 109
id-E-RABReleasedList ProtocolIE-ID ::= 110
id-MessageIdentifier ProtocolIE-ID ::= 111
id-SerialNumber ProtocolIE-ID ::= 112
id-WarningAreaList ProtocolIE-ID ::= 113
id-RepetitionPeriod ProtocolIE-ID ::= 114
id-NumberofBroadcastRequest ProtocolIE-ID ::= 115
id-WarningType ProtocolIE-ID ::= 116
id-WarningSecurityInfo ProtocolIE-ID ::= 117
id-DataCodingScheme ProtocolIE-ID ::= 118
id-WarningMessageContents ProtocolIE-ID ::= 119
id-BroadcastCompletedAreaList ProtocolIE-ID ::= 120
id-Inter-SystemInformationTransferTypeEDT ProtocolIE-ID ::= 121
id-Inter-SystemInformationTransferTypeMDT ProtocolIE-ID ::= 122
id-Target-ToSource-TransparentContainer ProtocolIE-ID ::= 123
id-SRVCCOperationPossible ProtocolIE-ID ::= 124
id-SRVCCHOIndication ProtocolIE-ID ::= 125
id-NAS-DownlinkCount ProtocolIE-ID ::= 126
id-CSG-Id ProtocolIE-ID ::= 127
id-CSG-IdList ProtocolIE-ID ::= 128
id-SONConfigurationTransferECT ProtocolIE-ID ::= 129
id-SONConfigurationTransferMCT ProtocolIE-ID ::= 130
id-TraceCollectionEntityIPAddress ProtocolIE-ID ::= 131
id-MSClassmark2 ProtocolIE-ID ::= 132
id-MSClassmark3 ProtocolIE-ID ::= 133
id-RRC-Establishment-Cause ProtocolIE-ID ::= 134
id-NASSecurityParametersfromE-UTRAN ProtocolIE-ID ::= 135
id-NASSecurityParameterstoE-UTRAN ProtocolIE-ID ::= 136
id-DefaultPagingDRX ProtocolIE-ID ::= 137
id-Source-ToTarget-TransparentContainer-Secondary ProtocolIE-ID ::= 138
id-Target-ToSource-TransparentContainer-Secondary ProtocolIE-ID ::= 139
id-EUTRANRoundTripDelayEstimationInfo ProtocolIE-ID ::= 140
id-BroadcastCancelledAreaList ProtocolIE-ID ::= 141
id-ConcurrentWarningMessageIndicator ProtocolIE-ID ::= 142
id-Data-Forwarding-Not-Possible ProtocolIE-ID ::= 143
id-ExtendedRepetitionPeriod ProtocolIE-ID ::= 144
id-CellAccessMode ProtocolIE-ID ::= 145
id-CSGMembershipStatus ProtocolIE-ID ::= 146
id-LPPa-PDU ProtocolIE-ID ::= 147
id-Routing-ID ProtocolIE-ID ::= 148
id-Time-Synchronization-Info ProtocolIE-ID ::= 149
id-PS-ServiceNotAvailable ProtocolIE-ID ::= 150
id-RegisteredLAI ProtocolIE-ID ::= 159
END
@@ -0,0 +1,197 @@
-- **************************************************************
--
-- Container definitions
--
-- **************************************************************
S1AP-Containers {
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-Containers (5) }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
-- **************************************************************
--
-- IE parameter types from other modules.
--
-- **************************************************************
IMPORTS
Criticality,
Presence,
PrivateIE-ID,
ProtocolExtensionID,
ProtocolIE-ID
FROM S1AP-CommonDataTypes
maxPrivateIEs,
maxProtocolExtensions,
maxProtocolIEs
FROM S1AP-Constants;
-- **************************************************************
--
-- Class Definition for Protocol IEs
--
-- **************************************************************
S1AP-PROTOCOL-IES ::= CLASS {
&id ProtocolIE-ID UNIQUE,
&criticality Criticality,
&Value,
&presence Presence
}
WITH SYNTAX {
ID &id
CRITICALITY &criticality
TYPE &Value
PRESENCE &presence
}
-- **************************************************************
--
-- Class Definition for Protocol IEs
--
-- **************************************************************
S1AP-PROTOCOL-IES-PAIR ::= CLASS {
&id ProtocolIE-ID UNIQUE,
&firstCriticality Criticality,
&FirstValue,
&secondCriticality Criticality,
&SecondValue,
&presence Presence
}
WITH SYNTAX {
ID &id
FIRST CRITICALITY &firstCriticality
FIRST TYPE &FirstValue
SECOND CRITICALITY &secondCriticality
SECOND TYPE &SecondValue
PRESENCE &presence
}
-- **************************************************************
--
-- Class Definition for Protocol Extensions
--
-- **************************************************************
S1AP-PROTOCOL-EXTENSION ::= CLASS {
&id ProtocolExtensionID UNIQUE,
&criticality Criticality,
&Extension,
&presence Presence
}
WITH SYNTAX {
ID &id
CRITICALITY &criticality
EXTENSION &Extension
PRESENCE &presence
}
-- **************************************************************
--
-- Class Definition for Private IEs
--
-- **************************************************************
S1AP-PRIVATE-IES ::= CLASS {
&id PrivateIE-ID,
&criticality Criticality,
&Value,
&presence Presence
}
WITH SYNTAX {
ID &id
CRITICALITY &criticality
TYPE &Value
PRESENCE &presence
}
-- **************************************************************
--
-- Container for Protocol IEs
--
-- **************************************************************
ProtocolIE-Container {S1AP-PROTOCOL-IES : IEsSetParam} ::=
SEQUENCE (SIZE (0..maxProtocolIEs)) OF
ProtocolIE-Field {{IEsSetParam}}
ProtocolIE-SingleContainer {S1AP-PROTOCOL-IES : IEsSetParam} ::=
ProtocolIE-Field {{IEsSetParam}}
ProtocolIE-Field {S1AP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE {
id S1AP-PROTOCOL-IES.&id ({IEsSetParam}),
criticality S1AP-PROTOCOL-IES.&criticality ({IEsSetParam}{@id}),
value S1AP-PROTOCOL-IES.&Value ({IEsSetParam}{@id})
}
-- **************************************************************
--
-- Container for Protocol IE Pairs
--
-- **************************************************************
ProtocolIE-ContainerPair {S1AP-PROTOCOL-IES-PAIR : IEsSetParam} ::=
SEQUENCE (SIZE (0..maxProtocolIEs)) OF
ProtocolIE-FieldPair {{IEsSetParam}}
ProtocolIE-FieldPair {S1AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= SEQUENCE {
id S1AP-PROTOCOL-IES-PAIR.&id ({IEsSetParam}),
firstCriticality S1AP-PROTOCOL-IES-PAIR.&firstCriticality ({IEsSetParam}{@id}),
firstValue S1AP-PROTOCOL-IES-PAIR.&FirstValue ({IEsSetParam}{@id}),
secondCriticality S1AP-PROTOCOL-IES-PAIR.&secondCriticality ({IEsSetParam}{@id}),
secondValue S1AP-PROTOCOL-IES-PAIR.&SecondValue ({IEsSetParam}{@id})
}
-- **************************************************************
--
-- Container Lists for Protocol IE Containers
--
-- **************************************************************
ProtocolIE-ContainerList {INTEGER : lowerBound, INTEGER : upperBound, S1AP-PROTOCOL-IES : IEsSetParam} ::=
SEQUENCE (SIZE (lowerBound..upperBound)) OF
ProtocolIE-SingleContainer {{IEsSetParam}}
ProtocolIE-ContainerPairList {INTEGER : lowerBound, INTEGER : upperBound, S1AP-PROTOCOL-IES-PAIR : IEsSetParam} ::=
SEQUENCE (SIZE (lowerBound..upperBound)) OF
ProtocolIE-ContainerPair {{IEsSetParam}}
-- **************************************************************
--
-- Container for Protocol Extensions
--
-- **************************************************************
ProtocolExtensionContainer {S1AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::=
SEQUENCE (SIZE (1..maxProtocolExtensions)) OF
ProtocolExtensionField {{ExtensionSetParam}}
ProtocolExtensionField {S1AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= SEQUENCE {
id S1AP-PROTOCOL-EXTENSION.&id ({ExtensionSetParam}),
criticality S1AP-PROTOCOL-EXTENSION.&criticality ({ExtensionSetParam}{@id}),
extensionValue S1AP-PROTOCOL-EXTENSION.&Extension ({ExtensionSetParam}{@id})
}
-- **************************************************************
--
-- Container for Private IEs
--
-- **************************************************************
PrivateIE-Container {S1AP-PRIVATE-IES : IEsSetParam } ::=
SEQUENCE (SIZE (1.. maxPrivateIEs)) OF
PrivateIE-Field {{IEsSetParam}}
PrivateIE-Field {S1AP-PRIVATE-IES : IEsSetParam} ::= SEQUENCE {
id S1AP-PRIVATE-IES.&id ({IEsSetParam}),
criticality S1AP-PRIVATE-IES.&criticality ({IEsSetParam}{@id}),
value S1AP-PRIVATE-IES.&Value ({IEsSetParam}{@id})
}
END
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,591 @@
-- **************************************************************
--
-- Elementary Procedure definitions
--
-- **************************************************************
S1AP-PDU-Descriptions {
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-PDU-Descriptions (0)}
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
-- **************************************************************
--
-- IE parameter types from other modules.
--
-- **************************************************************
IMPORTS
Criticality,
ProcedureCode
FROM S1AP-CommonDataTypes
CellTrafficTrace,
DeactivateTrace,
DownlinkUEAssociatedLPPaTransport,
DownlinkNASTransport,
DownlinkNonUEAssociatedLPPaTransport,
DownlinkS1cdma2000tunneling,
ENBDirectInformationTransfer,
ENBStatusTransfer,
ENBConfigurationUpdate,
ENBConfigurationUpdateAcknowledge,
ENBConfigurationUpdateFailure,
ErrorIndication,
HandoverCancel,
HandoverCancelAcknowledge,
HandoverCommand,
HandoverFailure,
HandoverNotify,
HandoverPreparationFailure,
HandoverRequest,
HandoverRequestAcknowledge,
HandoverRequired,
InitialContextSetupFailure,
InitialContextSetupRequest,
InitialContextSetupResponse,
InitialUEMessage,
KillRequest,
KillResponse,
LocationReportingControl,
LocationReportingFailureIndication,
LocationReport,
MMEConfigurationUpdate,
MMEConfigurationUpdateAcknowledge,
MMEConfigurationUpdateFailure,
MMEDirectInformationTransfer,
MMEStatusTransfer,
NASNonDeliveryIndication,
OverloadStart,
OverloadStop,
Paging,
PathSwitchRequest,
PathSwitchRequestAcknowledge,
PathSwitchRequestFailure,
PrivateMessage,
Reset,
ResetAcknowledge,
S1SetupFailure,
S1SetupRequest,
S1SetupResponse,
E-RABModifyRequest,
E-RABModifyResponse,
E-RABReleaseCommand,
E-RABReleaseResponse,
E-RABReleaseIndication,
E-RABSetupRequest,
E-RABSetupResponse,
TraceFailureIndication,
TraceStart,
UECapabilityInfoIndication,
UEContextModificationFailure,
UEContextModificationRequest,
UEContextModificationResponse,
UEContextReleaseCommand,
UEContextReleaseComplete,
UEContextReleaseRequest,
UplinkUEAssociatedLPPaTransport,
UplinkNASTransport,
UplinkNonUEAssociatedLPPaTransport,
UplinkS1cdma2000tunneling,
WriteReplaceWarningRequest,
WriteReplaceWarningResponse,
ENBConfigurationTransfer,
MMEConfigurationTransfer
FROM S1AP-PDU-Contents
id-CellTrafficTrace,
id-DeactivateTrace,
id-downlinkUEAssociatedLPPaTransport,
id-downlinkNASTransport,
id-downlinkNonUEAssociatedLPPaTransport,
id-DownlinkS1cdma2000tunneling,
id-eNBStatusTransfer,
id-ErrorIndication,
id-HandoverCancel,
id-HandoverNotification,
id-HandoverPreparation,
id-HandoverResourceAllocation,
id-InitialContextSetup,
id-initialUEMessage,
id-ENBConfigurationUpdate,
id-Kill,
id-LocationReportingControl,
id-LocationReportingFailureIndication,
id-LocationReport,
id-eNBDirectInformationTransfer,
id-MMEConfigurationUpdate,
id-MMEDirectInformationTransfer,
id-MMEStatusTransfer,
id-NASNonDeliveryIndication,
id-OverloadStart,
id-OverloadStop,
id-Paging,
id-PathSwitchRequest,
id-PrivateMessage,
id-Reset,
id-S1Setup,
id-E-RABModify,
id-E-RABRelease,
id-E-RABReleaseIndication,
id-E-RABSetup,
id-TraceFailureIndication,
id-TraceStart,
id-UECapabilityInfoIndication,
id-UEContextModification,
id-UEContextRelease,
id-UEContextReleaseRequest,
id-uplinkUEAssociatedLPPaTransport,
id-uplinkNASTransport,
id-uplinkNonUEAssociatedLPPaTransport,
id-UplinkS1cdma2000tunneling,
id-WriteReplaceWarning,
id-eNBConfigurationTransfer,
id-MMEConfigurationTransfer
FROM S1AP-Constants;
-- **************************************************************
--
-- Interface Elementary Procedure Class
--
-- **************************************************************
S1AP-ELEMENTARY-PROCEDURE ::= CLASS {
&InitiatingMessage ,
&SuccessfulOutcome OPTIONAL,
&UnsuccessfulOutcome OPTIONAL,
&procedureCode ProcedureCode UNIQUE,
&criticality Criticality DEFAULT ignore
}
WITH SYNTAX {
INITIATING MESSAGE &InitiatingMessage
[SUCCESSFUL OUTCOME &SuccessfulOutcome]
[UNSUCCESSFUL OUTCOME &UnsuccessfulOutcome]
PROCEDURE CODE &procedureCode
[CRITICALITY &criticality]
}
-- **************************************************************
--
-- Interface PDU Definition
--
-- **************************************************************
S1AP-PDU ::= CHOICE {
initiatingMessage InitiatingMessage,
successfulOutcome SuccessfulOutcome,
unsuccessfulOutcome UnsuccessfulOutcome,
...
}
InitiatingMessage ::= SEQUENCE {
procedureCode S1AP-ELEMENTARY-PROCEDURE.&procedureCode ({S1AP-ELEMENTARY-PROCEDURES}),
criticality S1AP-ELEMENTARY-PROCEDURE.&criticality ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
value S1AP-ELEMENTARY-PROCEDURE.&InitiatingMessage ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode})
}
SuccessfulOutcome ::= SEQUENCE {
procedureCode S1AP-ELEMENTARY-PROCEDURE.&procedureCode ({S1AP-ELEMENTARY-PROCEDURES}),
criticality S1AP-ELEMENTARY-PROCEDURE.&criticality ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
value S1AP-ELEMENTARY-PROCEDURE.&SuccessfulOutcome ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode})
}
UnsuccessfulOutcome ::= SEQUENCE {
procedureCode S1AP-ELEMENTARY-PROCEDURE.&procedureCode ({S1AP-ELEMENTARY-PROCEDURES}),
criticality S1AP-ELEMENTARY-PROCEDURE.&criticality ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
value S1AP-ELEMENTARY-PROCEDURE.&UnsuccessfulOutcome ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode})
}
-- **************************************************************
--
-- Interface Elementary Procedure List
--
-- **************************************************************
S1AP-ELEMENTARY-PROCEDURES S1AP-ELEMENTARY-PROCEDURE ::= {
S1AP-ELEMENTARY-PROCEDURES-CLASS-1 |
S1AP-ELEMENTARY-PROCEDURES-CLASS-2,
...
}
S1AP-ELEMENTARY-PROCEDURES-CLASS-1 S1AP-ELEMENTARY-PROCEDURE ::= {
handoverPreparation |
handoverResourceAllocation |
pathSwitchRequest |
e-RABSetup |
e-RABModify |
e-RABRelease |
initialContextSetup |
handoverCancel |
kill |
reset |
s1Setup |
uEContextModification |
uEContextRelease |
eNBConfigurationUpdate |
mMEConfigurationUpdate |
writeReplaceWarning ,
...
}
S1AP-ELEMENTARY-PROCEDURES-CLASS-2 S1AP-ELEMENTARY-PROCEDURE ::= {
handoverNotification |
e-RABReleaseIndication |
paging |
downlinkNASTransport |
initialUEMessage |
uplinkNASTransport |
errorIndication |
nASNonDeliveryIndication |
uEContextReleaseRequest |
downlinkS1cdma2000tunneling |
uplinkS1cdma2000tunneling |
uECapabilityInfoIndication |
eNBStatusTransfer |
mMEStatusTransfer |
deactivateTrace |
traceStart |
traceFailureIndication |
cellTrafficTrace |
locationReportingControl |
locationReportingFailureIndication |
locationReport |
overloadStart |
overloadStop |
eNBDirectInformationTransfer |
mMEDirectInformationTransfer |
eNBConfigurationTransfer |
mMEConfigurationTransfer |
privateMessage ,
...,
downlinkUEAssociatedLPPaTransport |
uplinkUEAssociatedLPPaTransport |
downlinkNonUEAssociatedLPPaTransport |
uplinkNonUEAssociatedLPPaTransport
}
-- **************************************************************
--
-- Interface Elementary Procedures
--
-- **************************************************************
handoverPreparation S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE HandoverRequired
SUCCESSFUL OUTCOME HandoverCommand
UNSUCCESSFUL OUTCOME HandoverPreparationFailure
PROCEDURE CODE id-HandoverPreparation
CRITICALITY reject
}
handoverResourceAllocation S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE HandoverRequest
SUCCESSFUL OUTCOME HandoverRequestAcknowledge
UNSUCCESSFUL OUTCOME HandoverFailure
PROCEDURE CODE id-HandoverResourceAllocation
CRITICALITY reject
}
handoverNotification S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE HandoverNotify
PROCEDURE CODE id-HandoverNotification
CRITICALITY ignore
}
pathSwitchRequest S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE PathSwitchRequest
SUCCESSFUL OUTCOME PathSwitchRequestAcknowledge
UNSUCCESSFUL OUTCOME PathSwitchRequestFailure
PROCEDURE CODE id-PathSwitchRequest
CRITICALITY reject
}
e-RABSetup S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE E-RABSetupRequest
SUCCESSFUL OUTCOME E-RABSetupResponse
PROCEDURE CODE id-E-RABSetup
CRITICALITY reject
}
e-RABModify S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE E-RABModifyRequest
SUCCESSFUL OUTCOME E-RABModifyResponse
PROCEDURE CODE id-E-RABModify
CRITICALITY reject
}
e-RABRelease S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE E-RABReleaseCommand
SUCCESSFUL OUTCOME E-RABReleaseResponse
PROCEDURE CODE id-E-RABRelease
CRITICALITY reject
}
e-RABReleaseIndication S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE E-RABReleaseIndication
PROCEDURE CODE id-E-RABReleaseIndication
CRITICALITY ignore
}
initialContextSetup S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE InitialContextSetupRequest
SUCCESSFUL OUTCOME InitialContextSetupResponse
UNSUCCESSFUL OUTCOME InitialContextSetupFailure
PROCEDURE CODE id-InitialContextSetup
CRITICALITY reject
}
uEContextReleaseRequest S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE UEContextReleaseRequest
PROCEDURE CODE id-UEContextReleaseRequest
CRITICALITY ignore
}
paging S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE Paging
PROCEDURE CODE id-Paging
CRITICALITY ignore
}
downlinkNASTransport S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE DownlinkNASTransport
PROCEDURE CODE id-downlinkNASTransport
CRITICALITY ignore
}
initialUEMessage S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE InitialUEMessage
PROCEDURE CODE id-initialUEMessage
CRITICALITY ignore
}
uplinkNASTransport S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE UplinkNASTransport
PROCEDURE CODE id-uplinkNASTransport
CRITICALITY ignore
}
nASNonDeliveryIndication S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE NASNonDeliveryIndication
PROCEDURE CODE id-NASNonDeliveryIndication
CRITICALITY ignore
}
handoverCancel S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE HandoverCancel
SUCCESSFUL OUTCOME HandoverCancelAcknowledge
PROCEDURE CODE id-HandoverCancel
CRITICALITY reject
}
reset S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE Reset
SUCCESSFUL OUTCOME ResetAcknowledge
PROCEDURE CODE id-Reset
CRITICALITY reject
}
errorIndication S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE ErrorIndication
PROCEDURE CODE id-ErrorIndication
CRITICALITY ignore
}
s1Setup S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE S1SetupRequest
SUCCESSFUL OUTCOME S1SetupResponse
UNSUCCESSFUL OUTCOME S1SetupFailure
PROCEDURE CODE id-S1Setup
CRITICALITY reject
}
eNBConfigurationUpdate S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE ENBConfigurationUpdate
SUCCESSFUL OUTCOME ENBConfigurationUpdateAcknowledge
UNSUCCESSFUL OUTCOME ENBConfigurationUpdateFailure
PROCEDURE CODE id-ENBConfigurationUpdate
CRITICALITY reject
}
mMEConfigurationUpdate S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE MMEConfigurationUpdate
SUCCESSFUL OUTCOME MMEConfigurationUpdateAcknowledge
UNSUCCESSFUL OUTCOME MMEConfigurationUpdateFailure
PROCEDURE CODE id-MMEConfigurationUpdate
CRITICALITY reject
}
downlinkS1cdma2000tunneling S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE DownlinkS1cdma2000tunneling
PROCEDURE CODE id-DownlinkS1cdma2000tunneling
CRITICALITY ignore
}
uplinkS1cdma2000tunneling S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE UplinkS1cdma2000tunneling
PROCEDURE CODE id-UplinkS1cdma2000tunneling
CRITICALITY ignore
}
uEContextModification S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE UEContextModificationRequest
SUCCESSFUL OUTCOME UEContextModificationResponse
UNSUCCESSFUL OUTCOME UEContextModificationFailure
PROCEDURE CODE id-UEContextModification
CRITICALITY reject
}
uECapabilityInfoIndication S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE UECapabilityInfoIndication
PROCEDURE CODE id-UECapabilityInfoIndication
CRITICALITY ignore
}
uEContextRelease S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE UEContextReleaseCommand
SUCCESSFUL OUTCOME UEContextReleaseComplete
PROCEDURE CODE id-UEContextRelease
CRITICALITY reject
}
eNBStatusTransfer S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE ENBStatusTransfer
PROCEDURE CODE id-eNBStatusTransfer
CRITICALITY ignore
}
mMEStatusTransfer S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE MMEStatusTransfer
PROCEDURE CODE id-MMEStatusTransfer
CRITICALITY ignore
}
deactivateTrace S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE DeactivateTrace
PROCEDURE CODE id-DeactivateTrace
CRITICALITY ignore
}
traceStart S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE TraceStart
PROCEDURE CODE id-TraceStart
CRITICALITY ignore
}
traceFailureIndication S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE TraceFailureIndication
PROCEDURE CODE id-TraceFailureIndication
CRITICALITY ignore
}
cellTrafficTrace S1AP-ELEMENTARY-PROCEDURE ::={
INITIATING MESSAGE CellTrafficTrace
PROCEDURE CODE id-CellTrafficTrace
CRITICALITY ignore
}
locationReportingControl S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE LocationReportingControl
PROCEDURE CODE id-LocationReportingControl
CRITICALITY ignore
}
locationReportingFailureIndication S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE LocationReportingFailureIndication
PROCEDURE CODE id-LocationReportingFailureIndication
CRITICALITY ignore
}
locationReport S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE LocationReport
PROCEDURE CODE id-LocationReport
CRITICALITY ignore
}
overloadStart S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE OverloadStart
PROCEDURE CODE id-OverloadStart
CRITICALITY ignore
}
overloadStop S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE OverloadStop
PROCEDURE CODE id-OverloadStop
CRITICALITY reject
}
writeReplaceWarning S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE WriteReplaceWarningRequest
SUCCESSFUL OUTCOME WriteReplaceWarningResponse
PROCEDURE CODE id-WriteReplaceWarning
CRITICALITY reject
}
eNBDirectInformationTransfer S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE ENBDirectInformationTransfer
PROCEDURE CODE id-eNBDirectInformationTransfer
CRITICALITY ignore
}
mMEDirectInformationTransfer S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE MMEDirectInformationTransfer
PROCEDURE CODE id-MMEDirectInformationTransfer
CRITICALITY ignore
}
eNBConfigurationTransfer S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE ENBConfigurationTransfer
PROCEDURE CODE id-eNBConfigurationTransfer
CRITICALITY ignore
}
mMEConfigurationTransfer S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE MMEConfigurationTransfer
PROCEDURE CODE id-MMEConfigurationTransfer
CRITICALITY ignore
}
privateMessage S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE PrivateMessage
PROCEDURE CODE id-PrivateMessage
CRITICALITY ignore
}
kill S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE KillRequest
SUCCESSFUL OUTCOME KillResponse
PROCEDURE CODE id-Kill
CRITICALITY reject
}
downlinkUEAssociatedLPPaTransport S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE DownlinkUEAssociatedLPPaTransport
PROCEDURE CODE id-downlinkUEAssociatedLPPaTransport
CRITICALITY ignore
}
uplinkUEAssociatedLPPaTransport S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE UplinkUEAssociatedLPPaTransport
PROCEDURE CODE id-uplinkUEAssociatedLPPaTransport
CRITICALITY ignore
}
downlinkNonUEAssociatedLPPaTransport S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE DownlinkNonUEAssociatedLPPaTransport
PROCEDURE CODE id-downlinkNonUEAssociatedLPPaTransport
CRITICALITY ignore
}
uplinkNonUEAssociatedLPPaTransport S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE UplinkNonUEAssociatedLPPaTransport
PROCEDURE CODE id-uplinkNonUEAssociatedLPPaTransport
CRITICALITY ignore
}
END
@@ -0,0 +1,413 @@
S1AP-PDU {
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
eps-Access (21) modules (3) s1ap (1) version1 (1)
}
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
IMPORTS
Criticality,
ProcedureCode,
ProtocolIE-ID
FROM S1AP-CommonDataTypes
maxProtocolIEs
FROM S1AP-Constants;
S1AP-PDU ::= CHOICE {
initiatingMessage InitiatingMessage,
successfulOutcome SuccessfulOutcome,
unsuccessfulOutcome UnsuccessfulOutcome,
...
}
InitiatingMessage ::= SEQUENCE {
procedureCode ProcedureCode,
criticality Criticality,
value ANY
}
SuccessfulOutcome ::= SEQUENCE {
procedureCode ProcedureCode,
criticality Criticality,
value ANY
}
UnsuccessfulOutcome ::= SEQUENCE {
procedureCode ProcedureCode,
criticality Criticality,
value ANY
}
HandoverRequired ::= SEQUENCE {
handoverRequired-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
HandoverCommand ::= SEQUENCE {
handoverCommand-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
HandoverPreparationFailure ::= SEQUENCE {
handoverPreparationFailure-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
HandoverRequest ::= SEQUENCE {
handoverRequest-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
HandoverRequestAcknowledge ::= SEQUENCE {
handoverRequestAcknowledge-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
HandoverFailure ::= SEQUENCE {
handoverFailure-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
HandoverNotify ::= SEQUENCE {
handoverNotify-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
PathSwitchRequest ::= SEQUENCE {
pathSwitchRequest-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
PathSwitchRequestAcknowledge ::= SEQUENCE {
pathSwitchRequestAcknowledge-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
PathSwitchRequestFailure ::= SEQUENCE {
pathSwitchRequestFailure-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
E-RABSetupRequest ::= SEQUENCE {
e-RABSetupRequest-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
E-RABSetupResponse ::= SEQUENCE {
e-RABSetupResponse-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
E-RABModifyRequest ::= SEQUENCE {
e-RABModifyRequest-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
E-RABModifyResponse ::= SEQUENCE {
e-RABModifyResponse-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
E-RABReleaseIndication ::= SEQUENCE {
e-RABReleaseIndication-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
E-RABReleaseCommand ::= SEQUENCE {
e-RABReleaseCommand-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
E-RABReleaseResponse ::= SEQUENCE {
e-RABReleaseResponse-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
InitialContextSetupRequest ::= SEQUENCE {
initialContextSetupRequest-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
InitialContextSetupResponse ::= SEQUENCE {
initialContextSetupResponse-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
InitialContextSetupFailure ::= SEQUENCE {
initialContextSetupFailure-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
UEContextReleaseRequest ::= SEQUENCE {
ueContextReleaseRequest-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
Paging ::= SEQUENCE {
paging-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
DownlinkNASTransport ::= SEQUENCE {
downlinkNASTransport-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
InitialUEMessage ::= SEQUENCE {
initialUEMessage-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
UplinkNASTransport ::= SEQUENCE {
uplinkNASTransport-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
NASNonDeliveryIndication ::= SEQUENCE {
nasNonDeliveryIndication-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
HandoverCancel ::= SEQUENCE {
handoverCancel-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
HandoverCancelAcknowledge ::= SEQUENCE {
handoverCancelAcknowledge-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
Reset ::= SEQUENCE {
reset-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
ResetAcknowledge ::= SEQUENCE {
resetAcknowledge-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
S1SetupResponse ::= SEQUENCE {
s1SetupResponse-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
S1SetupRequest ::= SEQUENCE {
s1SetupRequest-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
S1SetupFailure ::= SEQUENCE
{
s1SetupFailure-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
ErrorIndication ::= SEQUENCE {
errorIndication-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
ENBConfigurationUpdate ::= SEQUENCE {
eNBConfigurationUpdate-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
ENBConfigurationUpdateAcknowledge ::= SEQUENCE {
eNBConfigurationUpdateAcknowledge-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
ENBConfigurationUpdateFailure ::= SEQUENCE {
eNBConfigurationUpdateFailure-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
MMEConfigurationUpdate ::= SEQUENCE {
mmeConfigurationUpdate-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
MMEConfigurationUpdateAcknowledge ::= SEQUENCE {
mmeConfigurationUpdateAcknowledge-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
MMEConfigurationUpdateFailure ::= SEQUENCE {
mmeConfigurationUpdateFailure-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
DownlinkS1cdma2000tunneling ::= SEQUENCE {
downlinkS1cdma2000tunneling-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
UplinkS1cdma2000tunneling ::= SEQUENCE {
uplinkS1cdma2000tunneling-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
UEContextModificationRequest ::= SEQUENCE {
ueContextModificationRequest-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
UEContextModificationResponse ::= SEQUENCE {
ueContextModificationResponse-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
UEContextModificationFailure ::= SEQUENCE {
ueContextModificationFailure-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
UECapabilityInfoIndication ::= SEQUENCE {
ueCapabilityInfoIndication-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
UEContextReleaseCommand ::= SEQUENCE {
ueContextReleaseCommand-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
UEContextReleaseComplete ::= SEQUENCE {
ueContextReleaseComplete-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
ENBStatusTransfer ::= SEQUENCE {
eNBStatusTransfer-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
MMEStatusTransfer ::= SEQUENCE {
mmeStatusTransfer-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
DeactivateTrace ::= SEQUENCE {
deactivateTrace-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
TraceStart ::= SEQUENCE {
traceStart-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
TraceFailureIndication ::= SEQUENCE {
traceFailureIndication-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
CellTrafficTrace ::= SEQUENCE {
cellTrafficTrace-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
LocationReportingControl ::= SEQUENCE {
locationReportingControl-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
LocationReportingFailureIndication ::= SEQUENCE {
locationReportingFailureIndication-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
LocationReport ::= SEQUENCE {
locationReport-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
OverloadStart ::= SEQUENCE {
overloadStart-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
OverloadStop ::= SEQUENCE {
overloadStop-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
WriteReplaceWarningRequest ::= SEQUENCE {
writeReplaceWarningRequest-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
WriteReplaceWarningResponse ::= SEQUENCE {
writeReplaceWarningResponse-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
ENBDirectInformationTransfer ::= SEQUENCE {
eNBDirectInformationTransfer-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
MMEDirectInformationTransfer ::= SEQUENCE {
mmeDirectInformationTransfer-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
ENBConfigurationTransfer ::= SEQUENCE {
eNBConfigurationTransfer-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
MMEConfigurationTransfer ::= SEQUENCE {
mmeConfigurationTransfer-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
PrivateMessage ::= SEQUENCE {
privateMessage-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
KillRequest ::= SEQUENCE {
killRequest-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
KillResponse ::= SEQUENCE {
killResponse-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
DownlinkUEAssociatedLPPaTransport ::= SEQUENCE {
downlinkUEAssociatedLPPaTransport-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
UplinkUEAssociatedLPPaTransport ::= SEQUENCE {
uplinkUEAssociatedLPPaTransport-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
DownlinkNonUEAssociatedLPPaTransport ::= SEQUENCE {
downlinkNonUEAssociatedLPPaTransport-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
UplinkNonUEAssociatedLPPaTransport ::= SEQUENCE {
uplinkNonUEAssociatedLPPaTransport-ies SEQUENCE (SIZE (0..maxProtocolIEs)) OF IE,
...
}
IE ::= SEQUENCE {
id ProtocolIE-ID,
criticality Criticality,
value ANY
}
END
+17
View File
@@ -0,0 +1,17 @@
ASN1 message from S1AP TS 36.413-8a0
To successfully parse messages, the asn1c util should be patched with the patch provided (asn1cpatch.p0).
To do so:
0) create asn1c directory
1) Get the last revision of asn1c: svn co https://github.com/vlm/asn1c/trunk asn1c -r 1516
2) Go to asn1c directory
3) patch -p0 < ../asn1cpatch.p0
4) ./configure
5) make
6) make install
Aligned PER support is now included when parsing and generating asn1 code.
To generate S1AP ASN1 descriptions:
Files are automatically generated when changes are made on ASN1 files via Make build system.
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,22 @@
--- skeletons/OCTET_STRING.c.orig 2015-04-28 10:40:04.036970492 +0200
+++ skeletons/OCTET_STRING.c 2015-04-28 10:40:09.619970869 +0200
@@ -159,7 +159,7 @@
}
static struct _stack *
-_new_stack() {
+_new_stack(void) {
return (struct _stack *)CALLOC(1, sizeof(struct _stack));
}
--- skeletons/converter-sample.c.orig 2015-04-28 10:40:32.164972391 +0200
+++ skeletons/converter-sample.c 2015-04-28 10:40:37.140972727 +0200
@@ -353,7 +353,7 @@
} DynamicBuffer;
static void
-buffer_dump() {
+buffer_dump(void) {
uint8_t *p = DynamicBuffer.data + DynamicBuffer.offset;
uint8_t *e = p + DynamicBuffer.length - (DynamicBuffer.unbits ? 1 : 0);
if(!opt_debug) return;
+706
View File
@@ -0,0 +1,706 @@
import re, os, sys, string
import datetime
import getopt
import getpass
version = "1.0.2"
lines = ""
iesDefs = {}
ieofielist = {}
outdir = './'
filenames = []
verbosity = 0
prefix = ""
FAIL = '\033[91m'
WARN = '\033[93m'
ENDC = '\033[0m'
fileprefix = ""
fileprefix_first_upper = ""
def printFail(string):
sys.stderr.write(FAIL + string + ENDC + "\n")
def printWarning(string):
print WARN + string + ENDC
def printDebug(string):
if verbosity > 0:
print string
def outputHeaderToFile(f, filename):
now = datetime.datetime.now()
f.write("""/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2013 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes
06410 Biot FRANCE
*******************************************************************************/
""")
f.write("/*******************************************************************************\n")
f.write(" * This file had been created by asn1tostruct.py script v%s\n" % (version))
f.write(" * Please do not modify this file but regenerate it via script.\n")
f.write(" * Created on: %s by %s\n * from %s\n" % (str(now), getpass.getuser(), filenames))
f.write(" ******************************************************************************/\n")
def lowerFirstCamelWord(word):
""" puts the first word in a CamelCase Word in lowercase.
I.e. CustomerID becomes customerID, XMLInfoTest becomes xmlInfoTest
"""
newstr = ''
swapped = word.swapcase()
idx = 0
# if it's all-caps, return an all-lowered version
lowered = word.lower()
if swapped == lowered:
return lowered
for c in swapped:
if c in string.lowercase:
newstr += c
idx += 1
else:
break
if idx < 2:
newstr += word[idx:]
else:
newstr = newstr[:-1]+ word[idx-1:]
return newstr
def usage():
print "Python parser for asn1 v%s" % (version)
print "Usage: python asn1tostruct.py [options]"
print "Available options:"
print "-d Enable script debug"
print "-f [file] Input file to parse"
print "-o [dir] Output files to given directory"
print "-h Print this help and return"
try:
opts, args = getopt.getopt(sys.argv[1:], "df:ho:", ["debug", "file", "help", "outdir"])
except getopt.GetoptError as err:
# print help information and exit:
usage()
sys.exit(2)
for o, a in opts:
if o in ("-f", "--file"):
filenames.append(a)
if o in ("-d", "--debug"):
verbosity = 1
if o in ("-o", "--outdir"):
outdir = a
if outdir.rfind('/') != len(outdir):
outdir += '/'
if o in ("-h", "--help"):
usage()
sys.exit(2)
for filename in filenames:
file = open(filename, 'r')
for line in file:
# Removing any comment
if line.find('--') >= 0:
line = line[:line.find('--')]
# Removing any carriage return
lines += re.sub('\r', '', line)
for m in re.findall(r'([a-zA-Z0-9-]+)\s*::=\s+SEQUENCE\s+\(\s*SIZE\s*\(\s*\d+\s*\.\.\s*[0-9a-zA-Z-]+\s*\)\s*\)\s*OF\s+[a-zA-Z-]+\s*\{\s*\{\s*([0-9a-zA-Z-]+)\s*\}\s*\}', lines, re.MULTILINE):
ieofielist[m[0]] = m[1]
for m in re.findall(r'([a-zA-Z0-9-]+)\s*::=\s+E-RAB-IE-ContainerList\s*\{\s*\{\s*([a-zA-Z0-9-]+)\s*\}\s*\}', lines, re.MULTILINE):
ieofielist[m[0]] = m[1]
for i in re.findall(r'([a-zA-Z0-9-]+)\s+([A-Z0-9-]+)\s*::=\s*\{\s+([\,\|\{\}\t\n\.{3}\ \-a-zA-Z0-9]+)\s+}\n', lines, re.MULTILINE):
ies = []
maxLength = 0
# TODO: handle extensions
if i[1].find('EXTENSION') >= 0:
continue
if fileprefix == "":
fileprefix = i[1][:i[1].find('-')].lower()
for j in re.findall(r'\s*\{\s*([a-zA-Z0-9-\ \t]+)\s*\}\s*[\|,]*', i[2], re.MULTILINE):
for k in re.findall(r'ID\s*([a-zA-Z0-9\-]+)\s*CRITICALITY\s*([a-zA-Z0-9\-]+)\s+[A-Z]+\s+([a-zA-Z0-9\-]+)\s*PRESENCE\s*([a-zA-Z0-9\-]+)', j, re.MULTILINE):
printDebug("Got new ie for message " + i[0] + ": " + str(k))
if len(k[2]) > maxLength:
maxLength = len(k[2])
ies.append(k)
if len(ies) > 0:
iesDefs[i[0]] = { "length": maxLength, "ies": ies }
else:
printWarning("Didn't find any information element for message: " + i[0])
if len(iesDefs) == 0:
printFail("No Information Element parsed, exiting")
sys.exit(0)
fileprefix_first_upper = fileprefix[0].upper() + fileprefix[1:]
f = open(outdir + fileprefix + '_ies_defs.h', 'w')
outputHeaderToFile(f, filename)
f.write("#include \"%s_common.h\"\n\n" % (fileprefix))
f.write("#ifndef %s_IES_DEFS_H_\n#define %s_IES_DEFS_H_\n\n" % (fileprefix.upper(), fileprefix.upper()))
f.write("/* Define the version of script used to generate this file */\n")
f.write("#define %s_SCRIPT_VERSION (%s)\n\n" % (fileprefix.upper(), re.sub('\.', '', version)))
for key in iesDefs:
if key not in ieofielist.values():
continue
for (i, j) in ieofielist.items():
if j == key:
break
f.write("typedef struct %sIEs_s {\n" % (re.sub('-', '_', i)))
f.write(" A_SEQUENCE_OF(struct %s_s) %s;\n" % (re.sub('IEs', '', re.sub('-', '_', ieofielist[i])), lowerFirstCamelWord(re.sub('IEs', '', re.sub('-', '_', ieofielist[i])))))
f.write("} %sIEs_t;\n\n" % (re.sub('-', '_', i)))
for key in iesDefs:
keyupperunderscore = re.sub('-', '_', key.upper())
keylowerunderscore = re.sub('-', '_', key.lower())
shift = 0
if len(iesDefs[key]["ies"]) == 0:
continue
# Presence mask
for ie in iesDefs[key]["ies"]:
ieupperunderscore = re.sub('-', '_', re.sub('id-', '', ie[0])).upper()
if ie[3] == "optional" or ie[3] == "conditional":
f.write("#define {0:<{pad}} {1}\n".format("%s_%s_PRESENT" % (keyupperunderscore, ieupperunderscore), "(1 << %d)" % shift,
pad=iesDefs[key]["length"] + len(keyupperunderscore) + 9))
shift += 1
if (shift > 0):
f.write("\n")
f.write("typedef struct %s_s {\n" % (re.sub('-', '_', key)))
if (shift > 0):
f.write(" {0:<{pad}} {1};\n".format("uint16_t", "presenceMask", pad=iesDefs[key]["length"] + 2))
for ie in iesDefs[key]["ies"]:
ieunderscore = re.sub('-', '_', ie[2])
iename = re.sub('id-', '', ie[0])
ienameunderscore = lowerFirstCamelWord(re.sub('-', '_', iename))
if ie[2] in ieofielist:
f.write(" %sIEs_t %s;" % (re.sub('-', '_', ie[2]), ienameunderscore))
else:
f.write(" {0:<{pad}} {1};".format("%s_t" % ieunderscore, ienameunderscore, pad=iesDefs[key]["length"] + 2))
if ie[3] == "optional":
f.write(" ///< Optional field")
elif ie[3] == "conditional":
f.write(" ///< Conditional field")
f.write("\n")
f.write("} %s_t;\n\n" % (re.sub('-', '_', key)))
f.write("typedef struct %s_message_s {\n" % (fileprefix))
f.write(" %s_ProcedureCode_t procedureCode;\n" % (fileprefix_first_upper))
f.write(" %s_Criticality_t criticality;\n" % (fileprefix_first_upper))
f.write(" uint8_t direction;\n")
f.write(" union {\n")
messageList = iesDefs.keys()
messageList.sort()
for message in messageList:
if message in ieofielist.values():
continue
if len(iesDefs[message]["ies"]) == 0:
continue
f.write(" %s_t %s;\n" % (re.sub('-', '_', message), lowerFirstCamelWord(re.sub('-', '_', message))))
f.write(" } msg;\n")
f.write("} %s_message;\n\n" % (fileprefix))
for key in iesDefs:
if key in ieofielist.values():
continue
structName = re.sub('ies', '', key)
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', re.sub('-IEs', '', key)))
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
keylowerunderscore = re.sub('-', '_', key.lower())
firstlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
f.write("/** \\brief Decode function for %s ies.\n" % (key))
if len(iesDefs[key]["ies"]) != 0:
f.write(" * \\param %s Pointer to ASN1 structure in which data will be stored\n" % (lowerFirstCamelWord(re.sub('-', '_', key))))
f.write(" * \\param any_p Pointer to the ANY value to decode.\n")
f.write(" **/\n")
f.write("int %s_decode_%s(\n" % (fileprefix, keylowerunderscore))
if len(iesDefs[key]["ies"]) != 0:
f.write(" %s_t *%s,\n" % (re.sub('-', '_', key), lowerFirstCamelWord(re.sub('-', '_', key))))
f.write(" ANY_t *any_p);\n\n")
if len(iesDefs[key]["ies"]) == 0:
continue
f.write("/** \\brief Encode function for %s ies.\n" % (key))
f.write(" * \\param %s Pointer to the ASN1 structure.\n" % (firstlower))
f.write(" * \\param %s Pointer to the IES structure.\n" % (lowerFirstCamelWord(re.sub('-', '_', key))))
f.write(" **/\n")
f.write("int %s_encode_%s(\n" % (fileprefix, re.sub('-', '_', structName.lower())))
f.write(" %s_t *%s,\n" % (asn1cStruct, firstlower))
f.write(" %s_t *%s);\n\n" % (re.sub('-', '_', key), lowerFirstCamelWord(re.sub('-', '_', key))))
for key in iesDefs:
if key not in ieofielist.values():
continue
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', key))
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
firstlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
f.write("/** \\brief Encode function for %s ies.\n" % (key))
f.write(" * \\param %s Pointer to the ASN1 structure.\n" % (firstlower))
f.write(" * \\param %s Pointer to the IES structure.\n" % (lowerFirstCamelWord(re.sub('-', '_', key))))
f.write(" **/\n")
f.write("int %s_encode_%s(\n" % (fileprefix, firstlower.lower()))
f.write(" %s_t *%s,\n" % (asn1cStruct, firstlower))
f.write(" %sIEs_t *%sIEs);\n\n" % (asn1cStruct, firstlower))
f.write("/** \\brief Decode function for %s ies.\n" % (key))
f.write(" * \\param any_p Pointer to the ANY value to decode.\n")
f.write(" * \\param callback Callback function called when any_p is successfully decoded.\n")
f.write(" **/\n")
f.write("int %s_decode_%s(\n" % (fileprefix, firstlower.lower()))
f.write(" %sIEs_t *%sIEs,\n" % (asn1cStruct, firstlower))
f.write(" %s_t *%s);\n\n" % (asn1cStruct, lowerFirstCamelWord(asn1cStruct)))
for key in iesDefs:
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', key))
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
firstlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
if key in ieofielist.values():
f.write("/** \\brief Display %s encapsulated IE using XER encoding.\n" % (asn1cStruct))
f.write(" * \\param %s Pointer to the IES structure.\n" % (lowerFirstCamelWord(re.sub('-', '_', key))))
f.write(" * \\param file File descriptor to write output.\n")
f.write(" **/\n")
f.write("asn_enc_rval_t %s_xer_print_%s(\n" % (fileprefix, re.sub('item', 'list', firstlower.lower())))
f.write(" asn_app_consume_bytes_f *cb,\n")
f.write(" void *app_key,\n")
f.write(" %sIEs_t *%sIEs);\n\n" % (re.sub('item', 'list', asn1cStruct), firstlower))
else:
f.write("/** \\brief Display %s message using XER encoding.\n" % (asn1cStruct))
f.write(" * \\param message_p Pointer to root message.\n")
f.write(" * \\param file File descriptor to write output.\n")
f.write(" **/\n")
f.write("asn_enc_rval_t %s_xer_print_%s(\n" % (fileprefix, firstlower.lower()))
f.write(" asn_app_consume_bytes_f *cb,\n")
f.write(" void *app_key,\n")
f.write(" %s_message *message_p);\n\n" % (fileprefix))
f.write("int %s_xer__print2sp(const void *buffer, size_t size, void *app_key);\n\n" % (fileprefix.lower()))
f.write("int %s_xer__print2fp(const void *buffer, size_t size, void *app_key);\n\n" % (fileprefix.lower()))
f.write("extern size_t %s_string_total_size;\n\n" % (fileprefix.lower()))
f.write("#endif /* %s_IES_DEFS_H_ */\n\n" % (fileprefix.upper()))
#Generate Decode functions
f = open(outdir + fileprefix + '_decoder.c', 'w')
outputHeaderToFile(f, filename)
f.write("#include \"%s_common.h\"\n#include \"%s_ies_defs.h\"\n\n" % (fileprefix, fileprefix))
for key in iesDefs:
if key in ieofielist.values():
continue
structName = re.sub('ies', '', key)
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', key))
if asn1cStruct.rfind('_') == len(asn1cStruct) - 1:
asn1cStruct = asn1cStruct[:-1]
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
ielistname = re.sub('UE', 'ue', asn1cStruct)
ielistnamefirstlower = ielistname[:1].lower() + ielistname[1:]
asn1cStructfirstlower = asn1cStruct[:1].lower() + asn1cStruct[1:]
keyName = re.sub('-', '_', key)
keyupperunderscore = keyName.upper()
firstlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
iesaccess = ""
if key not in ieofielist.values():
iesaccess = "%s_ies." % (firstlower)
f.write("int %s_decode_%s(\n" % (fileprefix, re.sub('-', '_', structName.lower())))
if len(iesDefs[key]["ies"]) != 0:
f.write(" %s_t *%s,\n" % (re.sub('-', '_', key), lowerFirstCamelWord(re.sub('-', '_', key))))
f.write(" ANY_t *any_p) {\n\n")
f.write(" %s_t %s;\n %s_t *%s_p = &%s;\n" % (asn1cStruct, asn1cStructfirstlower, asn1cStruct, asn1cStructfirstlower, asn1cStructfirstlower))
f.write(" int i, decoded = 0;\n")
if len(iesDefs[key]["ies"]) != 0:
f.write(" int tempDecoded = 0;\n")
f.write(" assert(any_p != NULL);\n")
if len(iesDefs[key]["ies"]) != 0:
f.write(" assert(%s != NULL);\n\n" % (lowerFirstCamelWord(re.sub('-', '_', key))))
f.write(" %s_DEBUG(\"Decoding message %s (%%s:%%d)\\n\", __FILE__, __LINE__);\n\n" % (fileprefix.upper(), re.sub('-', '_', keyName)))
f.write(" ANY_to_type_aper(any_p, &asn_DEF_%s, (void**)&%s_p);\n\n" % (asn1cStruct, asn1cStructfirstlower))
f.write(" for (i = 0; i < %s_p->%slist.count; i++) {\n" % (asn1cStructfirstlower, iesaccess))
f.write(" %s_IE_t *ie_p;\n" % (fileprefix[0].upper() + fileprefix[1:]))
f.write(" ie_p = %s_p->%slist.array[i];\n" % (asn1cStructfirstlower, iesaccess))
f.write(" switch(ie_p->id) {\n")
for ie in iesDefs[key]["ies"]:
iename = re.sub('id-', '', ie[0])
ienameunderscore = lowerFirstCamelWord(re.sub('-', '_', iename))
ienameunderscorefirstlower = lowerFirstCamelWord(ienameunderscore)
ietypesubst = re.sub('-', '', ie[2])
ietypeunderscore = re.sub('-', '_', ie[2])
ieupperunderscore = re.sub('-', '_', re.sub('id-', '', ie[0])).upper()
if ie[3] == "optional":
f.write(" /* Optional field */\n")
elif ie[3] == "conditional":
f.write(" /* Conditional field */\n")
f.write(" case %s_ProtocolIE_ID_%s:\n" % (fileprefix_first_upper, re.sub('-', '_', ie[0])))
f.write(" {\n")
f.write(" %s_t *%s_p = NULL;\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
if ie[3] != "mandatory":
f.write(" %s->presenceMask |= %s_%s_PRESENT;\n" % (lowerFirstCamelWord(re.sub('-', '_', key)), keyupperunderscore, ieupperunderscore))
f.write(" tempDecoded = ANY_to_type_aper(&ie_p->value, &asn_DEF_%s, (void**)&%s_p);\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
f.write(" if (tempDecoded < 0 || %s_p == NULL) {\n" % (lowerFirstCamelWord(ietypesubst)))
f.write(" %s_ERROR(\"Decoding of IE %s failed\\n\");\n" % (fileprefix.upper(), ienameunderscore))
f.write(" if (%s_p)\n" % (lowerFirstCamelWord(ietypesubst)))
f.write(" ASN_STRUCT_FREE(asn_DEF_%s, %s_p);\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
f.write(" return -1;\n")
f.write(" }\n")
f.write(" decoded += tempDecoded;\n")
f.write(" if (asn1_xer_print)\n")
f.write(" xer_fprint(stdout, &asn_DEF_%s, %s_p);\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
if ie[2] in ieofielist.keys():
f.write(" if (%s_decode_%s(&%s->%s, %s_p) < 0) {\n" % (fileprefix, ietypeunderscore.lower(), lowerFirstCamelWord(re.sub('-', '_', key)), ienameunderscore, lowerFirstCamelWord(ietypesubst)))
f.write(" %s_ERROR(\"Decoding of encapsulated IE %s failed\\n\");\n" % (fileprefix.upper(), lowerFirstCamelWord(ietypesubst)))
f.write(" ASN_STRUCT_FREE(asn_DEF_%s, %s_p);\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
f.write(" }\n")
else:
f.write(" memcpy(&%s->%s, %s_p, sizeof(%s_t));\n" % (lowerFirstCamelWord(re.sub('-', '_', key)), ienameunderscore, lowerFirstCamelWord(ietypesubst), ietypeunderscore))
#f.write(" ASN_STRUCT_FREE(asn_DEF_%s, %s_p);\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
f.write(" } break;\n")
f.write(" default:\n")
f.write(" %s_ERROR(\"Unknown protocol IE id (%%d) for message %s\\n\", (int)ie_p->id);\n" % (fileprefix.upper(), re.sub('-', '_', structName.lower())))
f.write(" return -1;\n")
f.write(" }\n")
f.write(" }\n")
f.write(" return decoded;\n")
f.write("}\n\n")
for key in iesDefs:
if key not in ieofielist.values():
continue
keyname = re.sub('IEs', '', re.sub('Item', 'List', key))
f.write("int %s_decode_%s(\n" % (fileprefix, re.sub('-', '_', keyname).lower()))
f.write(" %sIEs_t *%sIEs,\n" % (re.sub('-', '_', keyname), lowerFirstCamelWord(re.sub('-', '_', keyname))))
f.write(" %s_t *%s) {\n\n" % (re.sub('-', '_', keyname), lowerFirstCamelWord(re.sub('-', '_', keyname))))
f.write(" int i, decoded = 0;\n")
f.write(" int tempDecoded = 0;\n\n")
f.write(" assert(%s != NULL);\n" % (lowerFirstCamelWord(re.sub('-', '_', keyname))));
f.write(" assert(%sIEs != NULL);\n\n" % (lowerFirstCamelWord(re.sub('-', '_', keyname))));
f.write(" for (i = 0; i < %s->list.count; i++) {\n" % (lowerFirstCamelWord(re.sub('-', '_', keyname))))
f.write(" %s_IE_t *ie_p = %s->list.array[i];\n" % (fileprefix[0].upper() + fileprefix[1:], lowerFirstCamelWord(re.sub('-', '_', keyname))))
f.write(" switch (ie_p->id) {\n")
for ie in iesDefs[key]["ies"]:
iename = re.sub('id-', '', ie[0])
ienameunderscore = lowerFirstCamelWord(re.sub('-', '_', iename))
f.write(" case %s_ProtocolIE_ID_%s:\n" % (fileprefix_first_upper, re.sub('-', '_', ie[0])))
f.write(" {\n")
f.write(" %s_t *%s_p = NULL;\n" % (re.sub('-', '_', ie[2]), lowerFirstCamelWord(re.sub('-', '', ie[2]))))
f.write(" tempDecoded = ANY_to_type_aper(&ie_p->value, &asn_DEF_%s, (void**)&%s_p);\n" % (re.sub('-', '_', ie[2]), lowerFirstCamelWord(re.sub('-', '', ie[2]))))
f.write(" if (tempDecoded < 0 || %s_p == NULL) {\n" % (lowerFirstCamelWord(re.sub('-', '', ie[2]))))
f.write(" %s_ERROR(\"Decoding of IE %s for message %s failed\\n\");\n" % (fileprefix.upper(), ienameunderscore, re.sub('-', '_', keyname)))
f.write(" if (%s_p)\n" % (lowerFirstCamelWord(re.sub('-', '', ie[2]))))
#f.write(" free(%s_p);\n" % (lowerFirstCamelWord(re.sub('-', '', ie[2]))))
f.write(" ASN_STRUCT_FREE(asn_DEF_%s, %s_p);\n" % (re.sub('-', '_', ie[2]), lowerFirstCamelWord(re.sub('-', '', ie[2]))))
f.write(" return -1;\n")
f.write(" }\n")
f.write(" decoded += tempDecoded;\n")
f.write(" if (asn1_xer_print)\n")
f.write(" xer_fprint(stdout, &asn_DEF_%s, %s_p);\n" % (re.sub('-', '_', ie[2]), lowerFirstCamelWord(re.sub('-', '', ie[2]))))
f.write(" ASN_SEQUENCE_ADD(&%sIEs->%s, %s_p);\n" % (lowerFirstCamelWord(re.sub('-', '_', keyname)),
re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key))), lowerFirstCamelWord(re.sub('-', '', ie[2]))))
f.write(" } break;\n")
f.write(" default:\n")
f.write(" %s_ERROR(\"Unknown protocol IE id (%%d) for message %s\\n\", (int)ie_p->id);\n" % (fileprefix.upper(), re.sub('-', '_', structName.lower())))
f.write(" return -1;\n")
f.write(" }\n")
f.write(" }\n")
f.write(" return decoded;\n")
f.write("}\n\n")
#Generate IES Encode functions
f = open(outdir + fileprefix + '_encoder.c', 'w')
outputHeaderToFile(f,filename)
f.write("#include \"%s_common.h\"\n" % (fileprefix))
f.write("#include \"%s_ies_defs.h\"\n\n" % (fileprefix))
for key in iesDefs:
if key in ieofielist.values():
continue
structName = re.sub('ies', '', key)
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', key))
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
if asn1cStruct.rfind('_') == len(asn1cStruct) - 1:
asn1cStruct = asn1cStruct[:-1]
asn1cStructfirstlower = asn1cStruct[:1].lower() + asn1cStruct[1:]
firstwordlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
iesaccess = ""
if key not in ieofielist.values():
iesaccess = "%s_ies." % (firstwordlower)
keyName = re.sub('-', '_', key)
keyupperunderscore = keyName.upper()
# No IE to encode...
if len(iesDefs[key]["ies"]) == 0:
continue
f.write("int %s_encode_%s(\n" % (fileprefix, re.sub('-', '_', structName.lower())))
f.write(" %s_t *%s,\n" % (asn1cStruct, firstwordlower))
f.write(" %s_t *%s) {\n\n" % (re.sub('-', '_', key), lowerFirstCamelWord(re.sub('-', '_', key))))
f.write(" %s_IE_t *ie;\n\n" % (fileprefix_first_upper))
f.write(" assert(%s != NULL);\n" % (firstwordlower));
f.write(" assert(%s != NULL);\n\n" % (lowerFirstCamelWord(re.sub('-', '_', key))));
for ie in iesDefs[key]["ies"]:
iename = re.sub('-', '_', re.sub('id-', '', ie[0]))
ienameunderscore = re.sub('-', '_', iename)
ienamefirstwordlower = lowerFirstCamelWord(iename)
ieupperunderscore = re.sub('-', '_', re.sub('id-', '', ie[0])).upper()
ietypeunderscore = re.sub('-', '_', ie[2])
if ie[3] != "mandatory":
if ie[3] == "optional":
f.write(" /* Optional field */\n")
elif ie[3] == "conditional":
f.write(" /* Conditional field */\n")
f.write(" if (%s->presenceMask & %s_%s_PRESENT) {\n" % (lowerFirstCamelWord(re.sub('-', '_', key)), keyupperunderscore, ieupperunderscore))
#f.write(" == %s_%s_PRESENT) {\n" % (keyupperunderscore, ieupperunderscore))
f.write(" if ((ie = %s_new_ie(%s_ProtocolIE_ID_%s,\n" % (fileprefix, fileprefix_first_upper, re.sub('-', '_', ie[0])))
f.write(" %s_Criticality_%s,\n" % (fileprefix_first_upper, ie[1]))
f.write(" &asn_DEF_%s,\n" % (ietypeunderscore))
f.write(" &%s->%s)) == NULL) {\n" % (lowerFirstCamelWord(re.sub('-', '_', key)), ienamefirstwordlower))
f.write(" return -1;\n")
f.write(" }\n")
f.write(" ASN_SEQUENCE_ADD(&%s->%slist, ie);\n" % (firstwordlower, iesaccess))
f.write(" }\n\n")
else:
if ie[2] in ieofielist.keys():
f.write(" %s_t %s;\n\n" % (ietypeunderscore, ienamefirstwordlower))
f.write(" memset(&%s, 0, sizeof(%s_t));\n" % (ienamefirstwordlower, ietypeunderscore))
f.write("\n")
f.write(" if (%s_encode_%s(&%s, &%s->%s) < 0) return -1;\n" % (fileprefix, ietypeunderscore.lower(), ienamefirstwordlower, lowerFirstCamelWord(re.sub('-', '_', key)), ienamefirstwordlower))
f.write(" if ((ie = %s_new_ie(%s_ProtocolIE_ID_%s,\n" % (fileprefix, fileprefix_first_upper, re.sub('-', '_', ie[0])))
f.write(" %s_Criticality_%s,\n" % (fileprefix_first_upper, ie[1]))
f.write(" &asn_DEF_%s,\n" % (ietypeunderscore))
if ie[2] in ieofielist.keys():
f.write(" &%s)) == NULL) {\n" % (ienamefirstwordlower))
else:
f.write(" &%s->%s)) == NULL) {\n" % (lowerFirstCamelWord(re.sub('-', '_', key)), ienamefirstwordlower))
f.write(" return -1;\n")
f.write(" }\n")
f.write(" ASN_SEQUENCE_ADD(&%s->%slist, ie);\n\n" % (firstwordlower, iesaccess))
if ie[2] in ieofielist.keys():
f.write(" /* Free any dynamic allocation that is no more used */\n")
f.write(" ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_%s, &%s);\n\n" % (ietypeunderscore, ienamefirstwordlower))
f.write(" return 0;\n")
f.write("}\n\n")
for (key, value) in iesDefs.items():
if key not in ieofielist.values():
continue
ie = value["ies"][0]
ietypeunderscore = re.sub('-', '_', ie[2])
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', re.sub('-IEs', '', key)))
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
firstwordlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
for (i, j) in ieofielist.items():
if j == key:
break
f.write("int %s_encode_%s(\n" % (fileprefix, re.sub('-', '_', i).lower()))
f.write(" %s_t *%s,\n" % (asn1cStruct, firstwordlower))
f.write(" %sIEs_t *%sIEs) {\n\n" % (re.sub('-', '_', i), lowerFirstCamelWord(re.sub('-', '_', i))))
f.write(" int i;\n")
f.write(" %s_IE_t *ie;\n\n" % (fileprefix_first_upper))
f.write(" assert(%s != NULL);\n" % (firstwordlower));
f.write(" assert(%sIEs != NULL);\n\n" % (lowerFirstCamelWord(re.sub('-', '_', i))));
f.write(" for (i = 0; i < %sIEs->%s.count; i++) {\n" % (firstwordlower, re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key)))))
f.write(" if ((ie = %s_new_ie(%s_ProtocolIE_ID_%s,\n" % (fileprefix, fileprefix_first_upper, re.sub('-', '_', ie[0])))
f.write(" %s_Criticality_%s,\n" % (fileprefix_first_upper, ie[1]))
f.write(" &asn_DEF_%s,\n" % (ietypeunderscore))
f.write(" %sIEs->%s.array[i])) == NULL) {\n" % (firstwordlower, re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key)))))
f.write(" return -1;\n")
f.write(" }\n")
f.write(" ASN_SEQUENCE_ADD(&%s->list, ie);\n" % (firstwordlower))
f.write(" }\n")
f.write(" return 0;\n")
f.write("}\n\n")
#Generate xer print functions
f = open(outdir + fileprefix + '_xer_print.c', 'w')
outputHeaderToFile(f, filename)
f.write("#include <stdlib.h>\n")
f.write("#include <stdio.h>\n\n")
f.write("#include <asn_application.h>\n#include <asn_internal.h>\n\n")
f.write("#include \"%s_common.h\"\n#include \"%s_ies_defs.h\"\n\n" % (fileprefix, fileprefix))
f.write("size_t %s_string_total_size = 0;\n\n" % (fileprefix.lower()))
f.write("""int
%s_xer__print2fp(const void *buffer, size_t size, void *app_key) {
FILE *stream = (FILE *)app_key;
if(fwrite(buffer, 1, size, stream) != size)
return -1;
return 0;
}
""" % (fileprefix.lower()))
f.write("""int %s_xer__print2sp(const void *buffer, size_t size, void *app_key) {
char *string = (char *)app_key;
/* Copy buffer to the formatted string */
memcpy(&string[%s_string_total_size], buffer, size);
%s_string_total_size += size;
return 0;
}
""" % (fileprefix.lower(), fileprefix.lower(), fileprefix.lower()))
f.write("""static asn_enc_rval_t
xer_encode_local(asn_TYPE_descriptor_t *td, void *sptr,
asn_app_consume_bytes_f *cb, void *app_key, int indent) {
asn_enc_rval_t er, tmper;
const char *mname;
size_t mlen;
int xcan = 2;
if(!td || !sptr) goto cb_failed;
mname = td->xml_tag;
mlen = strlen(mname);
_i_ASN_TEXT_INDENT(0, indent);
_ASN_CALLBACK3("<", 1, mname, mlen, ">", 1);
tmper = td->xer_encoder(td, sptr, indent + 1, XER_F_BASIC, cb, app_key);
if(tmper.encoded == -1) return tmper;
_ASN_CALLBACK3("</", 2, mname, mlen, ">\\n", xcan);
er.encoded = 4 + xcan + (2 * mlen) + tmper.encoded;
_ASN_ENCODED_OK(er);
cb_failed:
_ASN_ENCODE_FAILED;
}
""")
for (key, value) in iesDefs.items():
keyName = re.sub('-', '_', key)
keyupperunderscore = keyName.upper()
iesStructName = lowerFirstCamelWord(re.sub('-', '_', key))
ie = value["ies"][0]
ietypeunderscore = re.sub('-', '_', ie[2])
if key in ieofielist.values():
f.write("asn_enc_rval_t %s_xer_print_%s(\n" % (fileprefix, re.sub('ies', '', re.sub('item', 'list', re.sub('-', '_', key).lower()))))
else:
f.write("asn_enc_rval_t %s_xer_print_%s(\n" % (fileprefix, re.sub('ies', '', re.sub('-', '_', key).lower())))
#f.write(" FILE *file,\n")
f.write(" asn_app_consume_bytes_f *cb,\n")
f.write(" void *app_key,\n")
if key in ieofielist.values():
iesStructName = lowerFirstCamelWord(re.sub('Item', 'List', re.sub('-', '_', key)))
f.write(" %sIEs_t *%s) {\n\n" % (re.sub('IEs', '', re.sub('Item', 'List', re.sub('-', '_', key))), iesStructName))
f.write(" int i;\n")
f.write(" asn_enc_rval_t er;\n")
else:
f.write(" %s_message *message_p)\n{\n" % (fileprefix))
f.write(" %s_t *%s;\n" % (re.sub('-', '_', key), iesStructName))
f.write(" asn_enc_rval_t er;\n")
#f.write(" void *app_key = (void *)file;\n")
#f.write(" asn_app_consume_bytes_f *cb = %s_xer__print2fp;\n\n" % (fileprefix.lower()))
f.write(" %s = &message_p->msg.%s;\n\n" % (iesStructName, iesStructName))
if key in ieofielist.values():
# Increase indentation level
f.write(" for (i = 0; i < %s->%s.count; i++) {\n" % (iesStructName, re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key)))))
#f.write(" xer_fprint(file, &asn_DEF_%s, %s->%s.array[i]);\n" % (ietypeunderscore, iesStructName, re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key)))))
f.write(" er = xer_encode(&asn_DEF_%s, %s->%s.array[i], XER_F_BASIC, cb, app_key);\n" % (ietypeunderscore, iesStructName, re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key)))))
f.write(" }\n")
else:
f.write(" cb(\"<%s-PDU>\\n\", %d, app_key);\n" % (key, len("<%s-PDU>\n" % (key))))
f.write(" xer_encode_local(&asn_DEF_%s_Criticality, &message_p->criticality, cb, app_key, 1);\n" % fileprefix_first_upper)
f.write(" xer_encode_local(&asn_DEF_%s_ProcedureCode, &message_p->procedureCode, cb, app_key, 1);\n" % fileprefix_first_upper)
f.write(" cb(\" <%s>\\n\", %d, app_key);\n" % (key, len(" <%s>\n" % (key))))
for ie in iesDefs[key]["ies"]:
iename = re.sub('-', '_', re.sub('id-', '', ie[0]))
ienameunderscore = re.sub('-', '_', iename)
ienamefirstwordlower = lowerFirstCamelWord(iename)
ietypeunderscore = re.sub('-', '_', ie[2])
ieupperunderscore = re.sub('-', '_', re.sub('id-', '', ie[0])).upper()
if ie[3] != "mandatory":
if ie[3] == "optional":
f.write(" /* Optional field */\n")
elif ie[3] == "conditional":
f.write(" /* Conditional field */\n")
f.write(" if (%s->presenceMask & %s_%s_PRESENT)\n " % (iesStructName, keyupperunderscore, ieupperunderscore))
# Is it an encapsulated IE ?
if ie[2] in ieofielist.keys():
f.write(" %s_xer_print_%s(cb, app_key, &%s->%s);\n" % (fileprefix, re.sub('ies', '', re.sub('-', '_', ie[2]).lower()), iesStructName, ienamefirstwordlower))
else:
f.write(" xer_encode_local(&asn_DEF_%s, &%s->%s, cb, app_key, 2);\n" % (ietypeunderscore, iesStructName, ienamefirstwordlower))
f.write(" cb(\" </%s>\\n\", %d, app_key);\n" % (key, len(" </%s>\n" % (key))))
f.write(" cb(\"</%s-PDU>\\n\", %d, app_key);\n" % (key, len("</%s-PDU>\n" % (key))))
f.write(" _ASN_ENCODED_OK(er);\n")
#if key not in ieofielist.values():
#f.write("cb_failed:\n")
#f.write(" return er;\n")
f.write("}\n\n")
+674
View File
@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If 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 convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+203
View File
@@ -0,0 +1,203 @@
/*
* Copyright (c) 2015, EURECOM (www.eurecom.fr)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those
* of the authors and should not be interpreted as representing official policies,
* either expressed or implied, of the FreeBSD Project.
*/
/*! \file s1ap_common.c
* \brief s1ap procedures for both eNB and MME
* \author Sebastien ROUX <sebastien.roux@eurecom.fr>
* \date 2012
* \version 0.1
*/
#include <stdint.h>
#include "s1ap_common.h"
#include "S1AP-PDU.h"
int asn_debug = 0;
int asn1_xer_print = 0;
#if defined(EMIT_ASN_DEBUG_EXTERN)
inline void ASN_DEBUG(const char *fmt, ...)
{
if (asn_debug) {
int adi = asn_debug_indent;
va_list ap;
va_start(ap, fmt);
fprintf(stderr, "[ASN1]");
while(adi--) fprintf(stderr, " ");
vfprintf(stderr, fmt, ap);
fprintf(stderr, "\n");
va_end(ap);
}
}
#endif
ssize_t s1ap_generate_initiating_message(
uint8_t **buffer,
uint32_t *length,
e_S1ap_ProcedureCode procedureCode,
S1ap_Criticality_t criticality,
asn_TYPE_descriptor_t *td,
void *sptr)
{
S1AP_PDU_t pdu;
ssize_t encoded;
memset(&pdu, 0, sizeof(S1AP_PDU_t));
pdu.present = S1AP_PDU_PR_initiatingMessage;
pdu.choice.initiatingMessage.procedureCode = procedureCode;
pdu.choice.initiatingMessage.criticality = criticality;
ANY_fromType_aper(&pdu.choice.initiatingMessage.value, td, sptr);
if (asn1_xer_print) {
xer_fprint(stdout, &asn_DEF_S1AP_PDU, (void *)&pdu);
}
/* We can safely free list of IE from sptr */
ASN_STRUCT_FREE_CONTENTS_ONLY(*td, sptr);
if ((encoded = aper_encode_to_new_buffer(&asn_DEF_S1AP_PDU, 0, &pdu,
(void **)buffer)) < 0) {
return -1;
}
*length = encoded;
return encoded;
}
ssize_t s1ap_generate_successfull_outcome(
uint8_t **buffer,
uint32_t *length,
e_S1ap_ProcedureCode procedureCode,
S1ap_Criticality_t criticality,
asn_TYPE_descriptor_t *td,
void *sptr)
{
S1AP_PDU_t pdu;
ssize_t encoded;
memset(&pdu, 0, sizeof(S1AP_PDU_t));
pdu.present = S1AP_PDU_PR_successfulOutcome;
pdu.choice.successfulOutcome.procedureCode = procedureCode;
pdu.choice.successfulOutcome.criticality = criticality;
ANY_fromType_aper(&pdu.choice.successfulOutcome.value, td, sptr);
if (asn1_xer_print) {
xer_fprint(stdout, &asn_DEF_S1AP_PDU, (void *)&pdu);
}
/* We can safely free list of IE from sptr */
ASN_STRUCT_FREE_CONTENTS_ONLY(*td, sptr);
if ((encoded = aper_encode_to_new_buffer(&asn_DEF_S1AP_PDU, 0, &pdu,
(void **)buffer)) < 0) {
return -1;
}
*length = encoded;
return encoded;
}
ssize_t s1ap_generate_unsuccessfull_outcome(
uint8_t **buffer,
uint32_t *length,
e_S1ap_ProcedureCode procedureCode,
S1ap_Criticality_t criticality,
asn_TYPE_descriptor_t *td,
void *sptr)
{
S1AP_PDU_t pdu;
ssize_t encoded;
memset(&pdu, 0, sizeof(S1AP_PDU_t));
pdu.present = S1AP_PDU_PR_unsuccessfulOutcome;
pdu.choice.successfulOutcome.procedureCode = procedureCode;
pdu.choice.successfulOutcome.criticality = criticality;
ANY_fromType_aper(&pdu.choice.successfulOutcome.value, td, sptr);
if (asn1_xer_print) {
xer_fprint(stdout, &asn_DEF_S1AP_PDU, (void *)&pdu);
}
/* We can safely free list of IE from sptr */
ASN_STRUCT_FREE_CONTENTS_ONLY(*td, sptr);
if ((encoded = aper_encode_to_new_buffer(&asn_DEF_S1AP_PDU, 0, &pdu,
(void **)buffer)) < 0) {
return -1;
}
*length = encoded;
return encoded;
}
S1ap_IE_t *s1ap_new_ie(
S1ap_ProtocolIE_ID_t id,
S1ap_Criticality_t criticality,
asn_TYPE_descriptor_t *type,
void *sptr)
{
S1ap_IE_t *buff;
if ((buff = malloc(sizeof(S1ap_IE_t))) == NULL) {
// Possible error on malloc
return NULL;
}
memset((void *)buff, 0, sizeof(S1ap_IE_t));
buff->id = id;
buff->criticality = criticality;
if (ANY_fromType_aper(&buff->value, type, sptr) < 0) {
fprintf(stderr, "Encoding of %s failed\n", type->name);
free(buff);
return NULL;
}
if (asn1_xer_print)
if (xer_fprint(stdout, &asn_DEF_S1ap_IE, buff) < 0) {
free(buff);
return NULL;
}
return buff;
}
void s1ap_handle_criticality(S1ap_Criticality_t criticality)
{
}
+502
View File
@@ -0,0 +1,502 @@
/*
* Copyright (c) 2015, EURECOM (www.eurecom.fr)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those
* of the authors and should not be interpreted as representing official policies,
* either expressed or implied, of the FreeBSD Project.
*/
/** @defgroup _s1ap_impl_ S1AP Layer Reference Implementation
* @ingroup _ref_implementation_
* @{
*/
#if HAVE_CONFIG_H_
# include "config.h"
#endif
#ifndef S1AP_COMMON_H_
#define S1AP_COMMON_H_
/* Defined in asn_internal.h */
// extern int asn_debug_indent;
extern int asn_debug;
#if defined(EMIT_ASN_DEBUG_EXTERN)
inline void ASN_DEBUG(const char *fmt, ...);
#endif
#include "S1ap-Criticality.h"
#include "S1ap-Presence.h"
#include "S1ap-PrivateIE-ID.h"
#include "S1ap-ProcedureCode.h"
#include "S1ap-ProtocolExtensionID.h"
#include "S1ap-ProtocolIE-ID.h"
#include "S1ap-TriggeringMessage.h"
#include "S1ap-AllocationAndRetentionPriority.h"
#include "S1ap-Bearers-SubjectToStatusTransfer-List.h"
#include "S1ap-Bearers-SubjectToStatusTransfer-Item.h"
#include "S1ap-BitRate.h"
#include "S1ap-BPLMNs.h"
#include "S1ap-BroadcastCompletedAreaList.h"
#include "S1ap-Cause.h"
#include "S1ap-CauseMisc.h"
#include "S1ap-CauseProtocol.h"
#include "S1ap-CauseRadioNetwork.h"
#include "S1ap-CauseTransport.h"
#include "S1ap-CauseNas.h"
#include "S1ap-CellIdentity.h"
#include "S1ap-CellID-Broadcast.h"
#include "S1ap-CellID-Broadcast-Item.h"
#include "S1ap-Cdma2000PDU.h"
#include "S1ap-Cdma2000RATType.h"
#include "S1ap-Cdma2000SectorID.h"
#include "S1ap-Cdma2000HOStatus.h"
#include "S1ap-Cdma2000HORequiredIndication.h"
#include "S1ap-Cdma2000OneXSRVCCInfo.h"
#include "S1ap-Cdma2000OneXMEID.h"
#include "S1ap-Cdma2000OneXMSI.h"
#include "S1ap-Cdma2000OneXPilot.h"
#include "S1ap-Cdma2000OneXRAND.h"
#include "S1ap-Cell-Size.h"
#include "S1ap-CellType.h"
#include "S1ap-CGI.h"
#include "S1ap-CI.h"
#include "S1ap-CNDomain.h"
#include "S1ap-CSFallbackIndicator.h"
#include "S1ap-CSG-Id.h"
#include "S1ap-CSG-IdList.h"
#include "S1ap-CSG-IdList-Item.h"
#include "S1ap-COUNTvalue.h"
#include "S1ap-DataCodingScheme.h"
#include "S1ap-DL-Forwarding.h"
#include "S1ap-Direct-Forwarding-Path-Availability.h"
#include "S1ap-ECGIList.h"
#include "S1ap-EmergencyAreaIDList.h"
#include "S1ap-EmergencyAreaID.h"
#include "S1ap-EmergencyAreaID-Broadcast.h"
#include "S1ap-EmergencyAreaID-Broadcast-Item.h"
#include "S1ap-CompletedCellinEAI.h"
#include "S1ap-CompletedCellinEAI-Item.h"
#include "S1ap-ENB-ID.h"
#include "S1ap-GERAN-Cell-ID.h"
#include "S1ap-Global-ENB-ID.h"
#include "S1ap-ENB-StatusTransfer-TransparentContainer.h"
#include "S1ap-ENBname.h"
#include "S1ap-ENBX2TLAs.h"
#include "S1ap-EncryptionAlgorithms.h"
#include "S1ap-EPLMNs.h"
#include "S1ap-EventType.h"
#include "S1ap-E-RAB-ID.h"
#include "S1ap-E-RABInformationList.h"
#include "S1ap-E-RABInformationListItem.h"
#include "S1ap-E-RABList.h"
#include "S1ap-E-RABItem.h"
#include "S1ap-E-RABLevelQoSParameters.h"
#include "S1ap-EUTRAN-CGI.h"
#include "S1ap-ExtendedRNC-ID.h"
#include "S1ap-ForbiddenInterRATs.h"
#include "S1ap-ForbiddenTAs.h"
#include "S1ap-ForbiddenTAs-Item.h"
#include "S1ap-ForbiddenTACs.h"
#include "S1ap-ForbiddenLAs.h"
#include "S1ap-ForbiddenLAs-Item.h"
#include "S1ap-ForbiddenLACs.h"
#include "S1ap-GBR-QosInformation.h"
#include "S1ap-GTP-TEID.h"
#include "S1ap-GUMMEI.h"
#include "S1ap-HandoverRestrictionList.h"
#include "S1ap-HandoverType.h"
#include "S1ap-HFN.h"
#include "S1ap-IMSI.h"
#include "S1ap-IntegrityProtectionAlgorithms.h"
#include "S1ap-InterfacesToTrace.h"
#include "S1ap-LAC.h"
#include "S1ap-LAI.h"
#include "S1ap-LastVisitedCell-Item.h"
#include "S1ap-LastVisitedEUTRANCellInformation.h"
#include "S1ap-LastVisitedUTRANCellInformation.h"
#include "S1ap-LastVisitedGERANCellInformation.h"
#include "S1ap-L3-Information.h"
#include "S1ap-MessageIdentifier.h"
#include "S1ap-MMEname.h"
#include "S1ap-MME-Group-ID.h"
#include "S1ap-MME-Code.h"
#include "S1ap-M-TMSI.h"
#include "S1ap-MSClassmark2.h"
#include "S1ap-MSClassmark3.h"
#include "S1ap-NAS-PDU.h"
#include "S1ap-NASSecurityParametersfromE-UTRAN.h"
#include "S1ap-NASSecurityParameterstoE-UTRAN.h"
#include "S1ap-NumberofBroadcastRequest.h"
#include "S1ap-NumberOfBroadcasts.h"
#include "S1ap-OldBSS-ToNewBSS-Information.h"
#include "S1ap-OverloadAction.h"
#include "S1ap-OverloadResponse.h"
#include "S1ap-PagingDRX.h"
#include "S1ap-PDCP-SN.h"
#include "S1ap-PLMNidentity.h"
#include "S1ap-Pre-emptionCapability.h"
#include "S1ap-Pre-emptionVulnerability.h"
#include "S1ap-PriorityLevel.h"
#include "S1ap-QCI.h"
#include "S1ap-ReceiveStatusofULPDCPSDUs.h"
#include "S1ap-RelativeMMECapacity.h"
#include "S1ap-RAC.h"
#include "S1ap-RequestType.h"
#include "S1ap-RIMTransfer.h"
#include "S1ap-RIMInformation.h"
#include "S1ap-RIMRoutingAddress.h"
#include "S1ap-ReportArea.h"
#include "S1ap-RepetitionPeriod.h"
#include "S1ap-RNC-ID.h"
#include "S1ap-RRC-Container.h"
#include "S1ap-RRC-Establishment-Cause.h"
#include "S1ap-SecurityKey.h"
#include "S1ap-SecurityContext.h"
#include "S1ap-SerialNumber.h"
#include "S1ap-SONInformation.h"
#include "S1ap-SONInformationRequest.h"
#include "S1ap-SONInformationReply.h"
#include "S1ap-SONConfigurationTransfer.h"
#include "S1ap-Source-ToTarget-TransparentContainer.h"
#include "S1ap-SourceBSS-ToTargetBSS-TransparentContainer.h"
#include "S1ap-SourceeNB-ID.h"
#include "S1ap-SRVCCOperationPossible.h"
#include "S1ap-SRVCCHOIndication.h"
#include "S1ap-SourceeNB-ToTargeteNB-TransparentContainer.h"
#include "S1ap-SourceRNC-ToTargetRNC-TransparentContainer.h"
#include "S1ap-ServedGUMMEIs.h"
#include "S1ap-ServedGUMMEIsItem.h"
#include "S1ap-ServedGroupIDs.h"
#include "S1ap-ServedMMECs.h"
#include "S1ap-ServedPLMNs.h"
#include "S1ap-SubscriberProfileIDforRFP.h"
#include "S1ap-SupportedTAs.h"
#include "S1ap-SupportedTAs-Item.h"
#include "S1ap-S-TMSI.h"
#include "S1ap-TAC.h"
#include "S1ap-TAIItem.h"
#include "S1ap-TAIList.h"
#include "S1ap-TAIListforWarning.h"
#include "S1ap-TAI.h"
#include "S1ap-TAI-Broadcast.h"
#include "S1ap-TAI-Broadcast-Item.h"
#include "S1ap-CompletedCellinTAI.h"
#include "S1ap-CompletedCellinTAI-Item.h"
#include "S1ap-TargetID.h"
#include "S1ap-TargeteNB-ID.h"
#include "S1ap-TargetRNC-ID.h"
#include "S1ap-TargeteNB-ToSourceeNB-TransparentContainer.h"
#include "S1ap-Target-ToSource-TransparentContainer.h"
#include "S1ap-TargetRNC-ToSourceRNC-TransparentContainer.h"
#include "S1ap-TargetBSS-ToSourceBSS-TransparentContainer.h"
#include "S1ap-TimeToWait.h"
#include "S1ap-Time-UE-StayedInCell.h"
#include "S1ap-TransportLayerAddress.h"
#include "S1ap-TraceActivation.h"
#include "S1ap-TraceDepth.h"
#include "S1ap-E-UTRAN-Trace-ID.h"
#include "S1ap-TypeOfError.h"
#include "S1ap-UEAggregateMaximumBitrate.h"
#include "S1ap-UE-associatedLogicalS1-ConnectionItem.h"
#include "S1ap-UEIdentityIndexValue.h"
#include "S1ap-UE-HistoryInformation.h"
#include "S1ap-UEPagingID.h"
#include "S1ap-UERadioCapability.h"
#include "S1ap-UESecurityCapabilities.h"
#include "S1ap-WarningAreaList.h"
#include "S1ap-WarningType.h"
#include "S1ap-WarningSecurityInfo.h"
#include "S1ap-WarningMessageContents.h"
#include "S1ap-X2TNLConfigurationInfo.h"
#include "S1ap-CriticalityDiagnostics.h"
#include "S1ap-CriticalityDiagnostics-IE-List.h"
#include "S1ap-CriticalityDiagnostics-IE-Item.h"
#include "S1ap-ResetType.h"
#include "S1ap-Inter-SystemInformationTransferType.h"
#include "S1ap-UE-S1AP-IDs.h"
#include "S1ap-UE-S1AP-ID-pair.h"
#include "S1ap-MME-UE-S1AP-ID.h"
#include "S1ap-ENB-UE-S1AP-ID.h"
#include "S1ap-TBCD-STRING.h"
#include "S1ap-InitiatingMessage.h"
#include "S1ap-SuccessfulOutcome.h"
#include "S1ap-UnsuccessfulOutcome.h"
#include "S1ap-HandoverRequired.h"
#include "S1ap-HandoverCommand.h"
#include "S1ap-HandoverNotify.h"
#include "S1ap-HandoverPreparationFailure.h"
#include "S1ap-HandoverRequest.h"
#include "S1ap-HandoverRequestAcknowledge.h"
#include "S1ap-HandoverFailure.h"
#include "S1ap-PathSwitchRequest.h"
#include "S1ap-PathSwitchRequestAcknowledge.h"
#include "S1ap-PathSwitchRequestFailure.h"
#include "S1ap-E-RABSetupRequest.h"
#include "S1ap-E-RABSetupResponse.h"
#include "S1ap-E-RABModifyRequest.h"
#include "S1ap-E-RABModifyResponse.h"
#include "S1ap-E-RABReleaseIndication.h"
#include "S1ap-E-RABReleaseCommand.h"
#include "S1ap-E-RABReleaseResponse.h"
#include "S1ap-InitialContextSetupRequest.h"
#include "S1ap-InitialContextSetupResponse.h"
#include "S1ap-InitialContextSetupFailure.h"
#include "S1ap-UEContextReleaseRequest.h"
#include "S1ap-Paging.h"
#include "S1ap-DownlinkNASTransport.h"
#include "S1ap-InitialUEMessage.h"
#include "S1ap-UplinkNASTransport.h"
#include "S1ap-NASNonDeliveryIndication.h"
#include "S1ap-HandoverCancel.h"
#include "S1ap-HandoverCancelAcknowledge.h"
#include "S1ap-Reset.h"
#include "S1ap-ResetAcknowledge.h"
#include "S1ap-S1SetupResponse.h"
#include "S1ap-S1SetupRequest.h"
#include "S1ap-S1SetupFailure.h"
#include "S1ap-ErrorIndication.h"
#include "S1ap-ENBConfigurationUpdate.h"
#include "S1ap-ENBConfigurationUpdateAcknowledge.h"
#include "S1ap-ENBConfigurationUpdateFailure.h"
#include "S1ap-MMEConfigurationUpdate.h"
#include "S1ap-MMEConfigurationUpdateAcknowledge.h"
#include "S1ap-MMEConfigurationUpdateFailure.h"
#include "S1ap-DownlinkS1cdma2000tunneling.h"
#include "S1ap-UplinkS1cdma2000tunneling.h"
#include "S1ap-UEContextModificationRequest.h"
#include "S1ap-UEContextModificationResponse.h"
#include "S1ap-UEContextModificationFailure.h"
#include "S1ap-UECapabilityInfoIndication.h"
#include "S1ap-UEContextReleaseCommand.h"
#include "S1ap-UEContextReleaseComplete.h"
#include "S1ap-ENBStatusTransfer.h"
#include "S1ap-MMEStatusTransfer.h"
#include "S1ap-DeactivateTrace.h"
#include "S1ap-TraceStart.h"
#include "S1ap-TraceFailureIndication.h"
#include "S1ap-CellTrafficTrace.h"
#include "S1ap-LocationReportingControl.h"
#include "S1ap-LocationReportingFailureIndication.h"
#include "S1ap-LocationReport.h"
#include "S1ap-OverloadStart.h"
#include "S1ap-OverloadStop.h"
#include "S1ap-WriteReplaceWarningRequest.h"
#include "S1ap-WriteReplaceWarningResponse.h"
#include "S1ap-ENBDirectInformationTransfer.h"
#include "S1ap-MMEDirectInformationTransfer.h"
#include "S1ap-ENBConfigurationTransfer.h"
#include "S1ap-MMEConfigurationTransfer.h"
#include "S1ap-PrivateMessage.h"
#include "S1ap-E-RABReleaseItemBearerRelComp.h"
#include "S1ap-E-RABToBeSwitchedDLList.h"
#include "S1ap-E-RABToBeSwitchedDLItem.h"
#include "S1ap-E-RABToBeSwitchedULList.h"
#include "S1ap-E-RABToBeSwitchedULItem.h"
#include "S1ap-E-RABToBeSetupListBearerSUReq.h"
#include "S1ap-E-RABToBeSetupItemBearerSUReq.h"
#include "S1ap-E-RABDataForwardingList.h"
#include "S1ap-E-RABDataForwardingItem.h"
#include "S1ap-E-RABToBeSetupListHOReq.h"
#include "S1ap-E-RABToBeSetupItemHOReq.h"
#include "S1ap-E-RABAdmittedList.h"
#include "S1ap-E-RABAdmittedItem.h"
#include "S1ap-E-RABFailedToSetupListHOReqAck.h"
#include "S1ap-E-RABToBeSetupItemCtxtSUReq.h"
#include "S1ap-E-RABToBeSetupListCtxtSUReq.h"
#include "S1ap-E-RABSetupItemBearerSURes.h"
#include "S1ap-E-RABSetupListBearerSURes.h"
#include "S1ap-E-RABSetupItemCtxtSURes.h"
#include "S1ap-E-RABSetupListCtxtSURes.h"
#include "S1ap-E-RABReleaseListBearerRelComp.h"
#include "S1ap-E-RABModifyItemBearerModRes.h"
#include "S1ap-E-RABModifyListBearerModRes.h"
#include "S1ap-E-RABFailedToSetupItemHOReqAck.h"
#include "S1ap-E-RABFailedToSetupListHOReqAck.h"
#include "S1ap-E-RABToBeModifiedItemBearerModReq.h"
#include "S1ap-E-RABToBeModifiedListBearerModReq.h"
#include "S1ap-UE-associatedLogicalS1-ConnectionListResAck.h"
#include "S1ap-IE.h"
#include "S1AP-PDU.h"
#if defined (UPDATE_RELEASE_9)
# include "S1ap-BroadcastCancelledAreaList.h"
# include "S1ap-CancelledCellinEAI.h"
# include "S1ap-CancelledCellinEAI-Item.h"
# include "S1ap-CancelledCellinTAI.h"
# include "S1ap-CancelledCellinTAI-Item.h"
# include "S1ap-CellAccessMode.h"
# include "S1ap-CellID-Cancelled.h"
# include "S1ap-CellID-Cancelled-Item.h"
# include "S1ap-ConcurrentWarningMessageIndicator.h"
# include "S1ap-CSGMembershipStatus.h"
# include "S1ap-Data-Forwarding-Not-Possible.h"
# include "S1ap-EmergencyAreaID-Cancelled.h"
# include "S1ap-EmergencyAreaID-Cancelled-Item.h"
# include "S1ap-E-RABList.h"
# include "S1ap-EUTRANRoundTripDelayEstimationInfo.h"
# include "S1ap-ExtendedRepetitionPeriod.h"
# include "S1ap-LPPa-PDU.h"
# include "S1ap-PS-ServiceNotAvailable.h"
# include "S1ap-Routing-ID.h"
# include "S1ap-StratumLevel.h"
# include "S1ap-SynchronizationStatus.h"
# include "S1ap-TimeSynchronizationInfo.h"
# include "S1ap-TAI-Cancelled.h"
# include "S1ap-TAI-Cancelled-Item.h"
# include "S1ap-KillRequest.h"
# include "S1ap-KillResponse.h"
# include "S1ap-DownlinkUEAssociatedLPPaTransport.h"
# include "S1ap-UplinkUEAssociatedLPPaTransport.h"
# include "S1ap-DownlinkNonUEAssociatedLPPaTransport.h"
# include "S1ap-UplinkNonUEAssociatedLPPaTransport.h"
#endif /* (UPDATE_RELEASE_9) */
#if defined(UPDATE_RELEASE_10)
# include "S1ap-PagingPriority.h"
# include "S1ap-RelayNode-Indicator.h"
# include "S1ap-GWContextReleaseIndication.h"
# include "S1ap-MMERelaySupportIndicator.h"
# include "S1ap-ManagementBasedMDTAllowed.h"
# include "S1ap-PrivacyIndicator.h"
# include "S1ap-TrafficLoadReductionIndication.h"
# include "S1ap-GUMMEIList.h"
#endif /* (UPDATE_RELEASE_10) */
/* Checking version of ASN1C compiler */
#if (ASN1C_ENVIRONMENT_VERSION < ASN1C_MINIMUM_VERSION)
# error "You are compiling s1ap with the wrong version of ASN1C"
#endif
#ifndef FALSE
# define FALSE (0)
#endif
#ifndef TRUE
# define TRUE (!FALSE)
#endif
#define S1AP_UE_ID_FMT "0x%06"PRIX32
extern int asn_debug;
extern int asn1_xer_print;
#if defined(ENB_MODE)
# include "UTIL/LOG/log.h"
# include "s1ap_eNB_default_values.h"
# define S1AP_ERROR(x, args...) LOG_E(S1AP, x, ##args)
# define S1AP_WARN(x, args...) LOG_W(S1AP, x, ##args)
# define S1AP_TRAF(x, args...) LOG_I(S1AP, x, ##args)
# define S1AP_INFO(x, args...) LOG_I(S1AP, x, ##args)
# define S1AP_DEBUG(x, args...) LOG_I(S1AP, x, ##args)
#else
# include "mme_default_values.h"
# define S1AP_ERROR(x, args...) do { fprintf(stdout, "[S1AP][E]"x, ##args); } while(0)
# define S1AP_WARN(x, args...) do { fprintf(stdout, "[S1AP][W]"x, ##args); } while(0)
# define S1AP_TRAF(x, args...) do { fprintf(stdout, "[S1AP][T]"x, ##args); } while(0)
# define S1AP_INFO(x, args...) do { fprintf(stdout, "[S1AP][I]"x, ##args); } while(0)
# define S1AP_DEBUG(x, args...) do { fprintf(stdout, "[S1AP][D]"x, ##args); } while(0)
#endif
//Forward declaration
struct s1ap_message_s;
/** \brief Function callback prototype.
**/
typedef int (*s1ap_message_decoded_callback)(
uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *message_p
);
/** \brief Encode a successfull outcome message
\param buffer pointer to buffer in which data will be encoded
\param length pointer to the length of buffer
\param procedureCode Procedure code for the message
\param criticality Criticality of the message
\param td ASN1C type descriptor of the sptr
\param sptr Deferenced pointer to the structure to encode
@returns size in bytes encded on success or 0 on failure
**/
ssize_t s1ap_generate_successfull_outcome(
uint8_t **buffer,
uint32_t *length,
e_S1ap_ProcedureCode procedureCode,
S1ap_Criticality_t criticality,
asn_TYPE_descriptor_t *td,
void *sptr);
/** \brief Encode an initiating message
\param buffer pointer to buffer in which data will be encoded
\param length pointer to the length of buffer
\param procedureCode Procedure code for the message
\param criticality Criticality of the message
\param td ASN1C type descriptor of the sptr
\param sptr Deferenced pointer to the structure to encode
@returns size in bytes encded on success or 0 on failure
**/
ssize_t s1ap_generate_initiating_message(
uint8_t **buffer,
uint32_t *length,
e_S1ap_ProcedureCode procedureCode,
S1ap_Criticality_t criticality,
asn_TYPE_descriptor_t *td,
void *sptr);
/** \brief Encode an unsuccessfull outcome message
\param buffer pointer to buffer in which data will be encoded
\param length pointer to the length of buffer
\param procedureCode Procedure code for the message
\param criticality Criticality of the message
\param td ASN1C type descriptor of the sptr
\param sptr Deferenced pointer to the structure to encode
@returns size in bytes encded on success or 0 on failure
**/
ssize_t s1ap_generate_unsuccessfull_outcome(
uint8_t **buffer,
uint32_t *length,
e_S1ap_ProcedureCode procedureCode,
S1ap_Criticality_t criticality,
asn_TYPE_descriptor_t *td,
void *sptr);
/** \brief Generate a new IE
\param id Protocol ie id of the IE
\param criticality Criticality of the IE
\param type ASN1 type descriptor of the IE value
\param sptr Structure to be encoded in the value field
@returns a pointer to the newly created IE structure or NULL in case of failure
**/
S1ap_IE_t *s1ap_new_ie(S1ap_ProtocolIE_ID_t id,
S1ap_Criticality_t criticality,
asn_TYPE_descriptor_t *type,
void *sptr);
/** \brief Handle criticality
\param criticality Criticality of the IE
@returns void
**/
void s1ap_handle_criticality(S1ap_Criticality_t criticality);
#endif /* S1AP_COMMON_H_ */
+439
View File
@@ -0,0 +1,439 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <crypt.h>
#include "tree.h"
#include "queue.h"
#include "intertask_interface.h"
#include "s1ap_eNB_default_values.h"
#include "s1ap_common.h"
#include "s1ap_ies_defs.h"
#include "s1ap_eNB_defs.h"
#include "s1ap_eNB.h"
#include "s1ap_eNB_encoder.h"
#include "s1ap_eNB_handlers.h"
#include "s1ap_eNB_nnsf.h"
#include "s1ap_eNB_nas_procedures.h"
#include "s1ap_eNB_management_procedures.h"
#include "s1ap_eNB_context_management_procedures.h"
#include "s1ap_eNB_itti_messaging.h"
#include "s1ap_eNB_ue_context.h" // test, to be removed
#include "msc.h"
#include "assertions.h"
#include "conversions.h"
#if defined(TEST_S1C_MME)
#include "oaisim_mme_test_s1c.h"
#endif
#if !defined(OAI_EMU)
s1ap_eNB_config_t s1ap_config;
#endif
static int s1ap_eNB_generate_s1_setup_request(
s1ap_eNB_instance_t *instance_p, s1ap_eNB_mme_data_t *s1ap_mme_data_p);
static
void s1ap_eNB_handle_register_eNB(instance_t instance, s1ap_register_enb_req_t *s1ap_register_eNB);
static
void s1ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp);
uint32_t s1ap_generate_eNB_id(void)
{
char *out;
char hostname[50];
int ret;
uint32_t eNB_id;
/* Retrieve the host name */
ret = gethostname(hostname, sizeof(hostname));
DevAssert(ret == 0);
out = crypt(hostname, "eurecom");
DevAssert(out != NULL);
eNB_id = ((out[0] << 24) | (out[1] << 16) | (out[2] << 8) | out[3]);
return eNB_id;
}
static void s1ap_eNB_register_mme(s1ap_eNB_instance_t *instance_p,
net_ip_address_t *mme_ip_address,
net_ip_address_t *local_ip_addr,
uint16_t in_streams,
uint16_t out_streams)
{
MessageDef *message_p = NULL;
sctp_new_association_req_t *sctp_new_association_req_p = NULL;
s1ap_eNB_mme_data_t *s1ap_mme_data_p = NULL;
DevAssert(instance_p != NULL);
DevAssert(mme_ip_address != NULL);
message_p = itti_alloc_new_message(TASK_S1AP, SCTP_NEW_ASSOCIATION_REQ);
sctp_new_association_req_p = &message_p->ittiMsg.sctp_new_association_req;
sctp_new_association_req_p->port = S1AP_PORT_NUMBER;
sctp_new_association_req_p->ppid = S1AP_SCTP_PPID;
sctp_new_association_req_p->in_streams = in_streams;
sctp_new_association_req_p->out_streams = out_streams;
memcpy(&sctp_new_association_req_p->remote_address,
mme_ip_address,
sizeof(*mme_ip_address));
memcpy(&sctp_new_association_req_p->local_address,
local_ip_addr,
sizeof(*local_ip_addr));
/* Create new MME descriptor */
s1ap_mme_data_p = calloc(1, sizeof(*s1ap_mme_data_p));
DevAssert(s1ap_mme_data_p != NULL);
s1ap_mme_data_p->cnx_id = s1ap_eNB_fetch_add_global_cnx_id();
sctp_new_association_req_p->ulp_cnx_id = s1ap_mme_data_p->cnx_id;
s1ap_mme_data_p->assoc_id = -1;
s1ap_mme_data_p->s1ap_eNB_instance = instance_p;
STAILQ_INIT(&s1ap_mme_data_p->served_gummei);
/* Insert the new descriptor in list of known MME
* but not yet associated.
*/
RB_INSERT(s1ap_mme_map, &instance_p->s1ap_mme_head, s1ap_mme_data_p);
s1ap_mme_data_p->state = S1AP_ENB_STATE_WAITING;
instance_p->s1ap_mme_nb ++;
instance_p->s1ap_mme_pending_nb ++;
itti_send_msg_to_task(TASK_SCTP, instance_p->instance, message_p);
}
static
void s1ap_eNB_handle_register_eNB(instance_t instance, s1ap_register_enb_req_t *s1ap_register_eNB)
{
s1ap_eNB_instance_t *new_instance;
uint8_t index;
DevAssert(s1ap_register_eNB != NULL);
/* Look if the provided instance already exists */
new_instance = s1ap_eNB_get_instance(instance);
if (new_instance != NULL) {
/* Checks if it is a retry on the same eNB */
DevCheck(new_instance->eNB_id == s1ap_register_eNB->eNB_id, new_instance->eNB_id, s1ap_register_eNB->eNB_id, 0);
DevCheck(new_instance->cell_type == s1ap_register_eNB->cell_type, new_instance->cell_type, s1ap_register_eNB->cell_type, 0);
DevCheck(new_instance->tac == s1ap_register_eNB->tac, new_instance->tac, s1ap_register_eNB->tac, 0);
DevCheck(new_instance->mcc == s1ap_register_eNB->mcc, new_instance->mcc, s1ap_register_eNB->mcc, 0);
DevCheck(new_instance->mnc == s1ap_register_eNB->mnc, new_instance->mnc, s1ap_register_eNB->mnc, 0);
DevCheck(new_instance->mnc_digit_length == s1ap_register_eNB->mnc_digit_length, new_instance->mnc_digit_length, s1ap_register_eNB->mnc_digit_length, 0);
DevCheck(new_instance->default_drx == s1ap_register_eNB->default_drx, new_instance->default_drx, s1ap_register_eNB->default_drx, 0);
} else {
new_instance = calloc(1, sizeof(s1ap_eNB_instance_t));
DevAssert(new_instance != NULL);
RB_INIT(&new_instance->s1ap_ue_head);
RB_INIT(&new_instance->s1ap_mme_head);
/* Copy usefull parameters */
new_instance->instance = instance;
new_instance->eNB_name = s1ap_register_eNB->eNB_name;
new_instance->eNB_id = s1ap_register_eNB->eNB_id;
new_instance->cell_type = s1ap_register_eNB->cell_type;
new_instance->tac = s1ap_register_eNB->tac;
new_instance->mcc = s1ap_register_eNB->mcc;
new_instance->mnc = s1ap_register_eNB->mnc;
new_instance->mnc_digit_length = s1ap_register_eNB->mnc_digit_length;
new_instance->default_drx = s1ap_register_eNB->default_drx;
/* Add the new instance to the list of eNB (meaningfull in virtual mode) */
s1ap_eNB_insert_new_instance(new_instance);
S1AP_DEBUG("Registered new eNB[%d] and %s eNB id %u\n",
instance,
s1ap_register_eNB->cell_type == CELL_MACRO_ENB ? "macro" : "home",
s1ap_register_eNB->eNB_id);
}
DevCheck(s1ap_register_eNB->nb_mme <= S1AP_MAX_NB_MME_IP_ADDRESS,
S1AP_MAX_NB_MME_IP_ADDRESS, s1ap_register_eNB->nb_mme, 0);
/* Trying to connect to provided list of MME ip address */
for (index = 0; index < s1ap_register_eNB->nb_mme; index++) {
s1ap_eNB_register_mme(new_instance,
&s1ap_register_eNB->mme_ip_address[index],
&s1ap_register_eNB->enb_ip_address,
s1ap_register_eNB->sctp_in_streams,
s1ap_register_eNB->sctp_out_streams);
}
}
static
void s1ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp)
{
s1ap_eNB_instance_t *instance_p;
s1ap_eNB_mme_data_t *s1ap_mme_data_p;
DevAssert(sctp_new_association_resp != NULL);
instance_p = s1ap_eNB_get_instance(instance);
DevAssert(instance_p != NULL);
s1ap_mme_data_p = s1ap_eNB_get_MME(instance_p, -1,
sctp_new_association_resp->ulp_cnx_id);
DevAssert(s1ap_mme_data_p != NULL);
if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) {
S1AP_WARN("Received unsuccessful result for SCTP association (%u), instance %d, cnx_id %u\n",
sctp_new_association_resp->sctp_state,
instance,
sctp_new_association_resp->ulp_cnx_id);
s1ap_handle_s1_setup_message(s1ap_mme_data_p, sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN);
return;
}
/* Update parameters */
s1ap_mme_data_p->assoc_id = sctp_new_association_resp->assoc_id;
s1ap_mme_data_p->in_streams = sctp_new_association_resp->in_streams;
s1ap_mme_data_p->out_streams = sctp_new_association_resp->out_streams;
/* Prepare new S1 Setup Request */
s1ap_eNB_generate_s1_setup_request(instance_p, s1ap_mme_data_p);
}
static
void s1ap_eNB_handle_sctp_data_ind(sctp_data_ind_t *sctp_data_ind)
{
int result;
DevAssert(sctp_data_ind != NULL);
#if defined(TEST_S1C_MME)
mme_test_s1_notify_sctp_data_ind(sctp_data_ind->assoc_id, sctp_data_ind->stream,
sctp_data_ind->buffer, sctp_data_ind->buffer_length);
#else
s1ap_eNB_handle_message(sctp_data_ind->assoc_id, sctp_data_ind->stream,
sctp_data_ind->buffer, sctp_data_ind->buffer_length);
#endif
result = itti_free(TASK_UNKNOWN, sctp_data_ind->buffer);
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
}
void *s1ap_eNB_task(void *arg)
{
MessageDef *received_msg = NULL;
int result;
S1AP_DEBUG("Starting S1AP layer\n");
s1ap_eNB_prepare_internal_data();
itti_mark_task_ready(TASK_S1AP);
MSC_START_USE();
while (1) {
itti_receive_msg(TASK_S1AP, &received_msg);
switch (ITTI_MSG_ID(received_msg)) {
case TERMINATE_MESSAGE:
itti_exit_task();
break;
case S1AP_REGISTER_ENB_REQ: {
/* Register a new eNB.
* in Virtual mode eNBs will be distinguished using the mod_id/
* Each eNB has to send an S1AP_REGISTER_ENB message with its
* own parameters.
*/
s1ap_eNB_handle_register_eNB(ITTI_MESSAGE_GET_INSTANCE(received_msg),
&S1AP_REGISTER_ENB_REQ(received_msg));
}
break;
case SCTP_NEW_ASSOCIATION_RESP: {
s1ap_eNB_handle_sctp_association_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg),
&received_msg->ittiMsg.sctp_new_association_resp);
}
break;
case SCTP_DATA_IND: {
s1ap_eNB_handle_sctp_data_ind(&received_msg->ittiMsg.sctp_data_ind);
}
break;
case S1AP_NAS_FIRST_REQ: {
s1ap_eNB_handle_nas_first_req(ITTI_MESSAGE_GET_INSTANCE(received_msg),
&S1AP_NAS_FIRST_REQ(received_msg));
}
break;
case S1AP_UPLINK_NAS: {
s1ap_eNB_nas_uplink(ITTI_MESSAGE_GET_INSTANCE(received_msg),
&S1AP_UPLINK_NAS(received_msg));
}
break;
case S1AP_UE_CAPABILITIES_IND: {
s1ap_eNB_ue_capabilities(ITTI_MESSAGE_GET_INSTANCE(received_msg),
&S1AP_UE_CAPABILITIES_IND(received_msg));
}
break;
case S1AP_INITIAL_CONTEXT_SETUP_RESP: {
s1ap_eNB_initial_ctxt_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg),
&S1AP_INITIAL_CONTEXT_SETUP_RESP(received_msg));
}
break;
case S1AP_NAS_NON_DELIVERY_IND: {
s1ap_eNB_nas_non_delivery_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg),
&S1AP_NAS_NON_DELIVERY_IND(received_msg));
}
break;
case S1AP_UE_CONTEXT_RELEASE_COMPLETE: {
s1ap_ue_context_release_complete(ITTI_MESSAGE_GET_INSTANCE(received_msg),
&S1AP_UE_CONTEXT_RELEASE_COMPLETE(received_msg));
}
break;
case S1AP_UE_CONTEXT_RELEASE_REQ: {
s1ap_eNB_instance_t *s1ap_eNB_instance_p = NULL; // test
struct s1ap_eNB_ue_context_s *ue_context_p = NULL; // test
s1ap_ue_context_release_req(ITTI_MESSAGE_GET_INSTANCE(received_msg),
&S1AP_UE_CONTEXT_RELEASE_REQ(received_msg));
s1ap_eNB_instance_p = s1ap_eNB_get_instance(ITTI_MESSAGE_GET_INSTANCE(received_msg)); // test
DevAssert(s1ap_eNB_instance_p != NULL); // test
if ((ue_context_p = s1ap_eNB_get_ue_context(s1ap_eNB_instance_p,
S1AP_UE_CONTEXT_RELEASE_REQ(received_msg).eNB_ue_s1ap_id)) == NULL) { // test
/* The context for this eNB ue s1ap id doesn't exist in the map of eNB UEs */
S1AP_ERROR("Failed to find ue context associated with eNB ue s1ap id: %u\n",
S1AP_UE_CONTEXT_RELEASE_REQ(received_msg).eNB_ue_s1ap_id); // test
} // test
}
break;
default:
S1AP_ERROR("Received unhandled message: %d:%s\n",
ITTI_MSG_ID(received_msg), ITTI_MSG_NAME(received_msg));
break;
}
result = itti_free (ITTI_MSG_ORIGIN_ID(received_msg), received_msg);
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
received_msg = NULL;
}
return NULL;
}
static int s1ap_eNB_generate_s1_setup_request(
s1ap_eNB_instance_t *instance_p, s1ap_eNB_mme_data_t *s1ap_mme_data_p)
{
s1ap_message message;
S1ap_S1SetupRequestIEs_t *s1SetupRequest_p;
S1ap_PLMNidentity_t plmnIdentity;
S1ap_SupportedTAs_Item_t ta;
uint8_t *buffer;
uint32_t len;
int ret = 0;
DevAssert(instance_p != NULL);
DevAssert(s1ap_mme_data_p != NULL);
memset(&message, 0, sizeof(s1ap_message));
message.direction = S1AP_PDU_PR_initiatingMessage;
message.procedureCode = S1ap_ProcedureCode_id_S1Setup;
message.criticality = S1ap_Criticality_reject;
s1SetupRequest_p = &message.msg.s1ap_S1SetupRequestIEs;
memset((void *)&plmnIdentity, 0, sizeof(S1ap_PLMNidentity_t));
memset((void *)&ta, 0, sizeof(S1ap_SupportedTAs_Item_t));
s1ap_mme_data_p->state = S1AP_ENB_STATE_WAITING;
s1SetupRequest_p->global_ENB_ID.eNB_ID.present = S1ap_ENB_ID_PR_macroENB_ID;
MACRO_ENB_ID_TO_BIT_STRING(instance_p->eNB_id,
&s1SetupRequest_p->global_ENB_ID.eNB_ID.choice.macroENB_ID);
MCC_MNC_TO_PLMNID(instance_p->mcc, instance_p->mnc, instance_p->mnc_digit_length,
&s1SetupRequest_p->global_ENB_ID.pLMNidentity);
S1AP_INFO("%d -> %02x%02x%02x\n", instance_p->eNB_id, s1SetupRequest_p->global_ENB_ID.eNB_ID.choice.macroENB_ID.buf[0], s1SetupRequest_p->global_ENB_ID.eNB_ID.choice.macroENB_ID.buf[1],
s1SetupRequest_p->global_ENB_ID.eNB_ID.choice.macroENB_ID.buf[2]);
INT16_TO_OCTET_STRING(instance_p->tac, &ta.tAC);
MCC_MNC_TO_TBCD(instance_p->mcc, instance_p->mnc, instance_p->mnc_digit_length, &plmnIdentity);
ASN_SEQUENCE_ADD(&ta.broadcastPLMNs.list, &plmnIdentity);
ASN_SEQUENCE_ADD(&s1SetupRequest_p->supportedTAs.list, &ta);
s1SetupRequest_p->defaultPagingDRX = instance_p->default_drx;
if (instance_p->eNB_name != NULL) {
s1SetupRequest_p->presenceMask |= S1AP_S1SETUPREQUESTIES_ENBNAME_PRESENT;
OCTET_STRING_fromBuf(&s1SetupRequest_p->eNBname, instance_p->eNB_name,
strlen(instance_p->eNB_name));
}
if (s1ap_eNB_encode_pdu(&message, &buffer, &len) < 0) {
S1AP_ERROR("Failed to encode S1 setup request\n");
return -1;
}
/* Non UE-Associated signalling -> stream = 0 */
s1ap_eNB_itti_send_sctp_data_req(instance_p->instance, s1ap_mme_data_p->assoc_id, buffer, len, 0);
return ret;
}
+62
View File
@@ -0,0 +1,62 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
#include <stdio.h>
#include <stdint.h>
/** @defgroup _s1ap_impl_ S1AP Layer Reference Implementation for eNB
* @ingroup _ref_implementation_
* @{
*/
#ifndef S1AP_ENB_H_
#define S1AP_ENB_H_
typedef struct s1ap_eNB_config_s {
// MME related params
unsigned char mme_enabled; ///< MME enabled ?
} s1ap_eNB_config_t;
#if defined(OAI_EMU)
# define EPC_MODE_ENABLED oai_emulation.info.s1ap_config.mme_enabled
#else
extern s1ap_eNB_config_t s1ap_config;
# define EPC_MODE_ENABLED s1ap_config.mme_enabled
#endif
void *s1ap_eNB_task(void *arg);
uint32_t s1ap_generate_eNB_id(void);
#endif /* S1AP_ENB_H_ */
/**
* @}
*/
+241
View File
@@ -0,0 +1,241 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "assertions.h"
#include "conversions.h"
#include "intertask_interface.h"
#include "s1ap_common.h"
#include "s1ap_eNB_defs.h"
#include "s1ap_eNB_itti_messaging.h"
#include "s1ap_ies_defs.h"
#include "s1ap_eNB_encoder.h"
#include "s1ap_eNB_nnsf.h"
#include "s1ap_eNB_ue_context.h"
#include "s1ap_eNB_nas_procedures.h"
#include "s1ap_eNB_management_procedures.h"
#include "s1ap_eNB_context_management_procedures.h"
#include "msc.h"
int s1ap_ue_context_release_complete(instance_t instance,
s1ap_ue_release_complete_t *ue_release_complete_p)
{
s1ap_eNB_instance_t *s1ap_eNB_instance_p = NULL;
struct s1ap_eNB_ue_context_s *ue_context_p = NULL;
S1ap_UEContextReleaseCompleteIEs_t *ue_ctxt_release_complete_ies_p = NULL;
s1ap_message message;
uint8_t *buffer;
uint32_t length;
int ret = -1;
/* Retrieve the S1AP eNB instance associated with Mod_id */
s1ap_eNB_instance_p = s1ap_eNB_get_instance(instance);
DevAssert(ue_release_complete_p != NULL);
DevAssert(s1ap_eNB_instance_p != NULL);
/*RB_FOREACH(ue_context_p, s1ap_ue_map, &s1ap_eNB_instance_p->s1ap_ue_head) {
S1AP_WARN("in s1ap_ue_map: UE context eNB_ue_s1ap_id %u mme_ue_s1ap_id %u state %u\n",
ue_context_p->eNB_ue_s1ap_id, ue_context_p->mme_ue_s1ap_id,
ue_context_p->ue_state);
}*/
if ((ue_context_p = s1ap_eNB_get_ue_context(s1ap_eNB_instance_p,
ue_release_complete_p->eNB_ue_s1ap_id)) == NULL) {
/* The context for this eNB ue s1ap id doesn't exist in the map of eNB UEs */
S1AP_WARN("Failed to find ue context associated with eNB ue s1ap id: %u\n",
ue_release_complete_p->eNB_ue_s1ap_id);
return -1;
}
/* Prepare the S1AP message to encode */
memset(&message, 0, sizeof(s1ap_message));
message.direction = S1AP_PDU_PR_successfulOutcome;
message.procedureCode = S1ap_ProcedureCode_id_UEContextRelease;
//message.criticality = S1ap_Criticality_reject;
ue_ctxt_release_complete_ies_p = &message.msg.s1ap_UEContextReleaseCompleteIEs;
ue_ctxt_release_complete_ies_p->eNB_UE_S1AP_ID = ue_release_complete_p->eNB_ue_s1ap_id;
ue_ctxt_release_complete_ies_p->mme_ue_s1ap_id = ue_context_p->mme_ue_s1ap_id;
//ue_ctxt_release_complete_ies_p->criticalityDiagnostics
//ue_ctxt_release_complete_ies_p->presenceMask
if (s1ap_eNB_encode_pdu(&message, &buffer, &length) < 0) {
/* Encode procedure has failed... */
S1AP_ERROR("Failed to encode UE context release complete\n");
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
buffer,
length,
MSC_AS_TIME_FMT" UEContextRelease successfulOutcome eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
0,0, //MSC_AS_TIME_ARGS(ctxt_pP),
ue_ctxt_release_complete_ies_p->eNB_UE_S1AP_ID,
ue_ctxt_release_complete_ies_p->mme_ue_s1ap_id);
/* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
ue_context_p->mme_ref->assoc_id, buffer,
length, ue_context_p->tx_stream);
//LG s1ap_eNB_itti_send_sctp_close_association(s1ap_eNB_instance_p->instance,
// ue_context_p->mme_ref->assoc_id);
// release UE context
struct s1ap_eNB_ue_context_s *ue_context2_p = NULL;
if ((ue_context2_p = RB_REMOVE(s1ap_ue_map, &s1ap_eNB_instance_p->s1ap_ue_head, ue_context_p))
!= NULL) {
S1AP_WARN("Removed UE context eNB_ue_s1ap_id %u\n",
ue_context2_p->eNB_ue_s1ap_id);
s1ap_eNB_free_ue_context(ue_context2_p);
} else {
S1AP_WARN("Removing UE context eNB_ue_s1ap_id %u: did not find context\n",
ue_context_p->eNB_ue_s1ap_id);
}
/*RB_FOREACH(ue_context_p, s1ap_ue_map, &s1ap_eNB_instance_p->s1ap_ue_head) {
S1AP_WARN("in s1ap_ue_map: UE context eNB_ue_s1ap_id %u mme_ue_s1ap_id %u state %u\n",
ue_context_p->eNB_ue_s1ap_id, ue_context_p->mme_ue_s1ap_id,
ue_context_p->ue_state);
}*/
return ret;
}
int s1ap_ue_context_release_req(instance_t instance,
s1ap_ue_release_req_t *ue_release_req_p)
{
s1ap_eNB_instance_t *s1ap_eNB_instance_p = NULL;
struct s1ap_eNB_ue_context_s *ue_context_p = NULL;
S1ap_UEContextReleaseRequestIEs_t *ue_ctxt_release_request_ies_p = NULL;
s1ap_message message;
uint8_t *buffer = NULL;
uint32_t length;
/* Retrieve the S1AP eNB instance associated with Mod_id */
s1ap_eNB_instance_p = s1ap_eNB_get_instance(instance);
DevAssert(ue_release_req_p != NULL);
DevAssert(s1ap_eNB_instance_p != NULL);
if ((ue_context_p = s1ap_eNB_get_ue_context(s1ap_eNB_instance_p,
ue_release_req_p->eNB_ue_s1ap_id)) == NULL) {
/* The context for this eNB ue s1ap id doesn't exist in the map of eNB UEs */
S1AP_WARN("Failed to find ue context associated with eNB ue s1ap id: %u\n",
ue_release_req_p->eNB_ue_s1ap_id);
return -1;
}
/* Prepare the S1AP message to encode */
memset(&message, 0, sizeof(s1ap_message));
message.direction = S1AP_PDU_PR_initiatingMessage;
message.procedureCode = S1ap_ProcedureCode_id_UEContextReleaseRequest;
//message.criticality = S1ap_Criticality_reject;
ue_ctxt_release_request_ies_p = &message.msg.s1ap_UEContextReleaseRequestIEs;
ue_ctxt_release_request_ies_p->eNB_UE_S1AP_ID = ue_release_req_p->eNB_ue_s1ap_id;
ue_ctxt_release_request_ies_p->mme_ue_s1ap_id = ue_context_p->mme_ue_s1ap_id;
switch (ue_release_req_p->cause) {
case S1AP_CAUSE_NOTHING:
ue_ctxt_release_request_ies_p->cause.present = S1ap_Cause_PR_NOTHING;
break;
case S1AP_CAUSE_RADIO_NETWORK:
ue_ctxt_release_request_ies_p->cause.present = S1ap_Cause_PR_radioNetwork;
ue_ctxt_release_request_ies_p->cause.choice.radioNetwork = ue_release_req_p->cause_value;
break;
case S1AP_CAUSE_TRANSPORT:
ue_ctxt_release_request_ies_p->cause.present = S1ap_Cause_PR_transport;
ue_ctxt_release_request_ies_p->cause.choice.transport = ue_release_req_p->cause_value;
break;
case S1AP_CAUSE_NAS:
ue_ctxt_release_request_ies_p->cause.present = S1ap_Cause_PR_nas;
ue_ctxt_release_request_ies_p->cause.choice.nas = ue_release_req_p->cause_value;
break;
case S1AP_CAUSE_PROTOCOL:
ue_ctxt_release_request_ies_p->cause.present = S1ap_Cause_PR_protocol;
ue_ctxt_release_request_ies_p->cause.choice.protocol = ue_release_req_p->cause_value;
break;
case S1AP_CAUSE_MISC:
default:
ue_ctxt_release_request_ies_p->cause.present = S1ap_Cause_PR_misc;
ue_ctxt_release_request_ies_p->cause.choice.misc = ue_release_req_p->cause_value;
break;
}
if (s1ap_eNB_encode_pdu(&message, &buffer, &length) < 0) {
/* Encode procedure has failed... */
S1AP_ERROR("Failed to encode UE context release complete\n");
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
buffer,
length,
MSC_AS_TIME_FMT" UEContextReleaseRequest initiatingMessage eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
ue_ctxt_release_request_ies_p->eNB_UE_S1AP_ID,
ue_ctxt_release_request_ies_p->mme_ue_s1ap_id);
/* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
ue_context_p->mme_ref->assoc_id, buffer,
length, ue_context_p->tx_stream);
return 0;
}
+40
View File
@@ -0,0 +1,40 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
#ifndef S1AP_ENB_CONTEXT_MANAGEMENT_PROCEDURES_H_
#define S1AP_ENB_CONTEXT_MANAGEMENT_PROCEDURES_H_
int s1ap_ue_context_release_complete(instance_t instance,
s1ap_ue_release_complete_t *ue_release_complete_p);
int s1ap_ue_context_release_req(instance_t instance,
s1ap_ue_release_req_t *ue_release_req_p);
#endif /* S1AP_ENB_CONTEXT_MANAGEMENT_PROCEDURES_H_ */
+248
View File
@@ -0,0 +1,248 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
/*! \file s1ap_eNB_decoder.c
* \brief s1ap pdu decode procedures for eNB
* \author Sebastien ROUX <sebastien.roux@eurecom.fr>
* \date 2013
* \version 0.1
*/
#include <stdio.h>
#include "assertions.h"
#include "intertask_interface.h"
#include "s1ap_common.h"
#include "s1ap_ies_defs.h"
#include "s1ap_eNB_decoder.h"
static int s1ap_eNB_decode_initiating_message(s1ap_message *message,
S1ap_InitiatingMessage_t *initiating_p)
{
int ret = -1;
MessageDef *message_p;
char *message_string = NULL;
size_t message_string_size;
MessagesIds message_id;
DevAssert(initiating_p != NULL);
message_string = calloc(10000, sizeof(char));
s1ap_string_total_size = 0;
message->procedureCode = initiating_p->procedureCode;
message->criticality = initiating_p->criticality;
switch(initiating_p->procedureCode) {
case S1ap_ProcedureCode_id_downlinkNASTransport:
ret = s1ap_decode_s1ap_downlinknastransporties(
&message->msg.s1ap_DownlinkNASTransportIEs,
&initiating_p->value);
s1ap_xer_print_s1ap_downlinknastransport(s1ap_xer__print2sp,
message_string,
message);
message_id = S1AP_DOWNLINK_NAS_LOG;
message_string_size = strlen(message_string);
message_p = itti_alloc_new_message_sized(TASK_S1AP,
message_id,
message_string_size + sizeof (IttiMsgText));
message_p->ittiMsg.s1ap_downlink_nas_log.size = message_string_size;
memcpy(&message_p->ittiMsg.s1ap_downlink_nas_log.text, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(message_string);
break;
case S1ap_ProcedureCode_id_InitialContextSetup:
ret = s1ap_decode_s1ap_initialcontextsetuprequesties(
&message->msg.s1ap_InitialContextSetupRequestIEs, &initiating_p->value);
s1ap_xer_print_s1ap_initialcontextsetuprequest(s1ap_xer__print2sp, message_string, message);
message_id = S1AP_INITIAL_CONTEXT_SETUP_LOG;
message_string_size = strlen(message_string);
message_p = itti_alloc_new_message_sized(TASK_S1AP,
message_id,
message_string_size + sizeof (IttiMsgText));
message_p->ittiMsg.s1ap_initial_context_setup_log.size = message_string_size;
memcpy(&message_p->ittiMsg.s1ap_initial_context_setup_log.text, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(message_string);
break;
case S1ap_ProcedureCode_id_UEContextRelease:
ret = s1ap_decode_s1ap_uecontextreleasecommandies(
&message->msg.s1ap_UEContextReleaseCommandIEs, &initiating_p->value);
s1ap_xer_print_s1ap_uecontextreleasecommand(s1ap_xer__print2sp, message_string, message);
message_id = S1AP_UE_CONTEXT_RELEASE_COMMAND_LOG;
message_string_size = strlen(message_string);
message_p = itti_alloc_new_message_sized(TASK_S1AP,
message_id,
message_string_size + sizeof (IttiMsgText));
message_p->ittiMsg.s1ap_ue_context_release_command_log.size = message_string_size;
memcpy(&message_p->ittiMsg.s1ap_ue_context_release_command_log.text, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(message_string);
break;
case S1ap_ProcedureCode_id_Paging:
ret = s1ap_decode_s1ap_pagingies(
&message->msg.s1ap_PagingIEs, &initiating_p->value);
s1ap_xer_print_s1ap_paging(s1ap_xer__print2sp, message_string, message);
S1AP_ERROR("TODO Paging initiating message\n");
free(message_string);
break;
default:
S1AP_ERROR("Unknown procedure ID (%d) for initiating message\n",
(int)initiating_p->procedureCode);
AssertFatal( 0 , "Unknown procedure ID (%d) for initiating message\n",
(int)initiating_p->procedureCode);
return -1;
}
return ret;
}
static int s1ap_eNB_decode_successful_outcome(s1ap_message *message,
S1ap_SuccessfulOutcome_t *successfullOutcome_p)
{
int ret = -1;
MessageDef *message_p;
char *message_string = NULL;
size_t message_string_size;
MessagesIds message_id;
DevAssert(successfullOutcome_p != NULL);
message_string = malloc(sizeof(char) * 10000);
s1ap_string_total_size = 0;
message->procedureCode = successfullOutcome_p->procedureCode;
message->criticality = successfullOutcome_p->criticality;
switch(successfullOutcome_p->procedureCode) {
case S1ap_ProcedureCode_id_S1Setup:
ret = s1ap_decode_s1ap_s1setupresponseies(
&message->msg.s1ap_S1SetupResponseIEs, &successfullOutcome_p->value);
s1ap_xer_print_s1ap_s1setupresponse(s1ap_xer__print2sp, message_string, message);
message_id = S1AP_S1_SETUP_LOG;
break;
default:
S1AP_ERROR("Unknown procedure ID (%d) for successfull outcome message\n",
(int)successfullOutcome_p->procedureCode);
return -1;
}
message_string_size = strlen(message_string);
message_p = itti_alloc_new_message_sized(TASK_S1AP, message_id, message_string_size + sizeof (IttiMsgText));
message_p->ittiMsg.s1ap_s1_setup_log.size = message_string_size;
memcpy(&message_p->ittiMsg.s1ap_s1_setup_log.text, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(message_string);
return ret;
}
static int s1ap_eNB_decode_unsuccessful_outcome(s1ap_message *message,
S1ap_UnsuccessfulOutcome_t *unSuccessfullOutcome_p)
{
int ret = -1;
DevAssert(unSuccessfullOutcome_p != NULL);
message->procedureCode = unSuccessfullOutcome_p->procedureCode;
message->criticality = unSuccessfullOutcome_p->criticality;
switch(unSuccessfullOutcome_p->procedureCode) {
case S1ap_ProcedureCode_id_S1Setup:
return s1ap_decode_s1ap_s1setupfailureies(
&message->msg.s1ap_S1SetupFailureIEs, &unSuccessfullOutcome_p->value);
default:
S1AP_ERROR("Unknown procedure ID (%d) for unsuccessfull outcome message\n",
(int)unSuccessfullOutcome_p->procedureCode);
break;
}
return ret;
}
int s1ap_eNB_decode_pdu(s1ap_message *message, const uint8_t * const buffer,
const uint32_t length)
{
S1AP_PDU_t pdu;
S1AP_PDU_t *pdu_p = &pdu;
asn_dec_rval_t dec_ret;
DevAssert(buffer != NULL);
memset((void *)pdu_p, 0, sizeof(S1AP_PDU_t));
dec_ret = aper_decode(NULL,
&asn_DEF_S1AP_PDU,
(void **)&pdu_p,
buffer,
length,
0,
0);
if (dec_ret.code != RC_OK) {
S1AP_ERROR("Failed to decode pdu\n");
return -1;
}
message->direction = pdu_p->present;
switch(pdu_p->present) {
case S1AP_PDU_PR_initiatingMessage:
return s1ap_eNB_decode_initiating_message(message,
&pdu_p->choice.initiatingMessage);
case S1AP_PDU_PR_successfulOutcome:
return s1ap_eNB_decode_successful_outcome(message,
&pdu_p->choice.successfulOutcome);
case S1AP_PDU_PR_unsuccessfulOutcome:
return s1ap_eNB_decode_unsuccessful_outcome(message,
&pdu_p->choice.unsuccessfulOutcome);
default:
S1AP_DEBUG("Unknown presence (%d) or not implemented\n", (int)pdu_p->present);
break;
}
return -1;
}
+39
View File
@@ -0,0 +1,39 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
#include <stdint.h>
#include "s1ap_ies_defs.h"
#ifndef S1AP_ENB_DECODER_H_
#define S1AP_ENB_DECODER_H_
int s1ap_eNB_decode_pdu(s1ap_message *message, const uint8_t * const buffer,
const uint32_t length) __attribute__ ((warn_unused_result));
#endif /* S1AP_ENB_DECODER_H_ */
+45
View File
@@ -0,0 +1,45 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
#ifndef S1AP_ENB_DEFAULT_VALUES_H_
#define S1AP_ENB_DEFAULT_VALUES_H_
#define ENB_TAC (1)
#define ENB_MCC (208)
#define ENB_MNC (92)
#define ENB_NAME "Eurecom ENB"
#define ENB_NAME_FORMAT (ENB_NAME" %u")
#define S1AP_PORT_NUMBER (36412)
#define S1AP_SCTP_PPID (18)
#define X2AP_PORT_NUMBER (36422)
#define X2AP_SCTP_PPID (27)
#endif /* S1AP_ENB_DEFAULT_VALUES_H_ */
+236
View File
@@ -0,0 +1,236 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
#include <stdint.h>
#include "queue.h"
#include "tree.h"
#include "sctp_eNB_defs.h"
#ifndef S1AP_ENB_DEFS_H_
#define S1AP_ENB_DEFS_H_
#define S1AP_ENB_NAME_LENGTH_MAX (150)
typedef enum {
/* Disconnected state: initial state for any association. */
S1AP_ENB_STATE_DISCONNECTED = 0x0,
/* State waiting for S1 Setup response message if eNB is MME accepted or
* S1 Setup failure if MME rejects the eNB.
*/
S1AP_ENB_STATE_WAITING = 0x1,
/* The eNB is successfully connected to MME, UE contexts can be created. */
S1AP_ENB_STATE_CONNECTED = 0x2,
/* The MME has sent an overload start message. Once the MME disables the
* OVERLOAD marker, the state of the association will be
* S1AP_ENB_STATE_CONNECTED.
*/
S1AP_ENB_OVERLOAD = 0x3,
/* Max number of states available */
S1AP_ENB_STATE_MAX,
} s1ap_eNB_state_t;
/* If the Overload Action IE in the OVERLOAD START message is set to
* - “reject all RRC connection establishments for non-emergency mobile
* originated data transfer “ (i.e. reject traffic corresponding to RRC cause
* “mo-data “ (TS 36.331 [16])), or
* - “reject all RRC connection establishments for signalling “ (i.e. reject
* traffic corresponding to RRC cause “modata” and “mo-signalling”
* (TS 36.331 [16])),or
* - “only permit RRC connection establishments for emergency sessions and
* mobile terminated services” (i.e. only permit traffic corresponding to RRC
* cause “emergency” and “mt-Access” (TS 36.331 [16])).
*
* NOTE: When the Overload Action IE is set to “only permit RRC connection
* establishments for emergency sessions and mobile terminated services”,
* emergency calls with RRC cause “highPriorityAcess” from high priority users
* are rejected (TS 24.301 [24]).
*/
typedef enum {
S1AP_OVERLOAD_REJECT_MO_DATA = 0x0,
S1AP_OVERLOAD_REJECT_ALL_SIGNALLING = 0x1,
S1AP_OVERLOAD_ONLY_EMERGENCY_AND_MT = 0x2,
S1AP_NO_OVERLOAD = 0x3,
S1AP_OVERLOAD_MAX,
} s1ap_overload_state_t;
/* Served PLMN identity element */
struct plmn_identity_s {
uint16_t mcc;
uint16_t mnc;
uint8_t mnc_digit_length;
STAILQ_ENTRY(plmn_identity_s) next;
};
/* Served group id element */
struct served_group_id_s {
uint16_t mme_group_id;
STAILQ_ENTRY(served_group_id_s) next;
};
/* Served mme code for a particular MME */
struct mme_code_s {
uint8_t mme_code;
STAILQ_ENTRY(mme_code_s) next;
};
/* Served gummei element */
struct served_gummei_s {
/* Number of MME served PLMNs */
uint8_t nb_served_plmns;
/* List of served PLMNs by MME */
STAILQ_HEAD(served_plmns_s, plmn_identity_s) served_plmns;
/* Number of group id in list */
uint8_t nb_group_id;
/* Served group id list */
STAILQ_HEAD(served_group_ids_s, served_group_id_s) served_group_ids;
/* Number of MME code */
uint8_t nb_mme_code;
/* MME Code to uniquely identify an MME within an MME pool area */
STAILQ_HEAD(mme_codes_s, mme_code_s) mme_codes;
/* Next GUMMEI element */
STAILQ_ENTRY(served_gummei_s) next;
};
struct s1ap_eNB_instance_s;
/* This structure describes association of a eNB to a MME */
typedef struct s1ap_eNB_mme_data_s {
/* MME descriptors tree, ordered by sctp assoc id */
RB_ENTRY(s1ap_eNB_mme_data_s) entry;
/* This is the optional name provided by the MME */
char *mme_name;
/* List of served GUMMEI per MME. There is one GUMMEI per RAT with a max
* number of 8 RATs but in our case only one is used. The LTE related pool
* configuration is included on the first place in the list.
*/
STAILQ_HEAD(served_gummeis_s, served_gummei_s) served_gummei;
/* Relative processing capacity of an MME with respect to the other MMEs
* in the pool in order to load-balance MMEs within a pool as defined
* in TS 23.401.
*/
uint8_t relative_mme_capacity;
/* Current MME overload information (if any). */
s1ap_overload_state_t overload_state;
/* Current eNB->MME S1AP association state */
s1ap_eNB_state_t state;
/* Next usable stream for UE signalling */
int32_t nextstream;
/* Number of input/ouput streams */
uint16_t in_streams;
uint16_t out_streams;
/* Connexion id used between SCTP/S1AP */
uint16_t cnx_id;
/* SCTP association id */
int32_t assoc_id;
/* Only meaningfull in virtual mode */
struct s1ap_eNB_instance_s *s1ap_eNB_instance;
} s1ap_eNB_mme_data_t;
typedef struct s1ap_eNB_instance_s {
/* Next s1ap eNB association.
* Only used for virtual mode.
*/
STAILQ_ENTRY(s1ap_eNB_instance_s) s1ap_eNB_entries;
/* Number of MME requested by eNB (tree size) */
uint32_t s1ap_mme_nb;
/* Number of MME for which association is pending */
uint32_t s1ap_mme_pending_nb;
/* Number of MME successfully associated to eNB */
uint32_t s1ap_mme_associated_nb;
/* Tree of S1AP MME associations ordered by association ID */
RB_HEAD(s1ap_mme_map, s1ap_eNB_mme_data_s) s1ap_mme_head;
/* TODO: add a map ordered by relative MME capacity */
/* Tree of UE ordered by eNB_ue_s1ap_id's */
RB_HEAD(s1ap_ue_map, s1ap_eNB_ue_context_s) s1ap_ue_head;
/* For virtual mode, mod_id as defined in the rest of the L1/L2 stack */
instance_t instance;
/* Displayable name of eNB */
char *eNB_name;
/* Unique eNB_id to identify the eNB within EPC.
* In our case the eNB is a macro eNB so the id will be 20 bits long.
* For Home eNB id, this field should be 28 bits long.
*/
uint32_t eNB_id;
/* The type of the cell */
enum cell_type_e cell_type;
/* Tracking area code */
uint16_t tac;
/* Mobile Country Code
* Mobile Network Code
*/
uint16_t mcc;
uint16_t mnc;
uint8_t mnc_digit_length;
/* Default Paging DRX of the eNB as defined in TS 36.304 */
paging_drx_t default_drx;
} s1ap_eNB_instance_t;
typedef struct {
/* List of served eNBs
* Only used for virtual mode
*/
STAILQ_HEAD(s1ap_eNB_instances_head_s, s1ap_eNB_instance_s) s1ap_eNB_instances_head;
/* Nb of registered eNBs */
uint8_t nb_registered_eNBs;
/* Generate a unique connexion id used between S1AP and SCTP */
uint16_t global_cnx_id;
} s1ap_eNB_internal_data_t;
int s1ap_eNB_compare_assoc_id(
struct s1ap_eNB_mme_data_s *p1, struct s1ap_eNB_mme_data_s *p2);
/* Generate the tree management functions */
RB_PROTOTYPE(s1ap_mme_map, s1ap_eNB_mme_data_s, entry,
s1ap_eNB_compare_assoc_id);
#endif /* S1AP_ENB_DEFS_H_ */
+530
View File
@@ -0,0 +1,530 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
/*! \file s1ap_eNB_encoder.c
* \brief s1ap pdu encode procedures for eNB
* \author Sebastien ROUX <sebastien.roux@eurecom.fr>
* \date 2013
* \version 0.1
*/
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include "conversions.h"
#include "intertask_interface.h"
#include "s1ap_common.h"
#include "s1ap_ies_defs.h"
#include "s1ap_eNB_encoder.h"
static inline int s1ap_eNB_encode_initiating(s1ap_message *message,
uint8_t **buffer,
uint32_t *len);
static inline int s1ap_eNB_encode_successfull_outcome(s1ap_message *message,
uint8_t **buffer, uint32_t *len);
static inline int s1ap_eNB_encode_unsuccessfull_outcome(s1ap_message *message,
uint8_t **buffer, uint32_t *len);
static inline int s1ap_eNB_encode_s1_setup_request(
S1ap_S1SetupRequestIEs_t *s1SetupRequestIEs, uint8_t **buffer, uint32_t *length);
static inline int s1ap_eNB_encode_trace_failure(S1ap_TraceFailureIndicationIEs_t
*trace_failure_ies_p, uint8_t **buffer,
uint32_t *length);
static inline int s1ap_eNB_encode_initial_ue_message(S1ap_InitialUEMessageIEs_t
*initialUEmessageIEs_p, uint8_t **buffer,
uint32_t *length);
static inline int s1ap_eNB_encode_uplink_nas_transport(S1ap_UplinkNASTransportIEs_t
*uplinkNASTransportIEs,
uint8_t **buffer,
uint32_t *length);
static inline int s1ap_eNB_encode_ue_capability_info_indication(
S1ap_UECapabilityInfoIndicationIEs_t *ueCapabilityInfoIndicationIEs,
uint8_t **buffer,
uint32_t *length);
static inline int s1ap_eNB_encode_initial_context_setup_response(
S1ap_InitialContextSetupResponseIEs_t *initialContextSetupResponseIEs,
uint8_t **buffer,
uint32_t *length);
static inline
int s1ap_eNB_encode_nas_non_delivery(
S1ap_NASNonDeliveryIndication_IEs_t *nasNonDeliveryIndicationIEs,
uint8_t **buffer,
uint32_t *length);
static inline
int s1ap_eNB_encode_ue_context_release_complete(
S1ap_UEContextReleaseCompleteIEs_t *s1ap_UEContextReleaseCompleteIEs,
uint8_t **buffer,
uint32_t *length);
static inline
int s1ap_eNB_encode_ue_context_release_request(
S1ap_UEContextReleaseRequestIEs_t *s1ap_UEContextReleaseRequestIEs,
uint8_t **buffer,
uint32_t *length);
int s1ap_eNB_encode_pdu(s1ap_message *message, uint8_t **buffer, uint32_t *len)
{
DevAssert(message != NULL);
DevAssert(buffer != NULL);
DevAssert(len != NULL);
switch(message->direction) {
case S1AP_PDU_PR_initiatingMessage:
return s1ap_eNB_encode_initiating(message, buffer, len);
case S1AP_PDU_PR_successfulOutcome:
return s1ap_eNB_encode_successfull_outcome(message, buffer, len);
case S1AP_PDU_PR_unsuccessfulOutcome:
return s1ap_eNB_encode_unsuccessfull_outcome(message, buffer, len);
default:
S1AP_DEBUG("Unknown message outcome (%d) or not implemented",
(int)message->direction);
break;
}
return -1;
}
static inline
int s1ap_eNB_encode_initiating(s1ap_message *s1ap_message_p,
uint8_t **buffer, uint32_t *len)
{
int ret = -1;
MessageDef *message_p;
char *message_string = NULL;
size_t message_string_size;
MessagesIds message_id;
DevAssert(s1ap_message_p != NULL);
message_string = calloc(10000, sizeof(char));
s1ap_string_total_size = 0;
switch(s1ap_message_p->procedureCode) {
case S1ap_ProcedureCode_id_S1Setup:
ret = s1ap_eNB_encode_s1_setup_request(
&s1ap_message_p->msg.s1ap_S1SetupRequestIEs, buffer, len);
s1ap_xer_print_s1ap_s1setuprequest(s1ap_xer__print2sp, message_string, s1ap_message_p);
message_id = S1AP_S1_SETUP_LOG;
break;
case S1ap_ProcedureCode_id_uplinkNASTransport:
ret = s1ap_eNB_encode_uplink_nas_transport(
&s1ap_message_p->msg.s1ap_UplinkNASTransportIEs, buffer, len);
s1ap_xer_print_s1ap_uplinknastransport(s1ap_xer__print2sp, message_string, s1ap_message_p);
message_id = S1AP_UPLINK_NAS_LOG;
break;
case S1ap_ProcedureCode_id_UECapabilityInfoIndication:
ret = s1ap_eNB_encode_ue_capability_info_indication(
&s1ap_message_p->msg.s1ap_UECapabilityInfoIndicationIEs, buffer, len);
s1ap_xer_print_s1ap_uecapabilityinfoindication(s1ap_xer__print2sp, message_string, s1ap_message_p);
message_id = S1AP_UE_CAPABILITY_IND_LOG;
break;
case S1ap_ProcedureCode_id_initialUEMessage:
ret = s1ap_eNB_encode_initial_ue_message(
&s1ap_message_p->msg.s1ap_InitialUEMessageIEs, buffer, len);
s1ap_xer_print_s1ap_initialuemessage(s1ap_xer__print2sp, message_string, s1ap_message_p);
message_id = S1AP_INITIAL_UE_MESSAGE_LOG;
break;
case S1ap_ProcedureCode_id_NASNonDeliveryIndication:
ret = s1ap_eNB_encode_nas_non_delivery(
&s1ap_message_p->msg.s1ap_NASNonDeliveryIndication_IEs, buffer, len);
s1ap_xer_print_s1ap_nasnondeliveryindication_(s1ap_xer__print2sp,
message_string, s1ap_message_p);
message_id = S1AP_NAS_NON_DELIVERY_IND_LOG;
break;
case S1ap_ProcedureCode_id_UEContextReleaseRequest:
ret = s1ap_eNB_encode_ue_context_release_request(
&s1ap_message_p->msg.s1ap_UEContextReleaseRequestIEs, buffer, len);
s1ap_xer_print_s1ap_uecontextreleaserequest(s1ap_xer__print2sp,
message_string, s1ap_message_p);
message_id = S1AP_UE_CONTEXT_RELEASE_REQ_LOG;
break;
default:
S1AP_DEBUG("Unknown procedure ID (%d) for initiating message\n",
(int)s1ap_message_p->procedureCode);
return ret;
break;
}
message_string_size = strlen(message_string);
message_p = itti_alloc_new_message_sized(TASK_S1AP, message_id, message_string_size + sizeof (IttiMsgText));
message_p->ittiMsg.s1ap_s1_setup_log.size = message_string_size;
memcpy(&message_p->ittiMsg.s1ap_s1_setup_log.text, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(message_string);
return ret;
}
static inline
int s1ap_eNB_encode_successfull_outcome(s1ap_message *s1ap_message_p,
uint8_t **buffer, uint32_t *len)
{
int ret = -1;
MessageDef *message_p;
char *message_string = NULL;
size_t message_string_size;
MessagesIds message_id;
DevAssert(s1ap_message_p != NULL);
message_string = calloc(10000, sizeof(char));
s1ap_string_total_size = 0;
message_string_size = strlen(message_string);
switch(s1ap_message_p->procedureCode) {
case S1ap_ProcedureCode_id_InitialContextSetup:
ret = s1ap_eNB_encode_initial_context_setup_response(
&s1ap_message_p->msg.s1ap_InitialContextSetupResponseIEs, buffer, len);
s1ap_xer_print_s1ap_initialcontextsetupresponse(s1ap_xer__print2sp, message_string, s1ap_message_p);
message_id = S1AP_INITIAL_CONTEXT_SETUP_LOG;
message_p = itti_alloc_new_message_sized(TASK_S1AP, message_id, message_string_size + sizeof (IttiMsgText));
message_p->ittiMsg.s1ap_initial_context_setup_log.size = message_string_size;
memcpy(&message_p->ittiMsg.s1ap_initial_context_setup_log.text, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(message_string);
break;
case S1ap_ProcedureCode_id_UEContextRelease:
ret = s1ap_eNB_encode_ue_context_release_complete(
&s1ap_message_p->msg.s1ap_UEContextReleaseCompleteIEs, buffer, len);
s1ap_xer_print_s1ap_uecontextreleasecomplete(s1ap_xer__print2sp, message_string, s1ap_message_p);
message_id = S1AP_UE_CONTEXT_RELEASE_COMPLETE_LOG;
message_p = itti_alloc_new_message_sized(TASK_S1AP, message_id, message_string_size + sizeof (IttiMsgText));
message_p->ittiMsg.s1ap_ue_context_release_complete_log.size = message_string_size;
memcpy(&message_p->ittiMsg.s1ap_ue_context_release_complete_log.text, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(message_string);
break;
default:
S1AP_DEBUG("Unknown procedure ID (%d) for successfull outcome message\n",
(int)s1ap_message_p->procedureCode);
return ret;
break;
}
return ret;
}
static inline
int s1ap_eNB_encode_unsuccessfull_outcome(s1ap_message *s1ap_message_p,
uint8_t **buffer, uint32_t *len)
{
int ret = -1;
MessageDef *message_p;
char *message_string = NULL;
size_t message_string_size;
MessagesIds message_id;
DevAssert(s1ap_message_p != NULL);
message_string = calloc(10000, sizeof(char));
s1ap_string_total_size = 0;
switch(s1ap_message_p->procedureCode) {
case S1ap_ProcedureCode_id_InitialContextSetup:
// ret = s1ap_encode_s1ap_initialcontextsetupfailureies(
// &s1ap_message_p->ittiMsg.s1ap_InitialContextSetupFailureIEs, buffer, len);
s1ap_xer_print_s1ap_initialcontextsetupfailure(s1ap_xer__print2sp, message_string, s1ap_message_p);
message_id = S1AP_INITIAL_CONTEXT_SETUP_LOG;
break;
default:
S1AP_DEBUG("Unknown procedure ID (%d) for unsuccessfull outcome message\n",
(int)s1ap_message_p->procedureCode);
return ret;
break;
}
message_string_size = strlen(message_string);
message_p = itti_alloc_new_message_sized(TASK_S1AP, message_id, message_string_size + sizeof (IttiMsgText));
message_p->ittiMsg.s1ap_initial_context_setup_log.size = message_string_size;
memcpy(&message_p->ittiMsg.s1ap_initial_context_setup_log.text, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(message_string);
return ret;
}
static inline
int s1ap_eNB_encode_ue_capability_info_indication(
S1ap_UECapabilityInfoIndicationIEs_t *ueCapabilityInfoIndicationIEs,
uint8_t **buffer,
uint32_t *length)
{
S1ap_UECapabilityInfoIndication_t ueCapabilityInfoIndication;
S1ap_UECapabilityInfoIndication_t *ueCapabilityInfoIndication_p =
&ueCapabilityInfoIndication;
memset((void *)ueCapabilityInfoIndication_p, 0, sizeof(ueCapabilityInfoIndication));
if (s1ap_encode_s1ap_uecapabilityinfoindicationies(
ueCapabilityInfoIndication_p, ueCapabilityInfoIndicationIEs) < 0) {
return -1;
}
return s1ap_generate_initiating_message(buffer,
length,
S1ap_ProcedureCode_id_UECapabilityInfoIndication,
S1ap_Criticality_ignore,
&asn_DEF_S1ap_UECapabilityInfoIndication,
ueCapabilityInfoIndication_p);
}
static inline
int s1ap_eNB_encode_uplink_nas_transport(
S1ap_UplinkNASTransportIEs_t *uplinkNASTransportIEs,
uint8_t **buffer,
uint32_t *length)
{
S1ap_UplinkNASTransport_t uplinkNASTransport;
S1ap_UplinkNASTransport_t *uplinkNASTransport_p = &uplinkNASTransport;
memset((void *)uplinkNASTransport_p, 0, sizeof(uplinkNASTransport));
if (s1ap_encode_s1ap_uplinknastransporties(
uplinkNASTransport_p, uplinkNASTransportIEs) < 0) {
return -1;
}
return s1ap_generate_initiating_message(buffer,
length,
S1ap_ProcedureCode_id_uplinkNASTransport,
S1ap_Criticality_ignore,
&asn_DEF_S1ap_UplinkNASTransport,
uplinkNASTransport_p);
}
static inline
int s1ap_eNB_encode_nas_non_delivery(
S1ap_NASNonDeliveryIndication_IEs_t *nasNonDeliveryIndicationIEs,
uint8_t **buffer,
uint32_t *length)
{
S1ap_NASNonDeliveryIndication_t nasNonDeliveryIndication;
S1ap_NASNonDeliveryIndication_t *nasNonDeliveryIndication_p = &nasNonDeliveryIndication;
memset((void *)nasNonDeliveryIndication_p, 0, sizeof(nasNonDeliveryIndication));
if (s1ap_encode_s1ap_nasnondeliveryindication_ies(
nasNonDeliveryIndication_p, nasNonDeliveryIndicationIEs) < 0) {
return -1;
}
return s1ap_generate_initiating_message(buffer,
length,
S1ap_ProcedureCode_id_NASNonDeliveryIndication,
S1ap_Criticality_ignore,
&asn_DEF_S1ap_NASNonDeliveryIndication,
nasNonDeliveryIndication_p);
}
static inline
int s1ap_eNB_encode_s1_setup_request(
S1ap_S1SetupRequestIEs_t *s1SetupRequestIEs,
uint8_t **buffer,
uint32_t *length)
{
S1ap_S1SetupRequest_t s1SetupRequest;
S1ap_S1SetupRequest_t *s1SetupRequest_p = &s1SetupRequest;
memset((void *)s1SetupRequest_p, 0, sizeof(s1SetupRequest));
if (s1ap_encode_s1ap_s1setuprequesties(s1SetupRequest_p, s1SetupRequestIEs) < 0) {
return -1;
}
return s1ap_generate_initiating_message(buffer,
length,
S1ap_ProcedureCode_id_S1Setup,
S1ap_Criticality_reject,
&asn_DEF_S1ap_S1SetupRequest,
s1SetupRequest_p);
}
static inline
int s1ap_eNB_encode_initial_ue_message(
S1ap_InitialUEMessageIEs_t *initialUEmessageIEs_p,
uint8_t **buffer,
uint32_t *length)
{
S1ap_InitialUEMessage_t initialUEMessage;
S1ap_InitialUEMessage_t *initialUEMessage_p = &initialUEMessage;
memset((void *)initialUEMessage_p, 0, sizeof(initialUEMessage));
if (s1ap_encode_s1ap_initialuemessageies(
initialUEMessage_p, initialUEmessageIEs_p) < 0) {
return -1;
}
return s1ap_generate_initiating_message(buffer,
length,
S1ap_ProcedureCode_id_initialUEMessage,
S1ap_Criticality_reject,
&asn_DEF_S1ap_InitialUEMessage,
initialUEMessage_p);
}
static inline
int s1ap_eNB_encode_trace_failure(
S1ap_TraceFailureIndicationIEs_t *trace_failure_ies_p,
uint8_t **buffer,
uint32_t *length)
{
S1ap_TraceFailureIndication_t trace_failure;
S1ap_TraceFailureIndication_t *trace_failure_p = &trace_failure;
memset((void *)trace_failure_p, 0, sizeof(trace_failure));
if (s1ap_encode_s1ap_tracefailureindicationies(
trace_failure_p, trace_failure_ies_p) < 0) {
return -1;
}
return s1ap_generate_initiating_message(buffer,
length,
S1ap_ProcedureCode_id_TraceFailureIndication,
S1ap_Criticality_reject,
&asn_DEF_S1ap_TraceFailureIndication,
trace_failure_p);
}
static inline
int s1ap_eNB_encode_initial_context_setup_response(
S1ap_InitialContextSetupResponseIEs_t *initialContextSetupResponseIEs,
uint8_t **buffer,
uint32_t *length)
{
S1ap_InitialContextSetupResponse_t initial_context_setup_response;
S1ap_InitialContextSetupResponse_t *initial_context_setup_response_p =
&initial_context_setup_response;
memset((void *)initial_context_setup_response_p, 0,
sizeof(initial_context_setup_response));
if (s1ap_encode_s1ap_initialcontextsetupresponseies(
initial_context_setup_response_p, initialContextSetupResponseIEs) < 0) {
return -1;
}
return s1ap_generate_successfull_outcome(buffer,
length,
S1ap_ProcedureCode_id_InitialContextSetup,
S1ap_Criticality_reject,
&asn_DEF_S1ap_InitialContextSetupResponse,
initial_context_setup_response_p);
}
static inline
int s1ap_eNB_encode_ue_context_release_complete(
S1ap_UEContextReleaseCompleteIEs_t *s1ap_UEContextReleaseCompleteIEs,
uint8_t **buffer,
uint32_t *length)
{
S1ap_UEContextReleaseComplete_t ue_context_release_complete;
S1ap_UEContextReleaseComplete_t *ue_context_release_complete_p =
&ue_context_release_complete;
memset((void *)ue_context_release_complete_p, 0,
sizeof(ue_context_release_complete));
if (s1ap_encode_s1ap_uecontextreleasecompleteies(
ue_context_release_complete_p, s1ap_UEContextReleaseCompleteIEs) < 0) {
return -1;
}
return s1ap_generate_successfull_outcome(buffer,
length,
S1ap_ProcedureCode_id_UEContextRelease,
S1ap_Criticality_reject,
&asn_DEF_S1ap_UEContextReleaseComplete,
ue_context_release_complete_p);
}
static inline
int s1ap_eNB_encode_ue_context_release_request(
S1ap_UEContextReleaseRequestIEs_t *s1ap_UEContextReleaseRequestIEs,
uint8_t **buffer,
uint32_t *length)
{
S1ap_UEContextReleaseRequest_t ue_context_release_request;
S1ap_UEContextReleaseRequest_t *ue_context_release_request_p =
&ue_context_release_request;
memset((void *)ue_context_release_request_p, 0,
sizeof(ue_context_release_request));
if (s1ap_encode_s1ap_uecontextreleaserequesties(
ue_context_release_request_p, s1ap_UEContextReleaseRequestIEs) < 0) {
return -1;
}
return s1ap_generate_initiating_message(buffer,
length,
S1ap_ProcedureCode_id_UEContextReleaseRequest,
S1ap_Criticality_reject,
&asn_DEF_S1ap_UEContextReleaseRequest,
ue_context_release_request_p);
}
+36
View File
@@ -0,0 +1,36 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
#ifndef S1AP_ENB_ENCODER_H_
#define S1AP_ENB_ENCODER_H_
int s1ap_eNB_encode_pdu(s1ap_message *message, uint8_t **buffer, uint32_t *len)
__attribute__ ((warn_unused_result));
#endif /* S1AP_ENB_ENCODER_H_ */
+874
View File
@@ -0,0 +1,874 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
/*! \file s1ap_eNB_handlers.c
* \brief s1ap messages handlers for eNB part
* \author Sebastien ROUX <sebastien.roux@eurecom.fr>
* \date 2013
* \version 0.1
*/
#include <stdint.h>
#include "intertask_interface.h"
#include "asn1_conversions.h"
#include "s1ap_common.h"
#include "s1ap_ies_defs.h"
// #include "s1ap_eNB.h"
#include "s1ap_eNB_defs.h"
#include "s1ap_eNB_handlers.h"
#include "s1ap_eNB_decoder.h"
#include "s1ap_eNB_ue_context.h"
#include "s1ap_eNB_trace.h"
#include "s1ap_eNB_nas_procedures.h"
#include "s1ap_eNB_management_procedures.h"
#include "s1ap_eNB_default_values.h"
#include "assertions.h"
#include "conversions.h"
#include "msc.h"
static
int s1ap_eNB_handle_s1_setup_response(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *message_p);
static
int s1ap_eNB_handle_s1_setup_failure(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *message_p);
static
int s1ap_eNB_handle_error_indication(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *message_p);
static
int s1ap_eNB_handle_initial_context_request(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *message_p);
static
int s1ap_eNB_handle_ue_context_release_command(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *s1ap_message_p);
/* Handlers matrix. Only eNB related procedure present here */
s1ap_message_decoded_callback messages_callback[][3] = {
{ 0, 0, 0 }, /* HandoverPreparation */
{ 0, 0, 0 }, /* HandoverResourceAllocation */
{ 0, 0, 0 }, /* HandoverNotification */
{ 0, 0, 0 }, /* PathSwitchRequest */
{ 0, 0, 0 }, /* HandoverCancel */
{ 0, 0, 0 }, /* E_RABSetup */
{ 0, 0, 0 }, /* E_RABModify */
{ 0, 0, 0 }, /* E_RABRelease */
{ 0, 0, 0 }, /* E_RABReleaseIndication */
{ s1ap_eNB_handle_initial_context_request, 0, 0 }, /* InitialContextSetup */
{ 0, 0, 0 }, /* Paging */
{ s1ap_eNB_handle_nas_downlink, 0, 0 }, /* downlinkNASTransport */
{ 0, 0, 0 }, /* initialUEMessage */
{ 0, 0, 0 }, /* uplinkNASTransport */
{ 0, 0, 0 }, /* Reset */
{ s1ap_eNB_handle_error_indication, 0, 0 }, /* ErrorIndication */
{ 0, 0, 0 }, /* NASNonDeliveryIndication */
{ 0, s1ap_eNB_handle_s1_setup_response, s1ap_eNB_handle_s1_setup_failure }, /* S1Setup */
{ 0, 0, 0 }, /* UEContextReleaseRequest */
{ 0, 0, 0 }, /* DownlinkS1cdma2000tunneling */
{ 0, 0, 0 }, /* UplinkS1cdma2000tunneling */
{ 0, 0, 0 }, /* UEContextModification */
{ 0, 0, 0 }, /* UECapabilityInfoIndication */
{ s1ap_eNB_handle_ue_context_release_command, 0, 0 }, /* UEContextRelease */
{ 0, 0, 0 }, /* eNBStatusTransfer */
{ 0, 0, 0 }, /* MMEStatusTransfer */
{ s1ap_eNB_handle_deactivate_trace, 0, 0 }, /* DeactivateTrace */
{ s1ap_eNB_handle_trace_start, 0, 0 }, /* TraceStart */
{ 0, 0, 0 }, /* TraceFailureIndication */
{ 0, 0, 0 }, /* ENBConfigurationUpdate */
{ 0, 0, 0 }, /* MMEConfigurationUpdate */
{ 0, 0, 0 }, /* LocationReportingControl */
{ 0, 0, 0 }, /* LocationReportingFailureIndication */
{ 0, 0, 0 }, /* LocationReport */
{ 0, 0, 0 }, /* OverloadStart */
{ 0, 0, 0 }, /* OverloadStop */
{ 0, 0, 0 }, /* WriteReplaceWarning */
{ 0, 0, 0 }, /* eNBDirectInformationTransfer */
{ 0, 0, 0 }, /* MMEDirectInformationTransfer */
{ 0, 0, 0 }, /* PrivateMessage */
{ 0, 0, 0 }, /* eNBConfigurationTransfer */
{ 0, 0, 0 }, /* MMEConfigurationTransfer */
{ 0, 0, 0 }, /* CellTrafficTrace */
#if defined(UPDATE_RELEASE_9)
{ 0, 0, 0 }, /* Kill */
{ 0, 0, 0 }, /* DownlinkUEAssociatedLPPaTransport */
{ 0, 0, 0 }, /* UplinkUEAssociatedLPPaTransport */
{ 0, 0, 0 }, /* DownlinkNonUEAssociatedLPPaTransport */
{ 0, 0, 0 }, /* UplinkNonUEAssociatedLPPaTransport */
#endif
};
static const char *s1ap_direction2String[] = {
"", /* Nothing */
"Originating message", /* originating message */
"Successfull outcome", /* successfull outcome */
"UnSuccessfull outcome", /* successfull outcome */
};
void s1ap_handle_s1_setup_message(s1ap_eNB_mme_data_t *mme_desc_p, int sctp_shutdown)
{
if (sctp_shutdown) {
/* A previously connected MME has been shutdown */
/* TODO check if it was used by some eNB and send a message to inform these eNB if there is no more associated MME */
if (mme_desc_p->state == S1AP_ENB_STATE_CONNECTED) {
mme_desc_p->state = S1AP_ENB_STATE_DISCONNECTED;
if (mme_desc_p->s1ap_eNB_instance->s1ap_mme_associated_nb > 0) {
/* Decrease associated MME number */
mme_desc_p->s1ap_eNB_instance->s1ap_mme_associated_nb --;
}
/* If there are no more associated MME, inform eNB app */
if (mme_desc_p->s1ap_eNB_instance->s1ap_mme_associated_nb == 0) {
MessageDef *message_p;
message_p = itti_alloc_new_message(TASK_S1AP, S1AP_DEREGISTERED_ENB_IND);
S1AP_DEREGISTERED_ENB_IND(message_p).nb_mme = 0;
itti_send_msg_to_task(TASK_ENB_APP, mme_desc_p->s1ap_eNB_instance->instance, message_p);
}
}
} else {
/* Check that at least one setup message is pending */
DevCheck(mme_desc_p->s1ap_eNB_instance->s1ap_mme_pending_nb > 0, mme_desc_p->s1ap_eNB_instance->instance,
mme_desc_p->s1ap_eNB_instance->s1ap_mme_pending_nb, 0);
if (mme_desc_p->s1ap_eNB_instance->s1ap_mme_pending_nb > 0) {
/* Decrease pending messages number */
mme_desc_p->s1ap_eNB_instance->s1ap_mme_pending_nb --;
}
/* If there are no more pending messages, inform eNB app */
if (mme_desc_p->s1ap_eNB_instance->s1ap_mme_pending_nb == 0) {
MessageDef *message_p;
message_p = itti_alloc_new_message(TASK_S1AP, S1AP_REGISTER_ENB_CNF);
S1AP_REGISTER_ENB_CNF(message_p).nb_mme = mme_desc_p->s1ap_eNB_instance->s1ap_mme_associated_nb;
itti_send_msg_to_task(TASK_ENB_APP, mme_desc_p->s1ap_eNB_instance->instance, message_p);
}
}
}
int s1ap_eNB_handle_message(uint32_t assoc_id, int32_t stream,
const uint8_t * const data, const uint32_t data_length)
{
struct s1ap_message_s message;
DevAssert(data != NULL);
memset(&message, 0, sizeof(struct s1ap_message_s));
if (s1ap_eNB_decode_pdu(&message, data, data_length) < 0) {
S1AP_ERROR("Failed to decode PDU\n");
return -1;
}
/* Checking procedure Code and direction of message */
if (message.procedureCode > sizeof(messages_callback) / (3 * sizeof(
s1ap_message_decoded_callback))
|| (message.direction > S1AP_PDU_PR_unsuccessfulOutcome)) {
S1AP_ERROR("[SCTP %d] Either procedureCode %d or direction %d exceed expected\n",
assoc_id, message.procedureCode, message.direction);
return -1;
}
/* No handler present.
* This can mean not implemented or no procedure for eNB (wrong direction).
*/
if (messages_callback[message.procedureCode][message.direction-1] == NULL) {
S1AP_ERROR("[SCTP %d] No handler for procedureCode %d in %s\n",
assoc_id, message.procedureCode,
s1ap_direction2String[message.direction]);
return -1;
}
/* Calling the right handler */
return (*messages_callback[message.procedureCode][message.direction-1])
(assoc_id, stream, &message);
}
static
int s1ap_eNB_handle_s1_setup_failure(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *message_p)
{
S1ap_S1SetupFailureIEs_t *s1_setup_failure_p;
s1ap_eNB_mme_data_t *mme_desc_p;
DevAssert(message_p != NULL);
s1_setup_failure_p = &message_p->msg.s1ap_S1SetupFailureIEs;
/* S1 Setup Failure == Non UE-related procedure -> stream 0 */
if (stream != 0) {
S1AP_WARN("[SCTP %d] Received s1 setup failure on stream != 0 (%d)\n",
assoc_id, stream);
}
if ((mme_desc_p = s1ap_eNB_get_MME(NULL, assoc_id, 0)) == NULL) {
S1AP_ERROR("[SCTP %d] Received S1 setup response for non existing "
"MME context\n", assoc_id);
return -1;
}
if ((s1_setup_failure_p->cause.present == S1ap_Cause_PR_misc) &&
(s1_setup_failure_p->cause.choice.misc == S1ap_CauseMisc_unspecified)) {
S1AP_WARN("Received s1 setup failure for MME... MME is not ready\n");
} else {
S1AP_ERROR("Received s1 setup failure for MME... please check your parameters\n");
}
mme_desc_p->state = S1AP_ENB_STATE_WAITING;
s1ap_handle_s1_setup_message(mme_desc_p, 0);
return 0;
}
static
int s1ap_eNB_handle_s1_setup_response(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *message_p)
{
S1ap_S1SetupResponseIEs_t *s1SetupResponse_p;
s1ap_eNB_mme_data_t *mme_desc_p;
int i;
DevAssert(message_p != NULL);
s1SetupResponse_p = &message_p->msg.s1ap_S1SetupResponseIEs;
/* S1 Setup Response == Non UE-related procedure -> stream 0 */
if (stream != 0) {
S1AP_ERROR("[SCTP %d] Received s1 setup response on stream != 0 (%d)\n",
assoc_id, stream);
return -1;
}
if ((mme_desc_p = s1ap_eNB_get_MME(NULL, assoc_id, 0)) == NULL) {
S1AP_ERROR("[SCTP %d] Received S1 setup response for non existing "
"MME context\n", assoc_id);
return -1;
}
/* The list of served gummei can contain at most 8 elements.
* LTE related gummei is the first element in the list, i.e with an id of 0.
*/
S1AP_DEBUG("servedGUMMEIs.list.count %d\n",s1SetupResponse_p->servedGUMMEIs.list.count);
DevAssert(s1SetupResponse_p->servedGUMMEIs.list.count > 0);
DevAssert(s1SetupResponse_p->servedGUMMEIs.list.count <= 8);
for (i = 0; i < s1SetupResponse_p->servedGUMMEIs.list.count; i++) {
struct S1ap_ServedGUMMEIsItem *gummei_item_p;
struct served_gummei_s *new_gummei_p;
int j;
gummei_item_p = (struct S1ap_ServedGUMMEIsItem *)
s1SetupResponse_p->servedGUMMEIs.list.array[i];
new_gummei_p = calloc(1, sizeof(struct served_gummei_s));
STAILQ_INIT(&new_gummei_p->served_plmns);
STAILQ_INIT(&new_gummei_p->served_group_ids);
STAILQ_INIT(&new_gummei_p->mme_codes);
S1AP_DEBUG("servedPLMNs.list.count %d\n",gummei_item_p->servedPLMNs.list.count);
for (j = 0; j < gummei_item_p->servedPLMNs.list.count; j++) {
S1ap_PLMNidentity_t *plmn_identity_p;
struct plmn_identity_s *new_plmn_identity_p;
plmn_identity_p = gummei_item_p->servedPLMNs.list.array[j];
new_plmn_identity_p = calloc(1, sizeof(struct plmn_identity_s));
TBCD_TO_MCC_MNC(plmn_identity_p, new_plmn_identity_p->mcc,
new_plmn_identity_p->mnc, new_plmn_identity_p->mnc_digit_length);
STAILQ_INSERT_TAIL(&new_gummei_p->served_plmns, new_plmn_identity_p, next);
new_gummei_p->nb_served_plmns++;
}
for (j = 0; j < gummei_item_p->servedGroupIDs.list.count; j++) {
S1ap_MME_Group_ID_t *mme_group_id_p;
struct served_group_id_s *new_group_id_p;
mme_group_id_p = gummei_item_p->servedGroupIDs.list.array[j];
new_group_id_p = calloc(1, sizeof(struct served_group_id_s));
OCTET_STRING_TO_INT16(mme_group_id_p, new_group_id_p->mme_group_id);
STAILQ_INSERT_TAIL(&new_gummei_p->served_group_ids, new_group_id_p, next);
new_gummei_p->nb_group_id++;
}
for (j = 0; j < gummei_item_p->servedMMECs.list.count; j++) {
S1ap_MME_Code_t *mme_code_p;
struct mme_code_s *new_mme_code_p;
mme_code_p = gummei_item_p->servedMMECs.list.array[j];
new_mme_code_p = calloc(1, sizeof(struct mme_code_s));
OCTET_STRING_TO_INT8(mme_code_p, new_mme_code_p->mme_code);
STAILQ_INSERT_TAIL(&new_gummei_p->mme_codes, new_mme_code_p, next);
new_gummei_p->nb_mme_code++;
}
STAILQ_INSERT_TAIL(&mme_desc_p->served_gummei, new_gummei_p, next);
}
/* Free contents of the list */
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_S1ap_ServedGUMMEIs,
(void *)&s1SetupResponse_p->servedGUMMEIs);
/* Set the capacity of this MME */
mme_desc_p->relative_mme_capacity = s1SetupResponse_p->relativeMMECapacity;
/* Optionaly set the mme name */
if (s1SetupResponse_p->presenceMask & S1AP_S1SETUPRESPONSEIES_MMENAME_PRESENT) {
mme_desc_p->mme_name = calloc(s1SetupResponse_p->mmEname.size + 1, sizeof(char));
memcpy(mme_desc_p->mme_name, s1SetupResponse_p->mmEname.buf,
s1SetupResponse_p->mmEname.size);
/* Convert the mme name to a printable string */
mme_desc_p->mme_name[s1SetupResponse_p->mmEname.size] = '\0';
}
/* The association is now ready as eNB and MME know parameters of each other.
* Mark the association as UP to enable UE contexts creation.
*/
mme_desc_p->state = S1AP_ENB_STATE_CONNECTED;
mme_desc_p->s1ap_eNB_instance->s1ap_mme_associated_nb ++;
s1ap_handle_s1_setup_message(mme_desc_p, 0);
#if 0
/* We call back our self
* -> generate a dummy initial UE message
*/
{
s1ap_nas_first_req_t s1ap_nas_first_req;
memset(&s1ap_nas_first_req, 0, sizeof(s1ap_nas_first_req_t));
s1ap_nas_first_req.rnti = 0xC03A;
s1ap_nas_first_req.establishment_cause = RRC_CAUSE_MO_DATA;
s1ap_nas_first_req.ue_identity.presenceMask = UE_IDENTITIES_gummei;
s1ap_nas_first_req.ue_identity.gummei.mcc = 208;
s1ap_nas_first_req.ue_identity.gummei.mnc = 34;
s1ap_nas_first_req.ue_identity.gummei.mme_code = 0;
s1ap_nas_first_req.ue_identity.gummei.mme_group_id = 0;
/* NAS Attach request with IMSI */
static uint8_t nas_attach_req_imsi[] = {
0x07, 0x41,
/* EPS Mobile identity = IMSI */
0x71, 0x08, 0x29, 0x80, 0x43, 0x21, 0x43, 0x65, 0x87,
0xF9,
/* End of EPS Mobile Identity */
0x02, 0xE0, 0xE0, 0x00, 0x20, 0x02, 0x03,
0xD0, 0x11, 0x27, 0x1A, 0x80, 0x80, 0x21, 0x10, 0x01, 0x00, 0x00,
0x10, 0x81, 0x06, 0x00, 0x00, 0x00, 0x00, 0x83, 0x06, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x0A, 0x00, 0x52, 0x12, 0xF2,
0x01, 0x27, 0x11,
};
/* NAS Attach request with GUTI */
static uint8_t nas_attach_req_guti[] = {
0x07, 0x41,
/* EPS Mobile identity = IMSI */
0x71, 0x0B, 0xF6, 0x12, 0xF2, 0x01, 0x80, 0x00, 0x01, 0xE0, 0x00,
0xDA, 0x1F,
/* End of EPS Mobile Identity */
0x02, 0xE0, 0xE0, 0x00, 0x20, 0x02, 0x03,
0xD0, 0x11, 0x27, 0x1A, 0x80, 0x80, 0x21, 0x10, 0x01, 0x00, 0x00,
0x10, 0x81, 0x06, 0x00, 0x00, 0x00, 0x00, 0x83, 0x06, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x0A, 0x00, 0x52, 0x12, 0xF2,
0x01, 0x27, 0x11,
};
s1ap_nas_first_req.nas_pdu.buffer = nas_attach_req_guti;
s1ap_nas_first_req.nas_pdu.length = sizeof(nas_attach_req_guti);
s1ap_eNB_handle_nas_first_req(mme_desc_p->s1ap_eNB_instance->instance,
&s1ap_nas_first_req);
}
#endif
return 0;
}
static
int s1ap_eNB_handle_error_indication(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *message_p)
{
S1ap_ErrorIndicationIEs_t *s1_error_indication_p;
s1ap_eNB_mme_data_t *mme_desc_p;
DevAssert(message_p != NULL);
s1_error_indication_p = &message_p->msg.s1ap_ErrorIndicationIEs;
/* S1 Setup Failure == Non UE-related procedure -> stream 0 */
if (stream != 0) {
S1AP_WARN("[SCTP %d] Received s1 Error indication on stream != 0 (%d)\n",
assoc_id, stream);
}
if ((mme_desc_p = s1ap_eNB_get_MME(NULL, assoc_id, 0)) == NULL) {
S1AP_ERROR("[SCTP %d] Received S1 Error indication for non existing "
"MME context\n", assoc_id);
return -1;
}
if ( s1_error_indication_p->presenceMask & S1AP_ERRORINDICATIONIES_MME_UE_S1AP_ID_PRESENT) {
S1AP_WARN("Received S1 Error indication MME UE S1AP ID 0x%x\n", s1_error_indication_p->mme_ue_s1ap_id);
}
if ( s1_error_indication_p->presenceMask & S1AP_ERRORINDICATIONIES_ENB_UE_S1AP_ID_PRESENT) {
S1AP_WARN("Received S1 Error indication eNB UE S1AP ID 0x%x\n", s1_error_indication_p->eNB_UE_S1AP_ID);
}
if ( s1_error_indication_p->presenceMask & S1AP_ERRORINDICATIONIES_CAUSE_PRESENT) {
switch(s1_error_indication_p->cause.present) {
case S1ap_Cause_PR_NOTHING:
S1AP_WARN("Received S1 Error indication cause NOTHING\n");
break;
case S1ap_Cause_PR_radioNetwork:
switch (s1_error_indication_p->cause.choice.radioNetwork) {
case S1ap_CauseRadioNetwork_unspecified:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_unspecified\n");
break;
case S1ap_CauseRadioNetwork_tx2relocoverall_expiry:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_tx2relocoverall_expiry\n");
break;
case S1ap_CauseRadioNetwork_successful_handover:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_successful_handover\n");
break;
case S1ap_CauseRadioNetwork_release_due_to_eutran_generated_reason:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_release_due_to_eutran_generated_reason\n");
break;
case S1ap_CauseRadioNetwork_handover_cancelled:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_handover_cancelled\n");
break;
case S1ap_CauseRadioNetwork_partial_handover:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_partial_handover\n");
break;
case S1ap_CauseRadioNetwork_ho_failure_in_target_EPC_eNB_or_target_system:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_ho_failure_in_target_EPC_eNB_or_target_system\n");
break;
case S1ap_CauseRadioNetwork_ho_target_not_allowed:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_ho_target_not_allowed\n");
break;
case S1ap_CauseRadioNetwork_tS1relocoverall_expiry:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_tS1relocoverall_expiry\n");
break;
case S1ap_CauseRadioNetwork_tS1relocprep_expiry:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_tS1relocprep_expiry\n");
break;
case S1ap_CauseRadioNetwork_cell_not_available:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_cell_not_available\n");
break;
case S1ap_CauseRadioNetwork_unknown_targetID:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_unknown_targetID\n");
break;
case S1ap_CauseRadioNetwork_no_radio_resources_available_in_target_cell:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_no_radio_resources_available_in_target_cell\n");
break;
case S1ap_CauseRadioNetwork_unknown_mme_ue_s1ap_id:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_unknown_mme_ue_s1ap_id\n");
break;
case S1ap_CauseRadioNetwork_unknown_enb_ue_s1ap_id:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_unknown_enb_ue_s1ap_id\n");
break;
case S1ap_CauseRadioNetwork_unknown_pair_ue_s1ap_id:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_unknown_pair_ue_s1ap_id\n");
break;
case S1ap_CauseRadioNetwork_handover_desirable_for_radio_reason:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_handover_desirable_for_radio_reason\n");
break;
case S1ap_CauseRadioNetwork_time_critical_handover:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_time_critical_handover\n");
break;
case S1ap_CauseRadioNetwork_resource_optimisation_handover:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_resource_optimisation_handover\n");
break;
case S1ap_CauseRadioNetwork_reduce_load_in_serving_cell:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_reduce_load_in_serving_cell\n");
break;
case S1ap_CauseRadioNetwork_user_inactivity:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_user_inactivity\n");
break;
case S1ap_CauseRadioNetwork_radio_connection_with_ue_lost:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_radio_connection_with_ue_lost\n");
break;
case S1ap_CauseRadioNetwork_load_balancing_tau_required:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_load_balancing_tau_required\n");
break;
case S1ap_CauseRadioNetwork_cs_fallback_triggered:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_cs_fallback_triggered\n");
break;
case S1ap_CauseRadioNetwork_ue_not_available_for_ps_service:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_ue_not_available_for_ps_service\n");
break;
case S1ap_CauseRadioNetwork_radio_resources_not_available:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_radio_resources_not_available\n");
break;
case S1ap_CauseRadioNetwork_failure_in_radio_interface_procedure:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_failure_in_radio_interface_procedure\n");
break;
case S1ap_CauseRadioNetwork_invals1ap_id_qos_combination:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_invals1ap_id_qos_combination\n");
break;
case S1ap_CauseRadioNetwork_interrat_redirection:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_interrat_redirection\n");
break;
case S1ap_CauseRadioNetwork_interaction_with_other_procedure:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_interaction_with_other_procedure\n");
break;
case S1ap_CauseRadioNetwork_unknown_E_RAB_ID:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_unknown_E_RAB_ID\n");
break;
case S1ap_CauseRadioNetwork_multiple_E_RAB_ID_instances:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_multiple_E_RAB_ID_instances\n");
break;
case S1ap_CauseRadioNetwork_encryption_and_or_integrity_protection_algorithms_not_supported:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_encryption_and_or_integrity_protection_algorithms_not_supported\n");
break;
case S1ap_CauseRadioNetwork_s1_intra_system_handover_triggered:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_s1_intra_system_handover_triggered\n");
break;
case S1ap_CauseRadioNetwork_s1_inter_system_handover_triggered:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_s1_inter_system_handover_triggered\n");
break;
case S1ap_CauseRadioNetwork_x2_handover_triggered:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_x2_handover_triggered\n");
break;
case S1ap_CauseRadioNetwork_redirection_towards_1xRTT:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_redirection_towards_1xRTT\n");
break;
case S1ap_CauseRadioNetwork_not_supported_QCI_value:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_not_supported_QCI_value\n");
break;
case S1ap_CauseRadioNetwork_invals1ap_id_CSG_Id:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_invals1ap_id_CSG_Id\n");
break;
default:
S1AP_WARN("Received S1 Error indication cause radio network case not handled\n");
}
break;
case S1ap_Cause_PR_transport:
switch (s1_error_indication_p->cause.choice.transport) {
case S1ap_CauseTransport_transport_resource_unavailable:
S1AP_WARN("Received S1 Error indication S1ap_CauseTransport_transport_resource_unavailable\n");
break;
case S1ap_CauseTransport_unspecified:
S1AP_WARN("Received S1 Error indication S1ap_CauseTransport_unspecified\n");
break;
default:
S1AP_WARN("Received S1 Error indication cause transport case not handled\n");
}
break;
case S1ap_Cause_PR_nas:
switch (s1_error_indication_p->cause.choice.nas) {
case S1ap_CauseNas_normal_release:
S1AP_WARN("Received S1 Error indication S1ap_CauseNas_normal_release\n");
break;
case S1ap_CauseNas_authentication_failure:
S1AP_WARN("Received S1 Error indication S1ap_CauseNas_authentication_failure\n");
break;
case S1ap_CauseNas_detach:
S1AP_WARN("Received S1 Error indication S1ap_CauseNas_detach\n");
break;
case S1ap_CauseNas_unspecified:
S1AP_WARN("Received S1 Error indication S1ap_CauseNas_unspecified\n");
break;
case S1ap_CauseNas_csg_subscription_expiry:
S1AP_WARN("Received S1 Error indication S1ap_CauseNas_csg_subscription_expiry\n");
break;
default:
S1AP_WARN("Received S1 Error indication cause nas case not handled\n");
}
break;
case S1ap_Cause_PR_protocol:
switch (s1_error_indication_p->cause.choice.protocol) {
case S1ap_CauseProtocol_transfer_syntax_error:
S1AP_WARN("Received S1 Error indication S1ap_CauseProtocol_transfer_syntax_error\n");
break;
case S1ap_CauseProtocol_abstract_syntax_error_reject:
S1AP_WARN("Received S1 Error indication S1ap_CauseProtocol_abstract_syntax_error_reject\n");
break;
case S1ap_CauseProtocol_abstract_syntax_error_ignore_and_notify:
S1AP_WARN("Received S1 Error indication S1ap_CauseProtocol_abstract_syntax_error_ignore_and_notify\n");
break;
case S1ap_CauseProtocol_message_not_compatible_with_receiver_state:
S1AP_WARN("Received S1 Error indication S1ap_CauseProtocol_message_not_compatible_with_receiver_state\n");
break;
case S1ap_CauseProtocol_semantic_error:
S1AP_WARN("Received S1 Error indication S1ap_CauseProtocol_semantic_error\n");
break;
case S1ap_CauseProtocol_abstract_syntax_error_falsely_constructed_message:
S1AP_WARN("Received S1 Error indication S1ap_CauseProtocol_abstract_syntax_error_falsely_constructed_message\n");
break;
case S1ap_CauseProtocol_unspecified:
S1AP_WARN("Received S1 Error indication S1ap_CauseProtocol_unspecified\n");
break;
default:
S1AP_WARN("Received S1 Error indication cause protocol case not handled\n");
}
break;
case S1ap_Cause_PR_misc:
switch (s1_error_indication_p->cause.choice.protocol) {
case S1ap_CauseMisc_control_processing_overload:
S1AP_WARN("Received S1 Error indication S1ap_CauseMisc_control_processing_overload\n");
break;
case S1ap_CauseMisc_not_enough_user_plane_processing_resources:
S1AP_WARN("Received S1 Error indication S1ap_CauseMisc_not_enough_user_plane_processing_resources\n");
break;
case S1ap_CauseMisc_hardware_failure:
S1AP_WARN("Received S1 Error indication S1ap_CauseMisc_hardware_failure\n");
break;
case S1ap_CauseMisc_om_intervention:
S1AP_WARN("Received S1 Error indication S1ap_CauseMisc_om_intervention\n");
break;
case S1ap_CauseMisc_unspecified:
S1AP_WARN("Received S1 Error indication S1ap_CauseMisc_unspecified\n");
break;
case S1ap_CauseMisc_unknown_PLMN:
S1AP_WARN("Received S1 Error indication S1ap_CauseMisc_unknown_PLMN\n");
break;
default:
S1AP_WARN("Received S1 Error indication cause misc case not handled\n");
}
break;
}
}
if ( s1_error_indication_p->presenceMask & S1AP_ERRORINDICATIONIES_CRITICALITYDIAGNOSTICS_PRESENT) {
// TODO continue
}
// TODO continue
return 0;
}
static
int s1ap_eNB_handle_initial_context_request(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *s1ap_message_p)
{
int i;
s1ap_eNB_mme_data_t *mme_desc_p = NULL;
s1ap_eNB_ue_context_t *ue_desc_p = NULL;
MessageDef *message_p = NULL;
S1ap_InitialContextSetupRequestIEs_t *initialContextSetupRequest_p;
DevAssert(s1ap_message_p != NULL);
initialContextSetupRequest_p = &s1ap_message_p->msg.s1ap_InitialContextSetupRequestIEs;
if ((mme_desc_p = s1ap_eNB_get_MME(NULL, assoc_id, 0)) == NULL) {
S1AP_ERROR("[SCTP %d] Received initial context setup request for non "
"existing MME context\n", assoc_id);
return -1;
}
if ((ue_desc_p = s1ap_eNB_get_ue_context(mme_desc_p->s1ap_eNB_instance,
initialContextSetupRequest_p->eNB_UE_S1AP_ID)) == NULL) {
S1AP_ERROR("[SCTP %d] Received initial context setup request for non "
"existing UE context 0x%06x\n", assoc_id,
initialContextSetupRequest_p->eNB_UE_S1AP_ID);
return -1;
}
/* Initial context request = UE-related procedure -> stream != 0 */
if (stream == 0) {
S1AP_ERROR("[SCTP %d] Received UE-related procedure on stream (%d)\n",
assoc_id, stream);
return -1;
}
ue_desc_p->rx_stream = stream;
ue_desc_p->mme_ue_s1ap_id = initialContextSetupRequest_p->mme_ue_s1ap_id;
message_p = itti_alloc_new_message(TASK_S1AP, S1AP_INITIAL_CONTEXT_SETUP_REQ);
S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).ue_initial_id = ue_desc_p->ue_initial_id;
ue_desc_p->ue_initial_id = 0;
S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).eNB_ue_s1ap_id = ue_desc_p->eNB_ue_s1ap_id;
S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).nb_of_e_rabs =
initialContextSetupRequest_p->e_RABToBeSetupListCtxtSUReq.s1ap_E_RABToBeSetupItemCtxtSUReq.count;
S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).ue_ambr.br_ul = 64;// TO DO(bitrate_t)(initialContextSetupRequest_p->uEaggregateMaximumBitrate.uEaggregateMaximumBitRateUL);
S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).ue_ambr.br_dl = 1024;//(bitrate_t)(initialContextSetupRequest_p->uEaggregateMaximumBitrate.uEaggregateMaximumBitRateDL);
S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).security_capabilities.encryption_algorithms =
BIT_STRING_to_uint16(&initialContextSetupRequest_p->ueSecurityCapabilities.encryptionAlgorithms);
S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).security_capabilities.integrity_algorithms =
BIT_STRING_to_uint16(&initialContextSetupRequest_p->ueSecurityCapabilities.integrityProtectionAlgorithms);
/* Copy the security key */
memcpy(&S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).security_key,
initialContextSetupRequest_p->securityKey.buf, initialContextSetupRequest_p->securityKey.size);
for (i = 0; i < initialContextSetupRequest_p->e_RABToBeSetupListCtxtSUReq.s1ap_E_RABToBeSetupItemCtxtSUReq.count; i++) {
S1ap_E_RABToBeSetupItemCtxtSUReq_t *item_p;
item_p = (S1ap_E_RABToBeSetupItemCtxtSUReq_t *)initialContextSetupRequest_p->e_RABToBeSetupListCtxtSUReq.s1ap_E_RABToBeSetupItemCtxtSUReq.array[i];
S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).e_rab_param[i].e_rab_id = item_p->e_RAB_ID;
if (item_p->nAS_PDU != NULL) {
/* Only copy NAS pdu if present */
S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).e_rab_param[i].nas_pdu.length = item_p->nAS_PDU->size;
S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).e_rab_param[i].nas_pdu.buffer =
malloc(sizeof(uint8_t) * item_p->nAS_PDU->size);
memcpy(S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).e_rab_param[i].nas_pdu.buffer,
item_p->nAS_PDU->buf, item_p->nAS_PDU->size);
} else {
S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).e_rab_param[i].nas_pdu.length = 0;
S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).e_rab_param[i].nas_pdu.buffer = NULL;
}
/* Set the transport layer address */
memcpy(S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).e_rab_param[i].sgw_addr.buffer,
item_p->transportLayerAddress.buf, item_p->transportLayerAddress.size);
S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).e_rab_param[i].sgw_addr.length =
item_p->transportLayerAddress.size * 8 - item_p->transportLayerAddress.bits_unused;
/* GTP tunnel endpoint ID */
OCTET_STRING_TO_INT32(&item_p->gTP_TEID, S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).e_rab_param[i].gtp_teid);
/* Set the QOS informations */
S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).e_rab_param[i].qos.qci = item_p->e_RABlevelQoSParameters.qCI;
S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).e_rab_param[i].qos.allocation_retention_priority.priority_level =
item_p->e_RABlevelQoSParameters.allocationRetentionPriority.priorityLevel;
S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).e_rab_param[i].qos.allocation_retention_priority.pre_emp_capability =
item_p->e_RABlevelQoSParameters.allocationRetentionPriority.pre_emptionCapability;
S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).e_rab_param[i].qos.allocation_retention_priority.pre_emp_vulnerability =
item_p->e_RABlevelQoSParameters.allocationRetentionPriority.pre_emptionVulnerability;
}
itti_send_msg_to_task(TASK_RRC_ENB, ue_desc_p->eNB_instance->instance, message_p);
return 0;
}
static
int s1ap_eNB_handle_ue_context_release_command(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *s1ap_message_p)
{
s1ap_eNB_mme_data_t *mme_desc_p = NULL;
s1ap_eNB_ue_context_t *ue_desc_p = NULL;
MessageDef *message_p = NULL;
S1ap_UEContextReleaseCommandIEs_t *ueContextReleaseCommand_p;
DevAssert(s1ap_message_p != NULL);
ueContextReleaseCommand_p = &s1ap_message_p->msg.s1ap_UEContextReleaseCommandIEs;
if ((mme_desc_p = s1ap_eNB_get_MME(NULL, assoc_id, 0)) == NULL) {
S1AP_ERROR("[SCTP %d] Received UE context release command for non "
"existing MME context\n", assoc_id);
return -1;
}
S1ap_MME_UE_S1AP_ID_t mme_ue_s1ap_id;
S1ap_ENB_UE_S1AP_ID_t enb_ue_s1ap_id;
switch (ueContextReleaseCommand_p->uE_S1AP_IDs.present) {
case S1ap_UE_S1AP_IDs_PR_uE_S1AP_ID_pair:
enb_ue_s1ap_id = ueContextReleaseCommand_p->uE_S1AP_IDs.choice.uE_S1AP_ID_pair.eNB_UE_S1AP_ID;
mme_ue_s1ap_id = ueContextReleaseCommand_p->uE_S1AP_IDs.choice.uE_S1AP_ID_pair.mME_UE_S1AP_ID;
MSC_LOG_RX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
NULL,0,
"0 UEContextRelease/%s eNB_ue_s1ap_id "S1AP_UE_ID_FMT" mme_ue_s1ap_id "S1AP_UE_ID_FMT" len %u",
s1ap_direction2String[s1ap_message_p->direction],
enb_ue_s1ap_id,
mme_ue_s1ap_id);
if ((ue_desc_p = s1ap_eNB_get_ue_context(mme_desc_p->s1ap_eNB_instance,
enb_ue_s1ap_id)) == NULL) {
S1AP_ERROR("[SCTP %d] Received UE context release command for non "
"existing UE context 0x%06x\n",
assoc_id,
enb_ue_s1ap_id);
/*MessageDef *msg_complete_p;
msg_complete_p = itti_alloc_new_message(TASK_RRC_ENB, S1AP_UE_CONTEXT_RELEASE_COMPLETE);
S1AP_UE_CONTEXT_RELEASE_COMPLETE(msg_complete_p).eNB_ue_s1ap_id = enb_ue_s1ap_id;
itti_send_msg_to_task(TASK_S1AP, ue_desc_p->eNB_instance->instance <=> 0, msg_complete_p);
*/
return -1;
} else {
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_RRC_ENB,
NULL,0,
"0 S1AP_UE_CONTEXT_RELEASE_COMMAND/%d eNB_ue_s1ap_id "S1AP_UE_ID_FMT" ",
enb_ue_s1ap_id);
message_p = itti_alloc_new_message(TASK_S1AP, S1AP_UE_CONTEXT_RELEASE_COMMAND);
S1AP_UE_CONTEXT_RELEASE_COMMAND(message_p).eNB_ue_s1ap_id = enb_ue_s1ap_id;
itti_send_msg_to_task(TASK_RRC_ENB, ue_desc_p->eNB_instance->instance, message_p);
return 0;
}
break;
#warning "TODO mapping mme_ue_s1ap_id enb_ue_s1ap_id?"
case S1ap_UE_S1AP_IDs_PR_mME_UE_S1AP_ID:
mme_ue_s1ap_id = ueContextReleaseCommand_p->uE_S1AP_IDs.choice.mME_UE_S1AP_ID;
S1AP_ERROR("TO DO mapping mme_ue_s1ap_id enb_ue_s1ap_id");
case S1ap_UE_S1AP_IDs_PR_NOTHING:
default:
S1AP_ERROR("S1AP_UE_CONTEXT_RELEASE_COMMAND not processed, missing info elements");
return -1;
}
}
+38
View File
@@ -0,0 +1,38 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
#ifndef S1AP_ENB_HANDLERS_H_
#define S1AP_ENB_HANDLERS_H_
void s1ap_handle_s1_setup_message(s1ap_eNB_mme_data_t *mme_desc_p, int sctp_shutdown);
int s1ap_eNB_handle_message(uint32_t assoc_id, int32_t stream,
const uint8_t * const data, const uint32_t data_length);
#endif /* S1AP_ENB_HANDLERS_H_ */
+83
View File
@@ -0,0 +1,83 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
#include "intertask_interface.h"
#include "s1ap_eNB_itti_messaging.h"
void s1ap_eNB_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint8_t *buffer,
uint32_t buffer_length, uint16_t stream)
{
MessageDef *message_p;
sctp_data_req_t *sctp_data_req;
message_p = itti_alloc_new_message(TASK_S1AP, SCTP_DATA_REQ);
sctp_data_req = &message_p->ittiMsg.sctp_data_req;
sctp_data_req->assoc_id = assoc_id;
sctp_data_req->buffer = buffer;
sctp_data_req->buffer_length = buffer_length;
sctp_data_req->stream = stream;
itti_send_msg_to_task(TASK_SCTP, instance, message_p);
}
void s1ap_eNB_itti_send_nas_downlink_ind(instance_t instance,
uint16_t ue_initial_id,
uint32_t eNB_ue_s1ap_id,
uint8_t *nas_pdu,
uint32_t nas_pdu_length)
{
MessageDef *message_p;
s1ap_downlink_nas_t *s1ap_downlink_nas;
message_p = itti_alloc_new_message(TASK_S1AP, S1AP_DOWNLINK_NAS);
s1ap_downlink_nas = &message_p->ittiMsg.s1ap_downlink_nas;
s1ap_downlink_nas->ue_initial_id = ue_initial_id;
s1ap_downlink_nas->eNB_ue_s1ap_id = eNB_ue_s1ap_id;
s1ap_downlink_nas->nas_pdu.buffer = nas_pdu;
s1ap_downlink_nas->nas_pdu.length = nas_pdu_length;
itti_send_msg_to_task(TASK_RRC_ENB, instance, message_p);
}
void s1ap_eNB_itti_send_sctp_close_association(instance_t instance, int32_t assoc_id)
{
MessageDef *message_p = NULL;
sctp_close_association_t *sctp_close_association_p = NULL;
message_p = itti_alloc_new_message(TASK_S1AP, SCTP_CLOSE_ASSOCIATION);
sctp_close_association_p = &message_p->ittiMsg.sctp_close_association;
sctp_close_association_p->assoc_id = assoc_id;
itti_send_msg_to_task(TASK_SCTP, instance, message_p);
}
+45
View File
@@ -0,0 +1,45 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
#ifndef S1AP_ENB_ITTI_MESSAGING_H_
#define S1AP_ENB_ITTI_MESSAGING_H_
void s1ap_eNB_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint8_t *buffer,
uint32_t buffer_length, uint16_t stream);
void s1ap_eNB_itti_send_nas_downlink_ind(instance_t instance,
uint16_t ue_initial_id,
uint32_t eNB_ue_s1ap_id,
uint8_t *nas_pdu,
uint32_t nas_pdu_length);
void s1ap_eNB_itti_send_sctp_close_association(instance_t instance,
int32_t assoc_id);
#endif /* S1AP_ENB_ITTI_MESSAGING_H_ */
@@ -0,0 +1,132 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "intertask_interface.h"
#include "assertions.h"
#include "conversions.h"
#include "s1ap_common.h"
#include "s1ap_eNB_defs.h"
#include "s1ap_eNB.h"
s1ap_eNB_internal_data_t s1ap_eNB_internal_data;
RB_GENERATE(s1ap_mme_map, s1ap_eNB_mme_data_s, entry, s1ap_eNB_compare_assoc_id);
int s1ap_eNB_compare_assoc_id(
struct s1ap_eNB_mme_data_s *p1, struct s1ap_eNB_mme_data_s *p2)
{
if (p1->assoc_id == -1) {
if (p1->cnx_id < p2->cnx_id) {
return -1;
}
if (p1->cnx_id > p2->cnx_id) {
return 1;
}
} else {
if (p1->assoc_id < p2->assoc_id) {
return -1;
}
if (p1->assoc_id > p2->assoc_id) {
return 1;
}
}
/* Matching reference */
return 0;
}
uint16_t s1ap_eNB_fetch_add_global_cnx_id(void)
{
return ++s1ap_eNB_internal_data.global_cnx_id;
}
void s1ap_eNB_prepare_internal_data(void)
{
memset(&s1ap_eNB_internal_data, 0, sizeof(s1ap_eNB_internal_data));
STAILQ_INIT(&s1ap_eNB_internal_data.s1ap_eNB_instances_head);
}
void s1ap_eNB_insert_new_instance(s1ap_eNB_instance_t *new_instance_p)
{
DevAssert(new_instance_p != NULL);
STAILQ_INSERT_TAIL(&s1ap_eNB_internal_data.s1ap_eNB_instances_head,
new_instance_p, s1ap_eNB_entries);
}
struct s1ap_eNB_mme_data_s *s1ap_eNB_get_MME(
s1ap_eNB_instance_t *instance_p,
int32_t assoc_id, uint16_t cnx_id)
{
struct s1ap_eNB_mme_data_s temp;
struct s1ap_eNB_mme_data_s *found;
memset(&temp, 0, sizeof(struct s1ap_eNB_mme_data_s));
temp.assoc_id = assoc_id;
temp.cnx_id = cnx_id;
if (instance_p == NULL) {
STAILQ_FOREACH(instance_p, &s1ap_eNB_internal_data.s1ap_eNB_instances_head,
s1ap_eNB_entries) {
found = RB_FIND(s1ap_mme_map, &instance_p->s1ap_mme_head, &temp);
if (found != NULL) {
return found;
}
}
} else {
return RB_FIND(s1ap_mme_map, &instance_p->s1ap_mme_head, &temp);
}
return NULL;
}
s1ap_eNB_instance_t *s1ap_eNB_get_instance(instance_t instance)
{
s1ap_eNB_instance_t *temp = NULL;
STAILQ_FOREACH(temp, &s1ap_eNB_internal_data.s1ap_eNB_instances_head,
s1ap_eNB_entries) {
if (temp->instance == instance) {
/* Matching occurence */
return temp;
}
}
return NULL;
}
@@ -0,0 +1,45 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
#ifndef S1AP_ENB_MANAGEMENT_PROCEDURES_H_
#define S1AP_ENB_MANAGEMENT_PROCEDURES_H_
struct s1ap_eNB_mme_data_s *s1ap_eNB_get_MME(
s1ap_eNB_instance_t *instance_p,
int32_t assoc_id, uint16_t cnx_id);
void s1ap_eNB_insert_new_instance(s1ap_eNB_instance_t *new_instance_p);
s1ap_eNB_instance_t *s1ap_eNB_get_instance(uint8_t mod_id);
uint16_t s1ap_eNB_fetch_add_global_cnx_id(void);
void s1ap_eNB_prepare_internal_data(void);
#endif /* S1AP_ENB_MANAGEMENT_PROCEDURES_H_ */
+688
View File
@@ -0,0 +1,688 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "assertions.h"
#include "conversions.h"
#include "intertask_interface.h"
#include "s1ap_common.h"
#include "s1ap_eNB_defs.h"
#include "s1ap_eNB_itti_messaging.h"
#include "s1ap_ies_defs.h"
#include "s1ap_eNB_encoder.h"
#include "s1ap_eNB_nnsf.h"
#include "s1ap_eNB_ue_context.h"
#include "s1ap_eNB_nas_procedures.h"
#include "s1ap_eNB_management_procedures.h"
#include "msc.h"
//------------------------------------------------------------------------------
int s1ap_eNB_handle_nas_first_req(
instance_t instance, s1ap_nas_first_req_t *s1ap_nas_first_req_p)
//------------------------------------------------------------------------------
{
s1ap_eNB_instance_t *instance_p = NULL;
struct s1ap_eNB_mme_data_s *mme_desc_p = NULL;
struct s1ap_eNB_ue_context_s *ue_desc_p = NULL;
s1ap_message message;
S1ap_InitialUEMessageIEs_t *initial_ue_message_p = NULL;
uint8_t *buffer = NULL;
uint32_t length = 0;
DevAssert(s1ap_nas_first_req_p != NULL);
/* Retrieve the S1AP eNB instance associated with Mod_id */
instance_p = s1ap_eNB_get_instance(instance);
DevAssert(instance_p != NULL);
memset(&message, 0, sizeof(s1ap_message));
message.direction = S1AP_PDU_PR_initiatingMessage;
message.procedureCode = S1ap_ProcedureCode_id_initialUEMessage;
initial_ue_message_p = &message.msg.s1ap_InitialUEMessageIEs;
/* Select the MME corresponding to the provided GUMMEI. */
if (s1ap_nas_first_req_p->ue_identity.presenceMask & UE_IDENTITIES_gummei) {
mme_desc_p = s1ap_eNB_nnsf_select_mme_by_gummei(
instance_p,
s1ap_nas_first_req_p->establishment_cause,
s1ap_nas_first_req_p->ue_identity.gummei);
}
if (mme_desc_p == NULL) {
/* Select the MME corresponding to the provided s-TMSI. */
if (s1ap_nas_first_req_p->ue_identity.presenceMask & UE_IDENTITIES_s_tmsi) {
mme_desc_p = s1ap_eNB_nnsf_select_mme_by_mme_code(
instance_p,
s1ap_nas_first_req_p->establishment_cause,
s1ap_nas_first_req_p->ue_identity.s_tmsi.mme_code);
}
}
if (mme_desc_p == NULL) {
/*
* If no MME corresponds to the GUMMEI or the s-TMSI, selects the MME with the
* highest capacity.
*/
mme_desc_p = s1ap_eNB_nnsf_select_mme(
instance_p,
s1ap_nas_first_req_p->establishment_cause);
}
if (mme_desc_p == NULL) {
/*
* In case eNB has no MME associated, the eNB should inform RRC and discard
* this request.
*/
S1AP_WARN("No MME is associated to the eNB\n");
// TODO: Inform RRC
return -1;
}
/* The eNB should allocate a unique eNB UE S1AP ID for this UE. The value
* will be used for the duration of the connectivity.
*/
ue_desc_p = s1ap_eNB_allocate_new_UE_context();
DevAssert(ue_desc_p != NULL);
/* Keep a reference to the selected MME */
ue_desc_p->mme_ref = mme_desc_p;
ue_desc_p->ue_initial_id = s1ap_nas_first_req_p->ue_initial_id;
ue_desc_p->eNB_instance = instance_p;
do {
struct s1ap_eNB_ue_context_s *collision_p;
/* Peek a random value for the eNB_ue_s1ap_id */
ue_desc_p->eNB_ue_s1ap_id = (random() + random()) & 0x00ffffff;
if ((collision_p = RB_INSERT(s1ap_ue_map, &instance_p->s1ap_ue_head, ue_desc_p))
== NULL) {
S1AP_DEBUG("Found usable eNB_ue_s1ap_id: 0x%06x %d(10)\n",
ue_desc_p->eNB_ue_s1ap_id,
ue_desc_p->eNB_ue_s1ap_id);
/* Break the loop as the id is not already used by another UE */
break;
}
} while(1);
initial_ue_message_p->eNB_UE_S1AP_ID = ue_desc_p->eNB_ue_s1ap_id;
/* Prepare the NAS PDU */
initial_ue_message_p->nas_pdu.buf = s1ap_nas_first_req_p->nas_pdu.buffer;
initial_ue_message_p->nas_pdu.size = s1ap_nas_first_req_p->nas_pdu.length;
/* Set the establishment cause according to those provided by RRC */
DevCheck(s1ap_nas_first_req_p->establishment_cause < RRC_CAUSE_LAST,
s1ap_nas_first_req_p->establishment_cause, RRC_CAUSE_LAST, 0);
initial_ue_message_p->rrC_Establishment_Cause = s1ap_nas_first_req_p->establishment_cause;
if (s1ap_nas_first_req_p->ue_identity.presenceMask & UE_IDENTITIES_s_tmsi) {
S1AP_DEBUG("S_TMSI_PRESENT\n");
initial_ue_message_p->presenceMask |= S1AP_INITIALUEMESSAGEIES_S_TMSI_PRESENT;
MME_CODE_TO_OCTET_STRING(s1ap_nas_first_req_p->ue_identity.s_tmsi.mme_code,
&initial_ue_message_p->s_tmsi.mMEC);
M_TMSI_TO_OCTET_STRING(s1ap_nas_first_req_p->ue_identity.s_tmsi.m_tmsi,
&initial_ue_message_p->s_tmsi.m_TMSI);
}
if (s1ap_nas_first_req_p->ue_identity.presenceMask & UE_IDENTITIES_gummei) {
S1AP_DEBUG("GUMMEI_ID_PRESENT\n");
initial_ue_message_p->presenceMask |= S1AP_INITIALUEMESSAGEIES_GUMMEI_ID_PRESENT;
MCC_MNC_TO_PLMNID(
s1ap_nas_first_req_p->ue_identity.gummei.mcc,
s1ap_nas_first_req_p->ue_identity.gummei.mnc,
s1ap_nas_first_req_p->ue_identity.gummei.mnc_len,
&initial_ue_message_p->gummei_id.pLMN_Identity);
MME_GID_TO_OCTET_STRING(s1ap_nas_first_req_p->ue_identity.gummei.mme_group_id,
&initial_ue_message_p->gummei_id.mME_Group_ID);
MME_CODE_TO_OCTET_STRING(s1ap_nas_first_req_p->ue_identity.gummei.mme_code,
&initial_ue_message_p->gummei_id.mME_Code);
}
/* Assuming TAI is the TAI from the cell */
INT16_TO_OCTET_STRING(instance_p->tac, &initial_ue_message_p->tai.tAC);
MCC_MNC_TO_PLMNID(instance_p->mcc,
instance_p->mnc,
instance_p->mnc_digit_length,
&initial_ue_message_p->tai.pLMNidentity);
/* Set the EUTRAN CGI
* The cell identity is defined on 28 bits but as we use macro enb id,
* we have to pad.
*/
#warning "TODO get cell id from RRC"
MACRO_ENB_ID_TO_CELL_IDENTITY(instance_p->eNB_id,
0, // Cell ID
&initial_ue_message_p->eutran_cgi.cell_ID);
MCC_MNC_TO_TBCD(instance_p->mcc,
instance_p->mnc,
instance_p->mnc_digit_length,
&initial_ue_message_p->eutran_cgi.pLMNidentity);
if (s1ap_eNB_encode_pdu(&message, &buffer, &length) < 0) {
/* Failed to encode message */
DevMessage("Failed to encode initial UE message\n");
}
/* Update the current S1AP UE state */
ue_desc_p->ue_state = S1AP_UE_WAITING_CSR;
/* Assign a stream for this UE :
* From 3GPP 36.412 7)Transport layers:
* Within the SCTP association established between one MME and eNB pair:
* - a single pair of stream identifiers shall be reserved for the sole use
* of S1AP elementary procedures that utilize non UE-associated signalling.
* - At least one pair of stream identifiers shall be reserved for the sole use
* of S1AP elementary procedures that utilize UE-associated signallings.
* However a few pairs (i.e. more than one) should be reserved.
* - A single UE-associated signalling shall use one SCTP stream and
* the stream should not be changed during the communication of the
* UE-associated signalling.
*/
mme_desc_p->nextstream = (mme_desc_p->nextstream + 1) % mme_desc_p->out_streams;
if ((mme_desc_p->nextstream == 0) && (mme_desc_p->out_streams > 1)) {
mme_desc_p->nextstream += 1;
}
ue_desc_p->tx_stream = mme_desc_p->nextstream;
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
(const char *)NULL,
0,
MSC_AS_TIME_FMT" initialUEMessage initiatingMessage eNB_ue_s1ap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
initial_ue_message_p->eNB_UE_S1AP_ID);
/* Send encoded message over sctp */
s1ap_eNB_itti_send_sctp_data_req(instance_p->instance, mme_desc_p->assoc_id,
buffer, length, ue_desc_p->tx_stream);
return 0;
}
//------------------------------------------------------------------------------
int s1ap_eNB_handle_nas_downlink(const uint32_t assoc_id,
const uint32_t stream,
struct s1ap_message_s* message_p)
//------------------------------------------------------------------------------
{
const S1ap_DownlinkNASTransportIEs_t *downlink_NAS_transport_p = NULL;
s1ap_eNB_mme_data_t *mme_desc_p = NULL;
s1ap_eNB_ue_context_t *ue_desc_p = NULL;
s1ap_eNB_instance_t *s1ap_eNB_instance = NULL;
DevAssert(message_p != NULL);
downlink_NAS_transport_p = &message_p->msg.s1ap_DownlinkNASTransportIEs;
/* UE-related procedure -> stream != 0 */
if (stream == 0) {
S1AP_ERROR("[SCTP %d] Received UE-related procedure on stream == 0\n",
assoc_id);
return -1;
}
if ((mme_desc_p = s1ap_eNB_get_MME(NULL, assoc_id, 0)) == NULL) {
S1AP_ERROR(
"[SCTP %d] Received NAS downlink message for non existing MME context\n",
assoc_id);
return -1;
}
s1ap_eNB_instance = mme_desc_p->s1ap_eNB_instance;
if ((ue_desc_p = s1ap_eNB_get_ue_context(s1ap_eNB_instance,
downlink_NAS_transport_p->eNB_UE_S1AP_ID)) == NULL) {
MSC_LOG_RX_DISCARDED_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
(const char *)downlink_NAS_transport_p,
sizeof(S1ap_DownlinkNASTransportIEs_t),
MSC_AS_TIME_FMT" downlinkNASTransport eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
downlink_NAS_transport_p->eNB_UE_S1AP_ID,
downlink_NAS_transport_p->mme_ue_s1ap_id);
S1AP_ERROR("[SCTP %d] Received NAS downlink message for non existing UE context eNB_UE_S1AP_ID: 0x%"PRIx32" %u\n",
assoc_id,
downlink_NAS_transport_p->eNB_UE_S1AP_ID,
downlink_NAS_transport_p->eNB_UE_S1AP_ID);
return -1;
}
if (0 == ue_desc_p->rx_stream) {
ue_desc_p->rx_stream = stream;
} else if (stream != ue_desc_p->rx_stream) {
S1AP_ERROR("[SCTP %d] Received UE-related procedure on stream %u, expecting %u\n",
assoc_id, stream, ue_desc_p->rx_stream);
return -1;
}
/* Is it the first outcome of the MME for this UE ? If so store the mme
* UE s1ap id.
*/
if (ue_desc_p->mme_ue_s1ap_id == 0) {
ue_desc_p->mme_ue_s1ap_id = downlink_NAS_transport_p->mme_ue_s1ap_id;
} else {
/* We already have a mme ue s1ap id check the received is the same */
if (ue_desc_p->mme_ue_s1ap_id != downlink_NAS_transport_p->mme_ue_s1ap_id) {
S1AP_ERROR("[SCTP %d] Mismatch in MME UE S1AP ID (0x%"PRIx32" != 0x%"PRIx32")\n",
assoc_id,
downlink_NAS_transport_p->mme_ue_s1ap_id,
ue_desc_p->mme_ue_s1ap_id
);
return -1;
}
}
MSC_LOG_RX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
(const char *)downlink_NAS_transport_p,
sizeof(S1ap_DownlinkNASTransportIEs_t),
MSC_AS_TIME_FMT" downlinkNASTransport eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
downlink_NAS_transport_p->eNB_UE_S1AP_ID,
downlink_NAS_transport_p->mme_ue_s1ap_id);
/* Forward the NAS PDU to RRC */
s1ap_eNB_itti_send_nas_downlink_ind(s1ap_eNB_instance->instance,
ue_desc_p->ue_initial_id,
ue_desc_p->eNB_ue_s1ap_id,
downlink_NAS_transport_p->nas_pdu.buf,
downlink_NAS_transport_p->nas_pdu.size);
// LG: Why set to 0 ??
//ue_desc_p->ue_initial_id = 0;
return 0;
}
//------------------------------------------------------------------------------
int s1ap_eNB_nas_uplink(instance_t instance, s1ap_uplink_nas_t *s1ap_uplink_nas_p)
//------------------------------------------------------------------------------
{
struct s1ap_eNB_ue_context_s *ue_context_p;
s1ap_eNB_instance_t *s1ap_eNB_instance_p;
S1ap_UplinkNASTransportIEs_t *uplink_NAS_transport_p;
s1ap_message message;
uint8_t *buffer;
uint32_t length;
DevAssert(s1ap_uplink_nas_p != NULL);
/* Retrieve the S1AP eNB instance associated with Mod_id */
s1ap_eNB_instance_p = s1ap_eNB_get_instance(instance);
DevAssert(s1ap_eNB_instance_p != NULL);
if ((ue_context_p = s1ap_eNB_get_ue_context(s1ap_eNB_instance_p, s1ap_uplink_nas_p->eNB_ue_s1ap_id)) == NULL) {
/* The context for this eNB ue s1ap id doesn't exist in the map of eNB UEs */
S1AP_WARN("Failed to find ue context associated with eNB ue s1ap id: %06x\n",
s1ap_uplink_nas_p->eNB_ue_s1ap_id);
return -1;
}
/* Uplink NAS transport can occur either during an s1ap connected state
* or during initial attach (for example: NAS authentication).
*/
if (!(ue_context_p->ue_state == S1AP_UE_CONNECTED ||
ue_context_p->ue_state == S1AP_UE_WAITING_CSR)) {
S1AP_WARN("You are attempting to send NAS data over non-connected "
"eNB ue s1ap id: %u, current state: %d\n",
s1ap_uplink_nas_p->eNB_ue_s1ap_id, ue_context_p->ue_state);
return -1;
}
/* Prepare the S1AP message to encode */
memset(&message, 0, sizeof(s1ap_message));
message.direction = S1AP_PDU_PR_initiatingMessage;
message.procedureCode = S1ap_ProcedureCode_id_uplinkNASTransport;
uplink_NAS_transport_p = &message.msg.s1ap_UplinkNASTransportIEs;
uplink_NAS_transport_p->mme_ue_s1ap_id = ue_context_p->mme_ue_s1ap_id;
uplink_NAS_transport_p->eNB_UE_S1AP_ID = ue_context_p->eNB_ue_s1ap_id;
uplink_NAS_transport_p->nas_pdu.buf = s1ap_uplink_nas_p->nas_pdu.buffer;
uplink_NAS_transport_p->nas_pdu.size = s1ap_uplink_nas_p->nas_pdu.length;
MCC_MNC_TO_PLMNID(
s1ap_eNB_instance_p->mcc,
s1ap_eNB_instance_p->mnc,
s1ap_eNB_instance_p->mnc_digit_length,
&uplink_NAS_transport_p->eutran_cgi.pLMNidentity);
#warning "TODO get cell id from RRC"
MACRO_ENB_ID_TO_CELL_IDENTITY(s1ap_eNB_instance_p->eNB_id,
0,
&uplink_NAS_transport_p->eutran_cgi.cell_ID);
/* MCC/MNC should be repeated in TAI and EUTRAN CGI */
MCC_MNC_TO_PLMNID(
s1ap_eNB_instance_p->mcc,
s1ap_eNB_instance_p->mnc,
s1ap_eNB_instance_p->mnc_digit_length,
&uplink_NAS_transport_p->tai.pLMNidentity);
TAC_TO_ASN1(s1ap_eNB_instance_p->tac, &uplink_NAS_transport_p->tai.tAC);
if (s1ap_eNB_encode_pdu(&message, &buffer, &length) < 0) {
S1AP_ERROR("Failed to encode uplink NAS transport\n");
/* Encode procedure has failed... */
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
(const char *)NULL,
0,
MSC_AS_TIME_FMT" uplinkNASTransport initiatingMessage eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
uplink_NAS_transport_p->eNB_UE_S1AP_ID,
uplink_NAS_transport_p->mme_ue_s1ap_id);
/* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
ue_context_p->mme_ref->assoc_id, buffer,
length, ue_context_p->tx_stream);
return 0;
}
//------------------------------------------------------------------------------
void s1ap_eNB_nas_non_delivery_ind(instance_t instance,
s1ap_nas_non_delivery_ind_t *s1ap_nas_non_delivery_ind)
//------------------------------------------------------------------------------
{
struct s1ap_eNB_ue_context_s *ue_context_p;
s1ap_eNB_instance_t *s1ap_eNB_instance_p;
S1ap_NASNonDeliveryIndication_IEs_t *nas_non_delivery_p;
s1ap_message message;
uint8_t *buffer;
uint32_t length;
DevAssert(s1ap_nas_non_delivery_ind != NULL);
/* Retrieve the S1AP eNB instance associated with Mod_id */
s1ap_eNB_instance_p = s1ap_eNB_get_instance(instance);
DevAssert(s1ap_eNB_instance_p != NULL);
if ((ue_context_p = s1ap_eNB_get_ue_context(s1ap_eNB_instance_p, s1ap_nas_non_delivery_ind->eNB_ue_s1ap_id)) == NULL) {
/* The context for this eNB ue s1ap id doesn't exist in the map of eNB UEs */
S1AP_WARN("Failed to find ue context associated with eNB ue s1ap id: %06x\n",
s1ap_nas_non_delivery_ind->eNB_ue_s1ap_id);
MSC_LOG_EVENT(
MSC_S1AP_ENB,
MSC_AS_TIME_FMT" Sent of NAS_NON_DELIVERY_IND to MME failed, no context for eNB_ue_s1ap_id %06x",
s1ap_nas_non_delivery_ind->eNB_ue_s1ap_id);
return;
}
/* Prepare the S1AP message to encode */
memset(&message, 0, sizeof(s1ap_message));
message.direction = S1AP_PDU_PR_initiatingMessage;
message.procedureCode = S1ap_ProcedureCode_id_NASNonDeliveryIndication;
nas_non_delivery_p = &message.msg.s1ap_NASNonDeliveryIndication_IEs;
nas_non_delivery_p->eNB_UE_S1AP_ID = ue_context_p->eNB_ue_s1ap_id;
nas_non_delivery_p->mme_ue_s1ap_id = ue_context_p->mme_ue_s1ap_id;
nas_non_delivery_p->nas_pdu.buf = s1ap_nas_non_delivery_ind->nas_pdu.buffer;
nas_non_delivery_p->nas_pdu.size = s1ap_nas_non_delivery_ind->nas_pdu.length;
/* Send a dummy cause */
nas_non_delivery_p->cause.present = S1ap_Cause_PR_radioNetwork;
nas_non_delivery_p->cause.choice.radioNetwork = S1ap_CauseRadioNetwork_radio_connection_with_ue_lost;
if (s1ap_eNB_encode_pdu(&message, &buffer, &length) < 0) {
S1AP_ERROR("Failed to encode NAS NON delivery indication\n");
/* Encode procedure has failed... */
MSC_LOG_EVENT(
MSC_S1AP_ENB,
MSC_AS_TIME_FMT" Sent of NAS_NON_DELIVERY_IND to MME failed (encoding)");
return;
}
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
(const char *)s1ap_nas_non_delivery_ind,
sizeof(s1ap_nas_non_delivery_ind_t),
MSC_AS_TIME_FMT" NASNonDeliveryIndication initiatingMessage eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
nas_non_delivery_p->eNB_UE_S1AP_ID,
nas_non_delivery_p->mme_ue_s1ap_id);
/* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
ue_context_p->mme_ref->assoc_id, buffer,
length, ue_context_p->tx_stream);
}
//------------------------------------------------------------------------------
int s1ap_eNB_initial_ctxt_resp(
instance_t instance, s1ap_initial_context_setup_resp_t *initial_ctxt_resp_p)
//------------------------------------------------------------------------------
{
s1ap_eNB_instance_t *s1ap_eNB_instance_p = NULL;
struct s1ap_eNB_ue_context_s *ue_context_p = NULL;
S1ap_InitialContextSetupResponseIEs_t *initial_ies_p = NULL;
s1ap_message message;
uint8_t *buffer = NULL;
uint32_t length;
int ret = -1;
int i;
/* Retrieve the S1AP eNB instance associated with Mod_id */
s1ap_eNB_instance_p = s1ap_eNB_get_instance(instance);
DevAssert(initial_ctxt_resp_p != NULL);
DevAssert(s1ap_eNB_instance_p != NULL);
if ((ue_context_p = s1ap_eNB_get_ue_context(s1ap_eNB_instance_p,
initial_ctxt_resp_p->eNB_ue_s1ap_id)) == NULL) {
/* The context for this eNB ue s1ap id doesn't exist in the map of eNB UEs */
S1AP_WARN("Failed to find ue context associated with eNB ue s1ap id: 0x%06x\n",
initial_ctxt_resp_p->eNB_ue_s1ap_id);
return -1;
}
/* Uplink NAS transport can occur either during an s1ap connected state
* or during initial attach (for example: NAS authentication).
*/
if (!(ue_context_p->ue_state == S1AP_UE_CONNECTED ||
ue_context_p->ue_state == S1AP_UE_WAITING_CSR)) {
S1AP_WARN("You are attempting to send NAS data over non-connected "
"eNB ue s1ap id: %06x, current state: %d\n",
initial_ctxt_resp_p->eNB_ue_s1ap_id, ue_context_p->ue_state);
return -1;
}
/* Prepare the S1AP message to encode */
memset(&message, 0, sizeof(s1ap_message));
message.direction = S1AP_PDU_PR_successfulOutcome;
message.procedureCode = S1ap_ProcedureCode_id_InitialContextSetup;
initial_ies_p = &message.msg.s1ap_InitialContextSetupResponseIEs;
initial_ies_p->eNB_UE_S1AP_ID = initial_ctxt_resp_p->eNB_ue_s1ap_id;
initial_ies_p->mme_ue_s1ap_id = ue_context_p->mme_ue_s1ap_id;
for (i = 0; i < initial_ctxt_resp_p->nb_of_e_rabs; i++) {
S1ap_E_RABSetupItemCtxtSURes_t *new_item;
new_item = calloc(1, sizeof(S1ap_E_RABSetupItemCtxtSURes_t));
new_item->e_RAB_ID = initial_ctxt_resp_p->e_rabs[i].e_rab_id;
GTP_TEID_TO_ASN1(initial_ctxt_resp_p->e_rabs[i].gtp_teid, &new_item->gTP_TEID);
new_item->transportLayerAddress.buf = initial_ctxt_resp_p->e_rabs[i].eNB_addr.buffer;
new_item->transportLayerAddress.size = initial_ctxt_resp_p->e_rabs[i].eNB_addr.length;
new_item->transportLayerAddress.bits_unused = 0;
ASN_SEQUENCE_ADD(&initial_ies_p->e_RABSetupListCtxtSURes.s1ap_E_RABSetupItemCtxtSURes,
new_item);
}
if (s1ap_eNB_encode_pdu(&message, &buffer, &length) < 0) {
S1AP_ERROR("Failed to encode uplink NAS transport\n");
/* Encode procedure has failed... */
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
(const char *)buffer,
length,
MSC_AS_TIME_FMT" InitialContextSetup successfulOutcome eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
initial_ies_p->eNB_UE_S1AP_ID,
initial_ies_p->mme_ue_s1ap_id);
/* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
ue_context_p->mme_ref->assoc_id, buffer,
length, ue_context_p->tx_stream);
return ret;
}
//------------------------------------------------------------------------------
int s1ap_eNB_ue_capabilities(instance_t instance,
s1ap_ue_cap_info_ind_t *ue_cap_info_ind_p)
//------------------------------------------------------------------------------
{
s1ap_eNB_instance_t *s1ap_eNB_instance_p;
struct s1ap_eNB_ue_context_s *ue_context_p;
S1ap_UECapabilityInfoIndicationIEs_t *ue_cap_info_ind_ies_p;
s1ap_message message;
uint8_t *buffer;
uint32_t length;
int ret = -1;
/* Retrieve the S1AP eNB instance associated with Mod_id */
s1ap_eNB_instance_p = s1ap_eNB_get_instance(instance);
DevAssert(ue_cap_info_ind_p != NULL);
DevAssert(s1ap_eNB_instance_p != NULL);
if ((ue_context_p = s1ap_eNB_get_ue_context(s1ap_eNB_instance_p,
ue_cap_info_ind_p->eNB_ue_s1ap_id)) == NULL) {
/* The context for this eNB ue s1ap id doesn't exist in the map of eNB UEs */
S1AP_WARN("Failed to find ue context associated with eNB ue s1ap id: %u\n",
ue_cap_info_ind_p->eNB_ue_s1ap_id);
return -1;
}
/* UE capabilities message can occur either during an s1ap connected state
* or during initial attach (for example: NAS authentication).
*/
if (!(ue_context_p->ue_state == S1AP_UE_CONNECTED ||
ue_context_p->ue_state == S1AP_UE_WAITING_CSR)) {
S1AP_WARN("You are attempting to send NAS data over non-connected "
"eNB ue s1ap id: %u, current state: %d\n",
ue_cap_info_ind_p->eNB_ue_s1ap_id, ue_context_p->ue_state);
return -1;
}
/* Prepare the S1AP message to encode */
memset(&message, 0, sizeof(s1ap_message));
message.direction = S1AP_PDU_PR_initiatingMessage;
message.procedureCode = S1ap_ProcedureCode_id_UECapabilityInfoIndication;
ue_cap_info_ind_ies_p = &message.msg.s1ap_UECapabilityInfoIndicationIEs;
ue_cap_info_ind_ies_p->ueRadioCapability.buf = ue_cap_info_ind_p->ue_radio_cap.buffer;
ue_cap_info_ind_ies_p->ueRadioCapability.size = ue_cap_info_ind_p->ue_radio_cap.length;
ue_cap_info_ind_ies_p->eNB_UE_S1AP_ID = ue_cap_info_ind_p->eNB_ue_s1ap_id;
ue_cap_info_ind_ies_p->mme_ue_s1ap_id = ue_context_p->mme_ue_s1ap_id;
if (s1ap_eNB_encode_pdu(&message, &buffer, &length) < 0) {
/* Encode procedure has failed... */
S1AP_ERROR("Failed to encode UE capabilities indication\n");
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
(const char *)buffer,
length,
MSC_AS_TIME_FMT" UECapabilityInfoIndication initiatingMessage eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
ue_cap_info_ind_ies_p->eNB_UE_S1AP_ID,
ue_cap_info_ind_ies_p->mme_ue_s1ap_id);
/* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
ue_context_p->mme_ref->assoc_id, buffer,
length, ue_context_p->tx_stream);
return ret;
}
+53
View File
@@ -0,0 +1,53 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
#ifndef S1AP_ENB_NAS_PROCEDURES_H_
#define S1AP_ENB_NAS_PROCEDURES_H_
int s1ap_eNB_handle_nas_downlink(
const uint32_t assoc_id,
const uint32_t stream,
struct s1ap_message_s* message_p);
int s1ap_eNB_nas_uplink(instance_t instance, s1ap_uplink_nas_t *s1ap_uplink_nas_p);
void s1ap_eNB_nas_non_delivery_ind(instance_t instance,
s1ap_nas_non_delivery_ind_t *s1ap_nas_non_delivery_ind);
int s1ap_eNB_handle_nas_first_req(
instance_t instance, s1ap_nas_first_req_t *s1ap_nas_first_req_p);
int s1ap_eNB_initial_ctxt_resp(
instance_t instance, s1ap_initial_context_setup_resp_t *initial_ctxt_resp_p);
int s1ap_eNB_ue_capabilities(instance_t instance,
s1ap_ue_cap_info_ind_t *ue_cap_info_ind_p);
#endif /* S1AP_ENB_NAS_PROCEDURES_H_ */
+265
View File
@@ -0,0 +1,265 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
/*! \file s1ap_eNB_nnsf.c
* \brief s1ap NAS node selection functions
* \author Sebastien ROUX <sebastien.roux@eurecom.fr>
* \date 2012
* \version 0.1
*/
#include <stdio.h>
#include <stdlib.h>
#include "intertask_interface.h"
#include "s1ap_common.h"
#include "s1ap_eNB_defs.h"
#include "s1ap_eNB_nnsf.h"
struct s1ap_eNB_mme_data_s *
s1ap_eNB_nnsf_select_mme(s1ap_eNB_instance_t *instance_p,
rrc_establishment_cause_t cause)
{
struct s1ap_eNB_mme_data_s *mme_data_p = NULL;
struct s1ap_eNB_mme_data_s *mme_highest_capacity_p = NULL;
uint8_t current_capacity = 0;
RB_FOREACH(mme_data_p, s1ap_mme_map, &instance_p->s1ap_mme_head) {
if (mme_data_p->state != S1AP_ENB_STATE_CONNECTED) {
/* The association between MME and eNB is not ready for the moment,
* go to the next known MME.
*/
if (mme_data_p->state == S1AP_ENB_OVERLOAD) {
/* MME is overloaded. We have to check the RRC establishment
* cause and take decision to the select this MME depending on
* the overload state.
*/
if ((cause == RRC_CAUSE_MO_DATA)
&& (mme_data_p->overload_state == S1AP_OVERLOAD_REJECT_MO_DATA)) {
continue;
}
if ((mme_data_p->overload_state == S1AP_OVERLOAD_REJECT_ALL_SIGNALLING)
&& ((cause == RRC_CAUSE_MO_SIGNALLING) || (cause == RRC_CAUSE_MO_DATA))) {
continue;
}
if ((mme_data_p->overload_state == S1AP_OVERLOAD_ONLY_EMERGENCY_AND_MT)
&& ((cause == RRC_CAUSE_MO_SIGNALLING) || (cause == RRC_CAUSE_MO_DATA)
|| (cause == RRC_CAUSE_HIGH_PRIO_ACCESS))) {
continue;
}
/* At this point, the RRC establishment can be handled by the MME
* even if it is in overload state.
*/
} else {
/* The MME is not overloaded, association is simply not ready. */
continue;
}
}
if (current_capacity < mme_data_p->relative_mme_capacity) {
/* We find a better MME, keep a reference to it */
current_capacity = mme_data_p->relative_mme_capacity;
mme_highest_capacity_p = mme_data_p;
}
}
return mme_highest_capacity_p;
}
struct s1ap_eNB_mme_data_s *
s1ap_eNB_nnsf_select_mme_by_mme_code(s1ap_eNB_instance_t *instance_p,
rrc_establishment_cause_t cause,
uint8_t mme_code)
{
struct s1ap_eNB_mme_data_s *mme_data_p = NULL;
struct s1ap_eNB_mme_data_s *mme_highest_capacity_p = NULL;
uint8_t current_capacity = 0;
RB_FOREACH(mme_data_p, s1ap_mme_map, &instance_p->s1ap_mme_head) {
struct served_gummei_s *gummei_p = NULL;
if (mme_data_p->state != S1AP_ENB_STATE_CONNECTED) {
/* The association between MME and eNB is not ready for the moment,
* go to the next known MME.
*/
if (mme_data_p->state == S1AP_ENB_OVERLOAD) {
/* MME is overloaded. We have to check the RRC establishment
* cause and take decision to the select this MME depending on
* the overload state.
*/
if ((cause == RRC_CAUSE_MO_DATA)
&& (mme_data_p->overload_state == S1AP_OVERLOAD_REJECT_MO_DATA)) {
continue;
}
if ((mme_data_p->overload_state == S1AP_OVERLOAD_REJECT_ALL_SIGNALLING)
&& ((cause == RRC_CAUSE_MO_SIGNALLING) || (cause == RRC_CAUSE_MO_DATA))) {
continue;
}
if ((mme_data_p->overload_state == S1AP_OVERLOAD_ONLY_EMERGENCY_AND_MT)
&& ((cause == RRC_CAUSE_MO_SIGNALLING) || (cause == RRC_CAUSE_MO_DATA)
|| (cause == RRC_CAUSE_HIGH_PRIO_ACCESS))) {
continue;
}
/* At this point, the RRC establishment can be handled by the MME
* even if it is in overload state.
*/
} else {
/* The MME is not overloaded, association is simply not ready. */
continue;
}
}
if (current_capacity < mme_data_p->relative_mme_capacity) {
/* We find a better MME, keep a reference to it */
current_capacity = mme_data_p->relative_mme_capacity;
mme_highest_capacity_p = mme_data_p;
}
/* Looking for MME code matching the one provided by NAS */
STAILQ_FOREACH(gummei_p, &mme_data_p->served_gummei, next) {
struct mme_code_s *mme_code_p = NULL;
STAILQ_FOREACH(mme_code_p, &gummei_p->mme_codes, next) {
if (mme_code_p->mme_code == mme_code) {
return mme_data_p;
}
}
}
}
/* At this point no MME matches the provided GUMMEI. Select the one with the
* highest relative capacity.
* In case the list of known MME is empty, simply return NULL, that way the RRC
* layer should know about it and reject RRC connectivity.
*/
return mme_highest_capacity_p;
}
struct s1ap_eNB_mme_data_s *
s1ap_eNB_nnsf_select_mme_by_gummei(s1ap_eNB_instance_t *instance_p,
rrc_establishment_cause_t cause,
s1ap_gummei_t gummei)
{
struct s1ap_eNB_mme_data_s *mme_data_p = NULL;
struct s1ap_eNB_mme_data_s *mme_highest_capacity_p = NULL;
uint8_t current_capacity = 0;
RB_FOREACH(mme_data_p, s1ap_mme_map, &instance_p->s1ap_mme_head) {
struct served_gummei_s *gummei_p = NULL;
if (mme_data_p->state != S1AP_ENB_STATE_CONNECTED) {
/* The association between MME and eNB is not ready for the moment,
* go to the next known MME.
*/
if (mme_data_p->state == S1AP_ENB_OVERLOAD) {
/* MME is overloaded. We have to check the RRC establishment
* cause and take decision to the select this MME depending on
* the overload state.
*/
if ((cause == RRC_CAUSE_MO_DATA)
&& (mme_data_p->overload_state == S1AP_OVERLOAD_REJECT_MO_DATA)) {
continue;
}
if ((mme_data_p->overload_state == S1AP_OVERLOAD_REJECT_ALL_SIGNALLING)
&& ((cause == RRC_CAUSE_MO_SIGNALLING) || (cause == RRC_CAUSE_MO_DATA))) {
continue;
}
if ((mme_data_p->overload_state == S1AP_OVERLOAD_ONLY_EMERGENCY_AND_MT)
&& ((cause == RRC_CAUSE_MO_SIGNALLING) || (cause == RRC_CAUSE_MO_DATA)
|| (cause == RRC_CAUSE_HIGH_PRIO_ACCESS))) {
continue;
}
/* At this point, the RRC establishment can be handled by the MME
* even if it is in overload state.
*/
} else {
/* The MME is not overloaded, association is simply not ready. */
continue;
}
}
if (current_capacity < mme_data_p->relative_mme_capacity) {
/* We find a better MME, keep a reference to it */
current_capacity = mme_data_p->relative_mme_capacity;
mme_highest_capacity_p = mme_data_p;
}
/* Looking for MME gummei matching the one provided by NAS */
STAILQ_FOREACH(gummei_p, &mme_data_p->served_gummei, next) {
struct served_group_id_s *group_id_p = NULL;
struct mme_code_s *mme_code_p = NULL;
struct plmn_identity_s *served_plmn_p = NULL;
STAILQ_FOREACH(served_plmn_p, &gummei_p->served_plmns, next) {
if ((served_plmn_p->mcc == gummei.mcc) &&
(served_plmn_p->mnc == gummei.mnc)) {
break;
}
}
STAILQ_FOREACH(mme_code_p, &gummei_p->mme_codes, next) {
if (mme_code_p->mme_code == gummei.mme_code) {
break;
}
}
STAILQ_FOREACH(group_id_p, &gummei_p->served_group_ids, next) {
if (group_id_p->mme_group_id == gummei.mme_group_id) {
break;
}
}
/* The MME matches the parameters provided by the NAS layer ->
* the MME is knwown and the association is ready.
* Return the reference to the MME to use it for this UE.
*/
if ((group_id_p != NULL) &&
(mme_code_p != NULL) &&
(served_plmn_p != NULL)) {
return mme_data_p;
}
}
}
/* At this point no MME matches the provided GUMMEI. Select the one with the
* highest relative capacity.
* In case the list of known MME is empty, simply return NULL, that way the RRC
* layer should know about it and reject RRC connectivity.
*/
return mme_highest_capacity_p;
}
+47
View File
@@ -0,0 +1,47 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
#ifndef S1AP_ENB_NNSF_H_
#define S1AP_ENB_NNSF_H_
struct s1ap_eNB_mme_data_s *
s1ap_eNB_nnsf_select_mme(s1ap_eNB_instance_t *instance_p,
rrc_establishment_cause_t cause);
struct s1ap_eNB_mme_data_s*
s1ap_eNB_nnsf_select_mme_by_mme_code(s1ap_eNB_instance_t *instance_p,
rrc_establishment_cause_t cause,
uint8_t mme_code);
struct s1ap_eNB_mme_data_s*
s1ap_eNB_nnsf_select_mme_by_gummei(s1ap_eNB_instance_t *instance_p,
rrc_establishment_cause_t cause,
s1ap_gummei_t gummei);
#endif /* S1AP_ENB_NNSF_H_ */
+112
View File
@@ -0,0 +1,112 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
/*! \file s1ap_eNB_overload.c
* \brief s1ap procedures for overload messages within eNB
* \author Sebastien ROUX <sebastien.roux@eurecom.fr>
* \date 2012
* \version 0.1
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "intertask_interface.h"
#include "s1ap_common.h"
#include "s1ap_ies_defs.h"
#include "s1ap_eNB_defs.h"
#include "s1ap_eNB.h"
#include "s1ap_eNB_ue_context.h"
#include "s1ap_eNB_encoder.h"
#include "s1ap_eNB_overload.h"
#include "s1ap_eNB_management_procedures.h"
#include "assertions.h"
int s1ap_eNB_handle_overload_start(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *message_p)
{
S1ap_OverloadStartIEs_t *overload_start_p;
s1ap_eNB_mme_data_t *mme_desc_p;
DevAssert(message_p != NULL);
overload_start_p = &message_p->msg.s1ap_OverloadStartIEs;
DevCheck(overload_start_p->overloadResponse.present ==
S1ap_OverloadResponse_PR_overloadAction,
S1ap_OverloadResponse_PR_overloadAction, 0, 0);
/* Non UE-associated signalling -> stream 0 */
DevCheck(stream == 0, stream, 0, 0);
if ((mme_desc_p = s1ap_eNB_get_MME(NULL, assoc_id, 0)) == NULL) {
/* No MME context associated */
return -1;
}
/* Mark the MME as overloaded and set the overload state according to
* the value received.
*/
mme_desc_p->state = S1AP_ENB_OVERLOAD;
mme_desc_p->overload_state =
overload_start_p->overloadResponse.choice.overloadAction;
return 0;
}
int s1ap_eNB_handle_overload_stop(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *message_p)
{
/* We received Overload stop message, meaning that the MME is no more
* overloaded. This is an empty message, with only message header and no
* Information Element.
*/
DevAssert(message_p != NULL);
s1ap_eNB_mme_data_t *mme_desc_p;
/* Non UE-associated signalling -> stream 0 */
DevCheck(stream == 0, stream, 0, 0);
if ((mme_desc_p = s1ap_eNB_get_MME(NULL, assoc_id, 0)) == NULL) {
/* No MME context associated */
return -1;
}
mme_desc_p->state = S1AP_ENB_STATE_CONNECTED;
mme_desc_p->overload_state = S1AP_NO_OVERLOAD;
return 0;
}
+53
View File
@@ -0,0 +1,53 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
#ifndef S1AP_ENB_OVERLOAD_H_
#define S1AP_ENB_OVERLOAD_H_
/**
* \brief Handle an overload start message
**/
// int s1ap_eNB_handle_overload_start(eNB_mme_desc_t *eNB_desc_p,
// sctp_queue_item_t *packet_p,
// struct s1ap_message_s *message_p);
int s1ap_eNB_handle_overload_start(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *message_p);
/**
* \brief Handle an overload stop message
**/
// int s1ap_eNB_handle_overload_stop(eNB_mme_desc_t *eNB_desc_p,
// sctp_queue_item_t *packet_p,
// struct s1ap_message_s *message_p);
int s1ap_eNB_handle_overload_stop(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *message_p);
#endif /* S1AP_ENB_OVERLOAD_H_ */
+126
View File
@@ -0,0 +1,126 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
#include <stdint.h>
#include "assertions.h"
#include "intertask_interface.h"
#include "s1ap_eNB_default_values.h"
#include "s1ap_common.h"
#include "s1ap_ies_defs.h"
#include "s1ap_eNB_defs.h"
#include "s1ap_eNB.h"
#include "s1ap_eNB_ue_context.h"
#include "s1ap_eNB_encoder.h"
#include "s1ap_eNB_trace.h"
#include "s1ap_eNB_itti_messaging.h"
#include "s1ap_eNB_management_procedures.h"
static
void s1ap_eNB_generate_trace_failure(struct s1ap_eNB_ue_context_s *ue_desc_p,
S1ap_E_UTRAN_Trace_ID_t *trace_id,
S1ap_Cause_t *cause_p)
{
s1ap_message message;
S1ap_TraceFailureIndicationIEs_t *trace_failure_p;
uint8_t *buffer;
uint32_t length;
DevAssert(ue_desc_p != NULL);
DevAssert(trace_id != NULL);
DevAssert(cause_p != NULL);
memset(&message, 0, sizeof(s1ap_message));
trace_failure_p = &message.msg.s1ap_TraceFailureIndicationIEs;
trace_failure_p->mme_ue_s1ap_id = ue_desc_p->mme_ue_s1ap_id;
trace_failure_p->eNB_UE_S1AP_ID = ue_desc_p->eNB_ue_s1ap_id;
memcpy(&trace_failure_p->e_UTRAN_Trace_ID, trace_id, sizeof(S1ap_E_UTRAN_Trace_ID_t));
memcpy(&trace_failure_p->cause, cause_p, sizeof(S1ap_Cause_t));
if (s1ap_eNB_encode_pdu(&message, &buffer, &length) < 0) {
return;
}
s1ap_eNB_itti_send_sctp_data_req(ue_desc_p->mme_ref->s1ap_eNB_instance->instance,
ue_desc_p->mme_ref->assoc_id, buffer,
length, ue_desc_p->tx_stream);
}
int s1ap_eNB_handle_trace_start(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *message_p)
{
S1ap_TraceStartIEs_t *trace_start_p;
struct s1ap_eNB_ue_context_s *ue_desc_p;
struct s1ap_eNB_mme_data_s *mme_ref_p;
DevAssert(message_p != NULL);
trace_start_p = &message_p->msg.s1ap_TraceStartIEs;
mme_ref_p = s1ap_eNB_get_MME(NULL, assoc_id, 0);
DevAssert(mme_ref_p != NULL);
if ((ue_desc_p = s1ap_eNB_get_ue_context(mme_ref_p->s1ap_eNB_instance,
trace_start_p->eNB_UE_S1AP_ID)) == NULL) {
/* Could not find context associated with this eNB_ue_s1ap_id -> generate
* trace failure indication.
*/
S1ap_E_UTRAN_Trace_ID_t trace_id;
S1ap_Cause_t cause;
memset(&trace_id, 0, sizeof(S1ap_E_UTRAN_Trace_ID_t));
memset(&cause, 0, sizeof(S1ap_Cause_t));
cause.present = S1ap_Cause_PR_radioNetwork;
cause.choice.radioNetwork = S1ap_CauseRadioNetwork_unknown_pair_ue_s1ap_id;
s1ap_eNB_generate_trace_failure(ue_desc_p, &trace_id, &cause);
}
return 0;
}
int s1ap_eNB_handle_deactivate_trace(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *message_p)
{
// S1ap_DeactivateTraceIEs_t *deactivate_trace_p;
//
// deactivate_trace_p = &message_p->msg.deactivateTraceIEs;
return 0;
}
+55
View File
@@ -0,0 +1,55 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2013 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes
06410 Biot FRANCE
*******************************************************************************/
#ifndef S1AP_ENB_TRACE_H_
#define S1AP_ENB_TRACE_H_
// int s1ap_eNB_generate_trace_failure(sctp_data_t *sctp_data_p,
// int32_t stream,
// uint32_t eNB_ue_s1ap_id,
// uint32_t mme_ue_s1ap_id,
// E_UTRAN_Trace_ID_t *trace_id,
// Cause_t *cause_p);
// int s1ap_eNB_handle_trace_start(eNB_mme_desc_t *eNB_desc_p,
// sctp_queue_item_t *packet_p,
// struct s1ap_message_s *message_p);
int s1ap_eNB_handle_trace_start(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *message_p);
// int s1ap_eNB_handle_deactivate_trace(eNB_mme_desc_t *eNB_desc_p,
// sctp_queue_item_t *packet_p,
// struct s1ap_message_s *message_p);
int s1ap_eNB_handle_deactivate_trace(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *message_p);
#endif /* S1AP_ENB_TRACE_H_ */
+110
View File
@@ -0,0 +1,110 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
/*! \file s1ap_eNB_ue_context.c
* \brief s1ap UE context management within eNB
* \author Sebastien ROUX <sebastien.roux@eurecom.fr>
* \date 2012
* \version 0.1
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include "tree.h"
#include "intertask_interface.h"
#include "s1ap_common.h"
#include "s1ap_eNB_defs.h"
#include "s1ap_eNB_ue_context.h"
int s1ap_eNB_compare_eNB_ue_s1ap_id(
struct s1ap_eNB_ue_context_s *p1, struct s1ap_eNB_ue_context_s *p2)
{
if (p1->eNB_ue_s1ap_id > p2->eNB_ue_s1ap_id) {
return 1;
}
if (p1->eNB_ue_s1ap_id < p2->eNB_ue_s1ap_id) {
return -1;
}
return 0;
}
/* Generate the tree management functions */
RB_GENERATE(s1ap_ue_map, s1ap_eNB_ue_context_s, entries,
s1ap_eNB_compare_eNB_ue_s1ap_id);
struct s1ap_eNB_ue_context_s *s1ap_eNB_allocate_new_UE_context(void)
{
struct s1ap_eNB_ue_context_s *new_p;
new_p = malloc(sizeof(struct s1ap_eNB_ue_context_s));
if (new_p == NULL) {
S1AP_ERROR("Cannot allocate new ue context\n");
return NULL;
}
memset(new_p, 0, sizeof(struct s1ap_eNB_ue_context_s));
return new_p;
}
struct s1ap_eNB_ue_context_s *s1ap_eNB_get_ue_context(
s1ap_eNB_instance_t *instance_p,
uint32_t eNB_ue_s1ap_id)
{
s1ap_eNB_ue_context_t temp;
memset(&temp, 0, sizeof(struct s1ap_eNB_ue_context_s));
/* eNB ue s1ap id = 24 bits wide */
temp.eNB_ue_s1ap_id = eNB_ue_s1ap_id & 0x00FFFFFF;
return RB_FIND(s1ap_ue_map, &instance_p->s1ap_ue_head, &temp);
}
void s1ap_eNB_free_ue_context(struct s1ap_eNB_ue_context_s *ue_context_p)
{
if (ue_context_p == NULL) {
S1AP_ERROR("Trying to free a NULL context\n");
return;
}
/* TODO: check that context is currently not in the tree of known
* contexts.
*/
free(ue_context_p);
}
+98
View File
@@ -0,0 +1,98 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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 3 of the License, or
(at your option) any later version.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
#include "tree.h"
#include "queue.h"
#include "s1ap_eNB_defs.h"
#ifndef S1AP_ENB_UE_CONTEXT_H_
#define S1AP_ENB_UE_CONTEXT_H_
// Forward declarations
struct s1ap_eNB_mme_data_s;
struct s1ap_ue_map;
struct eNB_mme_desc_s;
typedef enum {
/* UE has not been registered to a MME or UE association has failed. */
S1AP_UE_DECONNECTED = 0x0,
/* UE s1ap state is waiting for initial context setup request message. */
S1AP_UE_WAITING_CSR = 0x1,
/* UE association is ready and bearers are established. */
S1AP_UE_CONNECTED = 0x2,
S1AP_UE_STATE_MAX,
} s1ap_ue_state;
typedef struct s1ap_eNB_ue_context_s {
/* Tree related data */
RB_ENTRY(s1ap_eNB_ue_context_s) entries;
/* Uniquely identifies the UE between MME and eNB within the eNB.
* This id is encoded on 24bits.
*/
unsigned eNB_ue_s1ap_id:24;
/* UE id for initial connection to S1AP */
uint16_t ue_initial_id;
/* Uniquely identifies the UE within MME. Encoded on 32 bits. */
uint32_t mme_ue_s1ap_id;
/* Stream used for this particular UE */
int32_t tx_stream;
int32_t rx_stream;
/* Current UE state. */
s1ap_ue_state ue_state;
/* Reference to MME data this UE is attached to */
struct s1ap_eNB_mme_data_s *mme_ref;
/* Reference to eNB data this UE is attached to */
s1ap_eNB_instance_t *eNB_instance;
} s1ap_eNB_ue_context_t;
int s1ap_eNB_compare_eNB_ue_s1ap_id(
struct s1ap_eNB_ue_context_s *p1, struct s1ap_eNB_ue_context_s *p2);
/* Generate the tree management functions prototypes */
RB_PROTOTYPE(s1ap_ue_map, s1ap_eNB_ue_context_s, entries,
s1ap_eNB_compare_eNB_ue_s1ap_id);
struct s1ap_eNB_ue_context_s *s1ap_eNB_allocate_new_UE_context(void);
struct s1ap_eNB_ue_context_s *s1ap_eNB_get_ue_context(
s1ap_eNB_instance_t *instance_p,
uint32_t eNB_ue_s1ap_id);
void s1ap_eNB_free_ue_context(struct s1ap_eNB_ue_context_s *ue_context_p);
#endif /* S1AP_ENB_UE_CONTEXT_H_ */